Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2855 - (show annotations) (download)
Mon Sep 5 17:50:44 2011 UTC (12 years, 9 months ago) by niro
File size: 5386 byte(s)
auto added: ver bump to 1.19.0-r1
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
98 src_compile()
99 {
100 cd ${SRCDIR}
101
102 make oldconfig || die
103 mmake || die
104
105 # create a busybox.links file
106 HOSTCC=gcc sh applets/busybox.mkll | sort > busybox.links || die
107
108 # fix missing applet symlinks
109 echo "/bin/du" >> busybox.links || die
110
111 # do not use ash as default sh, we want bin/bash
112 sed -i '/bin\/sh/d' busybox.links || die
113
114 # use poweroff as default halt command
115 sed -i '/sbin\/halt/d' busybox.links || die
116 echo -e '#!/bin/sh\n/sbin/poweroff $*' > halt.sh || die
117
118 # remove some applet symlinks which are provided by other packages
119 ### patch
120 ### e2fsprogs
121 ### binutils
122 ### diffutils
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
152 minstallrc syslogd.rc-${SYSLOGD_CVS_REV} syslogd || die
153
154 # install crond rc script and keep needed directories
155 minstallrc crond.rc crond || die
156 mkeepdir /var/spool/cron/crontabs || die
157
158 # install splash-functions
159 minstallrc splash-functions.rc-${SPLASHRC_CVS_REV} splash-functions || die
160 minstalldir /etc/splash || die
161 minstallfile -s splash.conf-${SPLASHCONF_CVS_REV} /etc/splash/splash.conf || die
162 minstalldir /dev || die
163 mkfifo ${BINDIR}/dev/splashfifo || die
164
165 # install fbres for splash
166 minstallexec ${MISC_SRCDIR}/fbres || die
167
168 # install fbsplash theme
169 cd ${SPLASHTHEME_SRCDIR}
170 make DESTDIR=${BINDIR} install || die
171 # set alx theme as default
172 mlink alx /etc/splash/themes/default || die
173
174 # disable config_protection for themes
175 minstalldir /etc/env.d || die
176 echo "CONFIG_PROTECT_MASK=/etc/splash/themes" > ${BINDIR}/etc/env.d/15splash || die
177
178 # enable SPLASH_X11_TTY to supress flickers
179 sed -i 's:#SPLASH_X11_TTY=:SPLASH_X11_TTY=:' ${BINDIR}/etc/splash/splash.conf || die
180 }
181
182 preinstall()
183 {
184 add_conf_prot_mask /etc/rc.d/init.d /etc/splash/themes /etc/splash/splash.conf /etc/env.d
185 }
186
187 postinstall()
188 {
189 if [ -x ${MROOT}/bin/busybox ]
190 then
191 echo "Setting suid bit for ${MROOT}/bin/busybox"
192 chmod +s ${MROOT}/bin/busybox
193 fi
194
195 if [ -f ${MROOT}/usr/share/busybox/busybox.links ]
196 then
197 echo "Setting up busybox links ... "
198 local i
199 for i in $(< ${MROOT}/usr/share/busybox/busybox.links)
200 do
201 ln -snf /bin/busybox ${MROOT}/${i}
202 done
203 fi
204
205 if [[ ! -p ${MROOT}/dev/splashfifo ]]
206 then
207 mkfifo ${MROOT}/dev/splashfifo
208 fi
209
210 # run syslogd *after* creating the busybox symlinks!
211 mstartservice syslogd
212
213 alx_postinstall
214 }
215
216 postremove()
217 {
218 mstopservice syslogd
219 }