Mercurial > vanilla
comparison core/busybox/busybox.sh @ 1166:72824bb09754
core/busybox: add STATIC option
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 08 Oct 2019 20:30:00 +0200 |
parents | 297b5eef115e |
children | 99c240ea1b56 |
comparison
equal
deleted
inserted
replaced
1165:8d2032c88258 | 1166:72824bb09754 |
---|---|
20 PKGREVISION=1 | 20 PKGREVISION=1 |
21 PKGLICENSE="GPLv2" | 21 PKGLICENSE="GPLv2" |
22 PKGSUMMARY="swiss army knife for embedded" | 22 PKGSUMMARY="swiss army knife for embedded" |
23 PKGDOWNLOAD="https://busybox.net/downloads/$PKGNAME-$PKGVERSION.tar.bz2" | 23 PKGDOWNLOAD="https://busybox.net/downloads/$PKGNAME-$PKGVERSION.tar.bz2" |
24 PKGDEPENDS="linux-headers:build" | 24 PKGDEPENDS="linux-headers:build" |
25 PKGOPTIONS="CONFIG IPV6 PAM SELINUX" | 25 PKGOPTIONS="CONFIG IPV6 PAM SELINUX STATIC" |
26 PKGPROTECT="etc/udhcpd.conf" | 26 PKGPROTECT="etc/udhcpd.conf" |
27 | 27 |
28 : ${CC:=clang} | 28 : ${CC:=clang} |
29 : ${CFLAGS:=-O2} | 29 : ${CFLAGS:=-O2} |
30 : ${LDFLAGS:=} | 30 : ${LDFLAGS:=} |
31 : ${CONFIG:=} | 31 : ${CONFIG:=} |
32 : ${IPV6:=yes} | 32 : ${IPV6:=yes} |
33 : ${PAM:=no} | |
33 : ${SELINUX:=no} | 34 : ${SELINUX:=no} |
34 : ${PAM:=no} | 35 : ${STATIC:=no} |
35 | 36 |
36 build() | 37 build() |
37 { | 38 { |
38 rm -rf $PKGNAME-$PKGVERSION | 39 rm -rf $PKGNAME-$PKGVERSION |
39 tar xvf $PKGNAME-$PKGVERSION.tar.bz2 | 40 tar xvf $PKGNAME-$PKGVERSION.tar.bz2 |
49 # | 50 # |
50 # When specifying a config file, force other selective options | 51 # When specifying a config file, force other selective options |
51 # to a dummy value to avoid incorrect information in package | 52 # to a dummy value to avoid incorrect information in package |
52 # file. | 53 # file. |
53 # | 54 # |
54 IPV6="" | 55 IPV6="ignored" |
55 SELINUX="" | 56 SELINUX="ignored" |
56 PAM="" | 57 PAM="ignored" |
58 STATIC="ignored" | |
57 else | 59 else |
58 cp ../config .config | 60 cp ../config .config |
59 | 61 |
60 if [ "$SELINUX" = "yes" ]; then | 62 if [ "$SELINUX" = "yes" ]; then |
61 echo "CONFIG_SELINUX=y" >> .config | 63 echo "CONFIG_SELINUX=y" >> .config |
68 fi | 70 fi |
69 | 71 |
70 if [ "$IPV6" != "yes" ]; then | 72 if [ "$IPV6" != "yes" ]; then |
71 sed -i -e "/CONFIG_FEATURE_IPV6=y/ s/y/n/" .config | 73 sed -i -e "/CONFIG_FEATURE_IPV6=y/ s/y/n/" .config |
72 sed -i -e "/CONFIG_FEATURE_IFUPDOWN_IPV6=y/ s/y/n/" .config | 74 sed -i -e "/CONFIG_FEATURE_IFUPDOWN_IPV6=y/ s/y/n/" .config |
75 fi | |
76 | |
77 if [ "$STATIC" = "yes" ]; then | |
78 echo "CONFIG_STATIC=y" >> .config | |
73 fi | 79 fi |
74 fi | 80 fi |
75 | 81 |
76 # Our start script is located in /etc/rc.init. | 82 # Our start script is located in /etc/rc.init. |
77 sed -i -e 's|/etc/init.d/rcS|/etc/rc.init|' init/init.c | 83 sed -i -e 's|/etc/init.d/rcS|/etc/rc.init|' init/init.c |