kobo-syncthing/Makefile

37 lines
1.3 KiB
Makefile
Raw Normal View History

2023-04-14 01:53:20 +02:00
2023-04-14 04:07:48 +02:00
ARCH=arm
VERSION=1.23.4
2023-04-14 01:53:20 +02:00
SRC := $(shell find src -type f | tail -n+2)
SRC_REL := $(shell cd src && find ./ -type f)
2023-04-14 04:07:48 +02:00
TARCONTENT :=
all: KoboRoot.tgz
syncthing-linux-$(ARCH)-v$(VERSION).tar.gz:
curl -o $@ -L https://github.com/syncthing/syncthing/releases/download/v$(VERSION)/syncthing-linux-$(ARCH)-v$(VERSION).tar.gz
syncthing-linux-$(ARCH)-v$(VERSION): syncthing-linux-$(ARCH)-v$(VERSION).tar.gz
tar xf $<
src/usr/local/syncthing/syncthing: syncthing-linux-$(ARCH)-v$(VERSION)
cp syncthing-linux-$(ARCH)-v$(VERSION)/syncthing $@
2023-04-14 01:53:20 +02:00
2023-04-14 04:07:48 +02:00
src/usr/local/syncthing/AUTHORS.txt: syncthing-linux-$(ARCH)-v$(VERSION)
cp syncthing-linux-$(ARCH)-v$(VERSION)/AUTHORS.txt $@
src/usr/local/syncthing/LICENSE.txt: syncthing-linux-$(ARCH)-v$(VERSION)
cp syncthing-linux-$(ARCH)-v$(VERSION)/LICENSE.txt $@
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)
2023-04-14 01:53:20 +02:00
tar cvzf $@ -C src $(SRC_REL) --owner=0 --group=0
2023-04-14 04:07:48 +02:00
clean:
rm -r syncthing-linux-*/ syncthing-linux-*.tar.gz KoboRoot.tgz
rm -r src/usr/local/syncthing/{syncthing,AUTHORS.txt,LICENSE.txt,README.txt}
.PHONY: clean