Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1215 - (show annotations) (download)
Sat Jan 29 12:26:06 2011 UTC (13 years, 3 months ago) by niro
File size: 4735 byte(s)
-provide more virtuals
1 # $Id: busybox-1.15.3-r3.smage2 546 2010-05-08 10:58:18Z niro $
2
3 PNAME="busybox"
4 PVER="1.17.4"
5 PBUILD="r6"
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.2
37
38 SRCFILE="${PNAME}-${PVER}.tar.bz2"
39 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
40
41 MISC_PVER="0.1.8"
42 MISC_SRCFILE="miscsplashutils-${MISC_PVER}.tar.bz2"
43 MISC_SRCDIR="${BUILDDIR}/miscsplashutils-${MISC_PVER}"
44
45 SPLASHTHEME_PVER="1.0"
46 SPLASHTHEME_SRCFILE="mcore-theme-busybox-${SPLASHTHEME_PVER}.tar.bz2"
47 SPLASHTHEME_SRCDIR="${BUILDDIR}/mcore-theme-busybox-${SPLASHTHEME_PVER}"
48
49 sminclude mtools
50
51 SRC_URI=(
52 http://www.busybox.net/downloads/${SRCFILE}
53 mirror://${PNAME}/${SRCFILE}
54 mirror://${PNAME}/config-${CFG_CVS_REV}
55 mirror://${PNAME}/udhcpc.sh-${UDHCPC_CVS_REV}
56 mirror://${PNAME}/de.kmap.gz
57 mirror://${PNAME}/mdev.rc-${MDEVRC_CVS_REV}
58 mirror://${PNAME}/mdev.conf-${MDEVCONF_CVS_REV}
59 mirror://${PNAME}/dvbdev.sh
60 mirror://${PNAME}/ide_links.sh
61 mirror://${PNAME}/usbdev.sh
62 mirror://${PNAME}/usbdisk_link.sh
63 mirror://${PNAME}/syslogd.rc-${SYSLOGD_CVS_REV}
64 mirror://${PNAME}/splash-functions.rc
65 mirror://${PNAME}/splash.conf
66 mirror://${PNAME}/${PNAME}-1.15.3-flags.patch
67 mirror://${PNAME}/${PNAME}-${PVER}-fbsplash-tykef-1.0.patch
68 http://dev.gentoo.org/~spock/projects/gensplash/current/${MISC_SRCFILE}
69 mirror://${PNAME}/${MISC_SRCFILE}
70 mirror://${PNAME}/${SPLASHTHEME_SRCFILE}
71 )
72
73 src_prepare()
74 {
75 munpack ${SRCFILE} || die
76 munpack de.kmap.gz ${SRCDIR} || die
77 munpack ${MISC_SRCFILE} || die
78 munpack ${SPLASHTHEME_SRCFILE} || die
79 cd ${SRCDIR}
80
81 # official patches
82
83 # magellan patches
84 # remove broken cflags
85 mpatch ${PNAME}-1.15.3-flags.patch || die
86
87 # enhanced fbsplash from tykef
88 # http://tykef.havlinda.net/programovani/fbsplash/
89 mpatch ${PNAME}-${PVER}-fbsplash-tykef-1.0.patch || die
90
91 # using a custom config
92 cp ${SOURCEDIR}/${PNAME}/config-${CFG_CVS_REV} .config || die
93
94 # disable static linking atm, broken with glibc-2.12
95 sed -i 's/.*\(CONFIG_STATIC\).*/#\ \1 is not set/' .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 cd ${MISC_SRCDIR}
119 mmake fbres || die
120 }
121
122 src_install()
123 {
124 cd ${SRCDIR}
125
126 minstalldir /bin || die
127 minstallexec busybox /bin || die
128 # set suid bit for suid applets like su
129 mchmod +s /bin/busybox || die
130
131 minstalldir /sbin || die
132 minstallexec halt.sh /sbin/halt || die
133
134 minstalldir /usr/share/busybox || die
135 minstallfile busybox.links /usr/share/busybox || die
136
137 minstalldir /usr/share/busybox/keymaps || die
138 minstallfile de.kmap /usr/share/busybox/keymaps || die
139
140 minstalldir /usr/share/udhcpc || die
141 minstallexec -s udhcpc.sh-${UDHCPC_CVS_REV} /usr/share/udhcpc/default.script || die
142
143 minstallrc mdev.rc-${MDEVRC_CVS_REV} mdev || die
144 minstalldir /etc || die
145 minstallfile -s mdev.conf-${MDEVCONF_CVS_REV} /etc/mdev.conf || die
146
147 # install mdev-helpers
148 minstalldir /lib/mdev || die
149 minstallexec -s dvbdev.sh /lib/mdev/devbdev || die
150 minstallexec -s ide_links.sh /lib/mdev/ide_links || die
151 minstallexec -s usbdev.sh /lib/mdev/usbdev || die
152 minstallexec -s usbdisk_link.sh /lib/mdev/usbdisk_link || die
153
154 # install syslogd rc script
155 minstallrc syslogd.rc-${SYSLOGD_CVS_REV} syslogd || die
156
157 # install splash-functions
158 minstallrc splash-functions.rc splash-functions || die
159 minstalldir /etc/splash || die
160 minstallfile -s splash.conf /etc/splash/splash.conf || die
161 mkfifo ${BINDIR}/etc/splash/fbfifo || die
162
163 # install fbres for splash
164 minstallexec ${MISC_SRCDIR}/fbres || die
165
166 # install fbsplash theme
167 cd ${SPLASHTHEME_SRCDIR}
168 make DESTDIR=${BINDIR} install || die
169 # set mcore theme as default
170 mlink mcore /etc/splash/themes/default || die
171 }
172
173 postinstall()
174 {
175 if [[ ! -p /etc/splash/fbfifo ]]
176 then
177 mkfifo /etc/splash/fbfifo
178 fi
179
180 mstartservice syslogd
181 }
182
183 postremove()
184 {
185 mstopservice syslogd
186 }