Magellan Linux

Contents of /smage/trunk/core/busybox/busybox-1.17.4-r8.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1371 - (show annotations) (download)
Tue Mar 1 18:36:14 2011 UTC (13 years, 2 months ago) by niro
File size: 5278 byte(s)
-added patch to fix ssome tar issues
1 # $Id$
2
3 PNAME="busybox"
4 PVER="1.17.4"
5 PBUILD="r8"
6
7 PCATEGORIE="sys-apps"
8 STATE="unstable"
9
10 DESCRIPTION="BusyBox combines tiny versions of many common UNIX utilities into a single small executable."
11 HOMEPAGE="http://www.busybox.net/"
12
13 DEPEND=""
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/devmanager"
26
27 # busbox config CVS revision
28 CFG_CVS_REV=1.13
29 # udhcpc client script CVS revision
30 UDHCPC_CVS_REV=1.1
31 # mdev.r cvs revision
32 MDEVRC_CVS_REV=1.3
33 # mdev.conf cvs revision
34 MDEVCONF_CVS_REV=1.2
35 # syslogd.rc cvs revision
36 SYSLOGD_CVS_REV=1.3
37 # splash.conf cvs revision
38 SPLASHCONF_CVS_REV=1.2
39 # splash-functions.rc cvs revision
40 SPLASHRC_CVS_REV=1.2
41
42 SRCFILE="${PNAME}-${PVER}.tar.bz2"
43 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
44
45 MISC_PVER="0.1.8"
46 MISC_SRCFILE="miscsplashutils-${MISC_PVER}.tar.bz2"
47 MISC_SRCDIR="${BUILDDIR}/miscsplashutils-${MISC_PVER}"
48
49 SPLASHTHEME_PVER="1.1"
50 SPLASHTHEME_SRCFILE="mcore-theme-busybox-${SPLASHTHEME_PVER}.tar.bz2"
51 SPLASHTHEME_SRCDIR="${BUILDDIR}/mcore-theme-busybox-${SPLASHTHEME_PVER}"
52
53 sminclude mtools
54
55 SRC_URI=(
56 http://www.busybox.net/downloads/${SRCFILE}
57 mirror://${PNAME}/${SRCFILE}
58 mirror://${PNAME}/config-${CFG_CVS_REV}
59 mirror://${PNAME}/udhcpc.sh-${UDHCPC_CVS_REV}
60 mirror://${PNAME}/de.kmap.gz
61 mirror://${PNAME}/mdev.rc-${MDEVRC_CVS_REV}
62 mirror://${PNAME}/mdev.conf-${MDEVCONF_CVS_REV}
63 mirror://${PNAME}/dvbdev.sh
64 mirror://${PNAME}/ide_links.sh
65 mirror://${PNAME}/usbdev.sh
66 mirror://${PNAME}/usbdisk_link.sh
67 mirror://${PNAME}/syslogd.rc-${SYSLOGD_CVS_REV}
68 mirror://${PNAME}/splash-functions.rc-${SPLASHRC_CVS_REV}
69 mirror://${PNAME}/splash.conf-${SPLASHCONF_CVS_REV}
70 mirror://${PNAME}/${PNAME}-1.15.3-flags.patch
71 mirror://${PNAME}/${PNAME}-${PVER}-fbsplash-tykef-1.0.patch
72 http://dev.gentoo.org/~spock/projects/gensplash/current/${MISC_SRCFILE}
73 mirror://${PNAME}/${MISC_SRCFILE}
74 mirror://${PNAME}/${SPLASHTHEME_SRCFILE}
75 mirror://${PNAME}/${PNAME}-1.18.2-tar.patch
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 # fix tar issues: autodetection of compression modes - fixed with 1.18.3
88 # see: http://lists.busybox.net/pipermail/busybox/2011-February/074737.html
89 mpatch ${PNAME}-1.18.2-tar.patch || die
90
91 # magellan patches
92 # remove broken cflags
93 mpatch ${PNAME}-1.15.3-flags.patch || die
94
95 # enhanced fbsplash from tykef
96 # http://tykef.havlinda.net/programovani/fbsplash/
97 mpatch ${PNAME}-${PVER}-fbsplash-tykef-1.0.patch || die
98
99 # using a custom config
100 cp ${SOURCEDIR}/${PNAME}/config-${CFG_CVS_REV} .config || die
101
102 # disable static linking atm, broken with glibc-2.12
103 sed -i 's/.*\(CONFIG_STATIC\).*/#\ \1 is not set/' .config || die
104 }
105
106 src_compile()
107 {
108 cd ${SRCDIR}
109
110 make oldconfig || die
111 mmake || die
112
113 # create a busybox.links file
114 HOSTCC=gcc sh applets/busybox.mkll | sort > busybox.links || die
115
116 # fix missing applet symlinks
117 echo "/bin/du" >> busybox.links || die
118
119 # do not use ash as default sh, we want bin/bash
120 sed -i '/bin\/sh/d' busybox.links || die
121
122 # use poweroff as default halt command
123 sed -i '/sbin\/halt/d' busybox.links || die
124 echo -e '#!/bin/sh\n/sbin/poweroff $*' > halt.sh || 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 minstallrc mdev.rc-${MDEVRC_CVS_REV} mdev || die
152 minstalldir /etc || die
153 minstallfile -s mdev.conf-${MDEVCONF_CVS_REV} /etc/mdev.conf || die
154
155 # install mdev-helpers
156 minstalldir /lib/mdev || die
157 minstallexec -s dvbdev.sh /lib/mdev/devbdev || die
158 minstallexec -s ide_links.sh /lib/mdev/ide_links || die
159 minstallexec -s usbdev.sh /lib/mdev/usbdev || die
160 minstallexec -s usbdisk_link.sh /lib/mdev/usbdisk_link || die
161
162 # install syslogd rc script
163 minstallrc syslogd.rc-${SYSLOGD_CVS_REV} syslogd || 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 mkfifo ${BINDIR}/etc/splash/fbfifo || die
170
171 # install fbres for splash
172 minstallexec ${MISC_SRCDIR}/fbres || die
173
174 # install fbsplash theme
175 cd ${SPLASHTHEME_SRCDIR}
176 make DESTDIR=${BINDIR} install || die
177 # set mcore theme as default
178 mlink mcore /etc/splash/themes/default || die
179
180 # disable config_protection for themes
181 minstalldir /etc/env.d || die
182 echo "CONFIG_PROTECT_MASK=/etc/splash/themes" > ${BINDIR}/etc/env.d/15splash || die
183 }
184
185 postinstall()
186 {
187 if [[ ! -p ${MROOT}/etc/splash/fbfifo ]]
188 then
189 mkfifo ${MROOT}/etc/splash/fbfifo
190 fi
191
192 mstartservice syslogd
193 }
194
195 postremove()
196 {
197 mstopservice syslogd
198 }