Contents of /smage/trunk/core/busybox/busybox-1.19.2-r1.smage2
Parent Directory | Revision Log
Revision 2859 -
(show annotations)
(download)
Tue Sep 6 07:38:01 2011 UTC (12 years, 9 months ago) by niro
File size: 5568 byte(s)
Tue Sep 6 07:38:01 2011 UTC (12 years, 9 months ago) by niro
File size: 5568 byte(s)
auto added: ver bump to 1.19.2-r1
1 | # $Id$ |
2 | |
3 | PNAME="busybox" |
4 | PVER="1.19.2" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="sys-apps" |
8 | |
9 | DESCRIPTION="BusyBox combines tiny versions of many common UNIX utilities into a single small executable." |
10 | HOMEPAGE="http://www.busybox.net/" |
11 | |
12 | # shared busybox needs glibc |
13 | DEPEND=">= virtual/glibc" |
14 | |
15 | PROVIDE="virtual/sed |
16 | virtual/tar |
17 | virtual/usbutils |
18 | virtual/pciutils |
19 | virtual/debianutils |
20 | virtual/which |
21 | virtual/wget |
22 | virtual/grep |
23 | virtual/bzip2 |
24 | virtual/gzip |
25 | virtual/syslog |
26 | virtual/less |
27 | virtual/net-tools |
28 | virtual/inetutils |
29 | virtual/kbd |
30 | virtual/procps |
31 | virtual/psmisc |
32 | virtual/dhcp |
33 | virtual/cron" |
34 | |
35 | # busbox config CVS revision |
36 | CFG_CVS_REV=1.14 |
37 | # udhcpc client script CVS revision |
38 | UDHCPC_CVS_REV=1.1 |
39 | # syslogd.rc cvs revision |
40 | SYSLOGD_CVS_REV=1.4 |
41 | # splash.conf cvs revision |
42 | SPLASHCONF_CVS_REV=1.3 |
43 | # splash-functions.rc cvs revision |
44 | SPLASHRC_CVS_REV=1.3 |
45 | |
46 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
47 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
48 | |
49 | MISC_PVER="0.1.8" |
50 | MISC_SRCFILE="miscsplashutils-${MISC_PVER}.tar.bz2" |
51 | MISC_SRCDIR="${BUILDDIR}/miscsplashutils-${MISC_PVER}" |
52 | |
53 | SPLASHTHEME_PVER="1.0" |
54 | SPLASHTHEME_SRCFILE="alx-theme-busybox-${SPLASHTHEME_PVER}.tar.bz2" |
55 | SPLASHTHEME_SRCDIR="${BUILDDIR}/alx-theme-busybox-${SPLASHTHEME_PVER}" |
56 | |
57 | sminclude mtools alx |
58 | |
59 | SRC_URI=( |
60 | http://www.busybox.net/downloads/${SRCFILE} |
61 | mirror://${PNAME}/${SRCFILE} |
62 | mirror://${PNAME}/config-${CFG_CVS_REV} |
63 | mirror://${PNAME}/udhcpc.sh-${UDHCPC_CVS_REV} |
64 | mirror://${PNAME}/de.kmap.gz |
65 | mirror://${PNAME}/syslogd.rc-${SYSLOGD_CVS_REV} |
66 | mirror://${PNAME}/syslog.conf |
67 | mirror://${PNAME}/crond.rc |
68 | mirror://${PNAME}/${PNAME}-1.15.3-flags.patch |
69 | mirror://${PNAME}/splash-functions.rc-${SPLASHRC_CVS_REV} |
70 | mirror://${PNAME}/splash.conf-${SPLASHCONF_CVS_REV} |
71 | mirror://${PNAME}/${PNAME}-1.19.0-fbsplash-tykef-1.0.patch |
72 | http://dev.gentoo.org/~spock/projects/gensplash/current/${MISC_SRCFILE} |
73 | mirror://${PNAME}/${MISC_SRCFILE} |
74 | mirror://${PNAME}/${SPLASHTHEME_SRCFILE} |
75 | ) |
76 | |
77 | src_prepare() |
78 | { |
79 | munpack ${SRCFILE} || die |
80 | munpack de.kmap.gz ${SRCDIR} || die |
81 | munpack ${MISC_SRCFILE} || die |
82 | munpack ${SPLASHTHEME_SRCFILE} || die |
83 | cd ${SRCDIR} |
84 | |
85 | # official patches |
86 | |
87 | # magellan patches |
88 | # remove broken cflags |
89 | mpatch ${PNAME}-1.15.3-flags.patch || die |
90 | |
91 | # enhanced fbsplash from tykef |
92 | # http://tykef.havlinda.net/programovani/fbsplash/ |
93 | mpatch ${PNAME}-1.19.0-fbsplash-tykef-1.0.patch || die |
94 | |
95 | # using a custom config |
96 | cp ${SOURCEDIR}/${PNAME}/config-${CFG_CVS_REV} .config || die |
97 | |
98 | # hotfix for glibc-2.14, rpc interface not supported anymore |
99 | sed -i 's/.*\(CONFIG_FEATURE_MOUNT_NFS\).*/#\ \1 is not set/' .config || die |
100 | } |
101 | |
102 | src_compile() |
103 | { |
104 | cd ${SRCDIR} |
105 | |
106 | make oldconfig || die |
107 | mmake || die |
108 | |
109 | # create a busybox.links file |
110 | HOSTCC=gcc sh applets/busybox.mkll | sort > busybox.links || die |
111 | |
112 | # fix missing applet symlinks |
113 | echo "/bin/du" >> busybox.links || die |
114 | |
115 | # do not use ash as default sh, we want bin/bash |
116 | sed -i '/bin\/sh/d' busybox.links || die |
117 | |
118 | # use poweroff as default halt command |
119 | sed -i '/sbin\/halt/d' busybox.links || die |
120 | echo -e '#!/bin/sh\n/sbin/poweroff $*' > halt.sh || die |
121 | |
122 | # remove some applet symlinks which are provided by other packages |
123 | ### umount (use from util-linux, need -t option) |
124 | sed -i '/bin\/umount/d' busybox.links || die |
125 | |
126 | cd ${MISC_SRCDIR} |
127 | mmake fbres || die |
128 | } |
129 | |
130 | src_install() |
131 | { |
132 | cd ${SRCDIR} |
133 | |
134 | minstalldir /bin || die |
135 | minstallexec busybox /bin || die |
136 | # set suid bit for suid applets like su |
137 | mchmod +s /bin/busybox || die |
138 | |
139 | minstalldir /sbin || die |
140 | minstallexec halt.sh /sbin/halt || die |
141 | |
142 | minstalldir /usr/share/busybox || die |
143 | minstallfile busybox.links /usr/share/busybox || die |
144 | |
145 | minstalldir /usr/share/busybox/keymaps || die |
146 | minstallfile de.kmap /usr/share/busybox/keymaps || die |
147 | |
148 | minstalldir /usr/share/udhcpc || die |
149 | minstallexec -s udhcpc.sh-${UDHCPC_CVS_REV} /usr/share/udhcpc/default.script || die |
150 | |
151 | # install syslogd rc script and config |
152 | minstallrc syslogd.rc-${SYSLOGD_CVS_REV} syslogd || die |
153 | minstallfile -s syslog.conf /etc/syslog.conf || die |
154 | |
155 | # install crond rc script and keep needed directories |
156 | minstallrc crond.rc crond || die |
157 | mkeepdir /var/spool/cron/crontabs || die |
158 | |
159 | # install splash-functions |
160 | minstallrc splash-functions.rc-${SPLASHRC_CVS_REV} splash-functions || die |
161 | minstalldir /etc/splash || die |
162 | minstallfile -s splash.conf-${SPLASHCONF_CVS_REV} /etc/splash/splash.conf || die |
163 | minstalldir /dev || die |
164 | mkfifo ${BINDIR}/dev/splashfifo || die |
165 | |
166 | # install fbres for splash |
167 | minstallexec ${MISC_SRCDIR}/fbres || die |
168 | |
169 | # install fbsplash theme |
170 | cd ${SPLASHTHEME_SRCDIR} |
171 | make DESTDIR=${BINDIR} install || die |
172 | # set alx theme as default |
173 | mlink alx /etc/splash/themes/default || die |
174 | |
175 | # disable config_protection for themes |
176 | minstalldir /etc/env.d || die |
177 | echo "CONFIG_PROTECT_MASK=/etc/splash/themes" > ${BINDIR}/etc/env.d/15splash || die |
178 | |
179 | # enable SPLASH_X11_TTY to supress flickers |
180 | sed -i 's:#SPLASH_X11_TTY=:SPLASH_X11_TTY=:' ${BINDIR}/etc/splash/splash.conf || die |
181 | } |
182 | |
183 | preinstall() |
184 | { |
185 | add_conf_prot_mask /etc/rc.d/init.d /etc/splash/themes /etc/splash/splash.conf /etc/env.d |
186 | } |
187 | |
188 | postinstall() |
189 | { |
190 | if [ -x ${MROOT}/bin/busybox ] |
191 | then |
192 | echo "Setting suid bit for ${MROOT}/bin/busybox" |
193 | chmod +s ${MROOT}/bin/busybox |
194 | fi |
195 | |
196 | if [ -f ${MROOT}/usr/share/busybox/busybox.links ] |
197 | then |
198 | echo "Setting up busybox links ... " |
199 | local i |
200 | for i in $(< ${MROOT}/usr/share/busybox/busybox.links) |
201 | do |
202 | ln -snf /bin/busybox ${MROOT}/${i} |
203 | done |
204 | fi |
205 | |
206 | if [[ ! -p ${MROOT}/dev/splashfifo ]] |
207 | then |
208 | mkfifo ${MROOT}/dev/splashfifo |
209 | fi |
210 | |
211 | # run syslogd *after* creating the busybox symlinks! |
212 | mstartservice syslogd |
213 | |
214 | alx_postinstall |
215 | } |
216 | |
217 | postremove() |
218 | { |
219 | mstopservice syslogd |
220 | } |