This repository has been archived by the owner on Jan 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Makefile
86 lines (68 loc) · 2.3 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
REPO_REVISION=06abcdf888c224df6ea2883480e155a468e5d3c7
VERSION=0.2.10.2-$(shell date '+%Y%m%d')
LICENSE:
curl -s -L https://github.com/philippe44/AirConnect/raw/${REPO_REVISION}/LICENSE -O
target:
mkdir -p target
dist:
mkdir -p dist
target/package.tgz: target
$(if ${ARCH},,$(error Must specify ARCH))
curl -s -L https://github.com/philippe44/AirConnect/raw/${REPO_REVISION}/bin/airupnp-${ARCH} -o target/airupnp
chmod +x target/airupnp
curl -s -L https://github.com/philippe44/AirConnect/raw/${REPO_REVISION}/bin/aircast-${ARCH} -o target/aircast
chmod +x target/aircast
cd target && tar czf package.tgz airupnp aircast
rm target/airupnp target/aircast
target/scripts: target
cp -a scripts target
target/LICENSE: target
curl -s -L https://github.com/philippe44/AirConnect/raw/${REPO_REVISION}/LICENSE -o target/LICENSE
target/PACKAGE_ICON.PNG: target
cp PACKAGE_ICON.PNG target/PACKAGE_ICON.PNG
target/INFO: target
$(if ${INFO_ARCH},,$(error Must specify INFO_ARCH))
$(if ${INFO_FIRMWARE},,$(error Must specify INFO_FIRMWARE))
cp INFO target/INFO
sed -i.bak -e 's/#VERSION#/${VERSION}/' target/INFO
sed -i.bak -e 's/#INFO_ARCH#/${INFO_ARCH}/' target/INFO
sed -i.bak -e 's/#INFO_FIRMWARE#/${INFO_FIRMWARE}/' target/INFO
rm target/INFO.bak
dist/AirConnect-${ARCH}-${VERSION}.spk: target/package.tgz target/scripts target/LICENSE target/INFO target/PACKAGE_ICON.PNG dist
$(if ${ARCH},,$(error Must specify ARCH))
cd target && tar -czf AirConnect-${ARCH}-${VERSION}.spk *
mv target/AirConnect-${ARCH}-${VERSION}.spk dist/
.PHONY: arm
arm:
$(eval export INFO_ARCH=ipq806x armada370 armadaxp armada375 armada38x alpine alpine4k monaco comcerto2k)
$(eval export INFO_FIRMWARE=5.0-4458)
@true
.PHONY: aarch64
aarch64:
$(eval export INFO_ARCH=rtd1296)
$(eval export INFO_FIRMWARE=5.0-4458)
@true
.PHONY: x86
x86:
$(eval export INFO_ARCH=x86 cedarview bromolow evansport avoton braswell broadwell apollolake)
$(eval export INFO_FIRMWARE=5.0-4458)
@true
.PHONY: x86-64
x86-64:
$(eval export INFO_ARCH=x86_64)
$(eval export INFO_FIRMWARE=6.0-7321)
@true
.PHONY: build
build: ${ARCH} dist/AirConnect-${ARCH}-${VERSION}.spk
.PHONY: clean
clean:
rm -rf target
.PHONY: clean-dist
clean-dist:
rm -rf dist
.PHONY: build-all
build-all: clean-dist
./build.sh
.PHONY: shellcheck
shellcheck:
shellcheck -s sh scripts/*