-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (33 loc) · 1.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
HOST?=10.11.99.1
PACKAGES=$(shell ls package/)
PUSH_PACKAGES=$(foreach app, $(PACKAGES), push-$(app))
define USAGE
Available targets:
repo Build the repository and reuse archives from the remote
repository for existing package versions.
force-repo Build the repository without reusing existing archives.
check Compare the local repository to the remote one.
RECIPE Build any package individually.
push-RECIPE Push any built package to .cache/opkg on the reMarkable.
(Plug in your reMarkable first!)
Where RECIPE is one of the following available recipes:
${PACKAGES}
endef
export USAGE
help:
@echo "$$USAGE"
repo:
rm build/repo -fr
./scripts/build-repo package build
force-repo:
rm build/repo -fr
./scripts/build-repo -f package build
check:
./scripts/check-repo build/repo
$(PACKAGES): %:
rm build/packages/"${@}" -fr
./scripts/build-package package/"${@}" build/packages/"${@}"
$(PUSH_PACKAGES): %:
ssh root@"${HOST}" mkdir -p .cache/opkg
scp build/packages/"$(@:push-%=%)"/*.ipk root@"${HOST}":.cache/opkg
.PHONY: help repo check $(PACKAGES) $(PUSH_PACKAGES)