Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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