This repository has been archived by the owner on Mar 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
58 lines (43 loc) · 1.65 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
SERIES := 13.1.2
VERSION := ZNH2KAS3P0
HASH := ff0428d091
REVISION := 1
BOOTIMG_FILE := cm-$(SERIES)-$(VERSION)-bacon-boot-debuggable-$(HASH).img
BOOTIMG_URL := http://builds.cyngn.com/factory/bacon/$(BOOTIMG_FILE)
UPDATE_ZIP := out/cm-unofficial-$(SERIES)-$(VERSION)-bacon-superuser-r$(REVISION).zip
SIGNED_ZIP := out/cm-unofficial-$(SERIES)-$(VERSION)-bacon-signed-superuser-r$(REVISION).zip
# Light builds
LIGHT_UPDATE_ZIP := out/cm-unofficial-12.0-superuser-light.zip
LIGHT_SIGNED_ZIP := out/cm-unofficial-12.0-signed-superuser-light.zip
all: full light
light: $(LIGHT_SIGNED_ZIP).asc $(LIGHT_UPDATE_ZIP).asc
@$(MAKE) .uploaded
full: $(SIGNED_ZIP).asc $(UPDATE_ZIP).asc
@$(MAKE) .uploaded
out/index.html: $(wildcard out/*.zip out/*.asc) index.html.in makeindex.py
python3 makeindex.py | tidy -i -xml -utf8 > out/index.html
.uploaded: out/index.html
sitecopy -u cm
touch $@
$(BOOTIMG_FILE):
wget $(BOOTIMG_URL)
zip-base/boot.img: $(BOOTIMG_FILE)
cp $(BOOTIMG_FILE) zip-base/boot.img
$(UPDATE_ZIP): zip-base/boot.img
rm -f $@
cd zip-base && 7z a ../$@ .
$(SIGNED_ZIP): $(UPDATE_ZIP)
java -jar signapk/signapk.jar signapk/testkey.x509.pem signapk/testkey.pk8 $< $@
%.zip.asc: %.zip
gpg2 -abs $<
zip-light-base/system/xbin/su: zip-base/system/xbin/su
python3 patch_su.py
$(LIGHT_UPDATE_ZIP): zip-light-base/system/xbin/su $(shell find zip-light-base -type f)
rm -f $@
cd zip-light-base && 7z a ../$@ .
$(LIGHT_SIGNED_ZIP): $(LIGHT_UPDATE_ZIP)
java -jar signapk/signapk.jar signapk/testkey.x509.pem signapk/testkey.pk8 $< $@
clean:
rm -f zip-base/boot.img
rm -f zip-light-base/system/xbin/su
$(NDK_BUILD) -C Superuser/Superuser clean