Magellan Linux

Annotation of /smage/trunk/core/busybox/busybox-1.19.2-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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