-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild
More file actions
executable file
·65 lines (56 loc) · 1.81 KB
/
Copy pathbuild
File metadata and controls
executable file
·65 lines (56 loc) · 1.81 KB
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
#!/bin/bash
rm -rf *.ipk *.deb
find . -name '*~' -delete
### Build AREDN package
export COPYFILE_DISABLE=1
export VERSION=2.18
# Main
rm -rf data.tar.gz control.tar.gz
cd src/data
sed -i "s/^app_version.*$/app_version = \"${VERSION}\"/" www/cgi-bin/meshchatconfig.lua
tar cf ../../data.tar `find . -type f | grep -v DS_Store`
cd ../control
sed -i "s/^Version: .*$/Version: ${VERSION}/" control
tar cfz ../../control.tar.gz .
cd ../..
gzip data.tar
COPYFILE_DISABLE=1 tar cfz meshchat_${VERSION}_all.ipk control.tar.gz data.tar.gz debian-binary
cp src/control/preinst src/data/.pre-install
cp src/control/postinst src/data/.post-install
cp src/control/prerm src/data/.pre-deinstall
cp src/control/postupgrade src/data/.post-upgrade
chmod 755 src/data/.pre-install src/data/.post-install src/data/.pre-deinstall src/data/.post-upgrade
mkapk.py \
-n meshchat \
-v ${VERSION} \
-d src/data \
-a noarch \
-D 'MeshChat' \
-u 'https://github.com/kn6plv/meshchat' \
-l 'MIT' \
-m 'tim.j.wilkinson@gmail.com' \
-p curl,lua,luci-lib-base,libuci-lua,libubus-lua \
-o .
rm -f src/data/.pre-install src/data/.post-install src/data/.pre-deinstall src/data/.post-upgrade
# API-only
rm -rf data.tar.gz control.tar.gz
cd apionly/data
tar cf ../../data.tar `find . -type f | grep -v DS_Store`
cd ../control
sed -i "s/^Version: .*$/Version: ${VERSION}/" control
tar cfz ../../control.tar.gz .
cd ../..
gzip data.tar
COPYFILE_DISABLE=1 tar cfz meshchat-api_${VERSION}_all.ipk control.tar.gz data.tar.gz debian-binary
mkapk.py \
-n meshchat-api \
-v ${VERSION} \
-d apionly/data \
-a noarch \
-D 'MeshChat' \
-u 'https://github.com/kn6plv/meshchat' \
-l 'MIT' \
-m 'tim.j.wilkinson@gmail.com' \
-p lua,luci-lib-base,libubus-lua \
-o .
rm -rf data.tar.gz control.tar.gz *.deb