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