Magellan Linux

Contents of /smage/trunk/core/busybox/busybox-1.19.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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