Fix some makefile issues and strip syncthing.

This commit is contained in:
redxef 2024-05-07 11:23:29 +02:00
parent 4db1b5efb3
commit 1b0b6379f3
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921

View file

@ -1,6 +1,6 @@
ARCH=arm
VERSION=1.27.6
CCPREFIX=arm-linux-gnueabihf-
SRC := $(shell find src -type f | tail -n+2)
SRC_REL := $(shell cd src && find ./ -type f)
@ -16,6 +16,7 @@ syncthing-linux-$(ARCH)-v$(VERSION): syncthing-linux-$(ARCH)-v$(VERSION).tar.gz
src/usr/local/syncthing/syncthing: syncthing-linux-$(ARCH)-v$(VERSION)
cp syncthing-linux-$(ARCH)-v$(VERSION)/syncthing $@
$(CCPREFIX)strip $@
src/usr/local/syncthing/AUTHORS.txt: syncthing-linux-$(ARCH)-v$(VERSION)
cp syncthing-linux-$(ARCH)-v$(VERSION)/AUTHORS.txt $@
@ -27,10 +28,16 @@ src/usr/local/syncthing/README.txt: syncthing-linux-$(ARCH)-v$(VERSION)
cp syncthing-linux-$(ARCH)-v$(VERSION)/README.txt $@
KoboRoot.tgz: src/usr/local/syncthing/syncthing src/usr/local/syncthing/AUTHORS.txt src/usr/local/syncthing/LICENSE.txt src/usr/local/syncthing/README.txt $(SRC)
tar cvzf $@ -C src $(SRC_REL) --owner=0 --group=0
tar cvzf $@ -C src \
./usr/local/syncthing/syncthing \
./usr/local/syncthing/AUTHORS.txt \
./usr/local/syncthing/LICENSE.txt \
./usr/local/syncthing/README.txt \
$(SRC_REL) \
--owner=0 --group=0
clean:
rm -r syncthing-linux-*/ syncthing-linux-*.tar.gz KoboRoot.tgz
rm -r src/usr/local/syncthing/{syncthing,AUTHORS.txt,LICENSE.txt,README.txt}
rm -rf syncthing-linux-*/ syncthing-linux-*.tar.gz KoboRoot.tgz
rm -rf src/usr/local/syncthing/{syncthing,AUTHORS.txt,LICENSE.txt,README.txt}
.PHONY: clean