Contents of /smage/trunk/core/busybox/busybox-1.17.4-r6.smage2
Parent Directory | Revision Log
Revision 1190 -
(show annotations)
(download)
Fri Jan 28 22:21:57 2011 UTC (13 years, 3 months ago) by niro
File size: 4658 byte(s)
Fri Jan 28 22:21:57 2011 UTC (13 years, 3 months ago) by niro
File size: 4658 byte(s)
-fixed missing unpack
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 | |
22 | # busbox config CVS revision |
23 | CFG_CVS_REV=1.13 |
24 | # udhcpc client script CVS revision |
25 | UDHCPC_CVS_REV=1.1 |
26 | # mdev.r cvs revision |
27 | MDEVRC_CVS_REV=1.3 |
28 | # mdev.conf cvs revision |
29 | MDEVCONF_CVS_REV=1.2 |
30 | # syslogd.rc cvs revision |
31 | SYSLOGD_CVS_REV=1.2 |
32 | |
33 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
34 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
35 | |
36 | MISC_PVER="0.1.8" |
37 | MISC_SRCFILE="miscsplashutils-${MISC_PVER}.tar.bz2" |
38 | MISC_SRCDIR="${BUILDDIR}/miscsplashutils-${MISC_PVER}" |
39 | |
40 | SPLASHTHEME_PVER="1.0" |
41 | SPLASHTHEME_SRCFILE="mcore-theme-busybox-${SPLASHTHEME_PVER}.tar.bz2" |
42 | SPLASHTHEME_SRCDIR="${BUILDDIR}/mcore-theme-busybox-${SPLASHTHEME_PVER}" |
43 | |
44 | sminclude mtools |
45 | |
46 | SRC_URI=( |
47 | http://www.busybox.net/downloads/${SRCFILE} |
48 | mirror://${PNAME}/${SRCFILE} |
49 | mirror://${PNAME}/config-${CFG_CVS_REV} |
50 | mirror://${PNAME}/udhcpc.sh-${UDHCPC_CVS_REV} |
51 | mirror://${PNAME}/de.kmap.gz |
52 | mirror://${PNAME}/mdev.rc-${MDEVRC_CVS_REV} |
53 | mirror://${PNAME}/mdev.conf-${MDEVCONF_CVS_REV} |
54 | mirror://${PNAME}/dvbdev.sh |
55 | mirror://${PNAME}/ide_links.sh |
56 | mirror://${PNAME}/usbdev.sh |
57 | mirror://${PNAME}/usbdisk_link.sh |
58 | mirror://${PNAME}/syslogd.rc-${SYSLOGD_CVS_REV} |
59 | mirror://${PNAME}/splash-functions.rc |
60 | mirror://${PNAME}/splash.conf |
61 | mirror://${PNAME}/${PNAME}-1.15.3-flags.patch |
62 | mirror://${PNAME}/${PNAME}-${PVER}-fbsplash-tykef-1.0.patch |
63 | http://dev.gentoo.org/~spock/projects/gensplash/current/${MISC_SRCFILE} |
64 | mirror://${PNAME}/${MISC_SRCFILE} |
65 | mirror://${PNAME}/${SPLASHTHEME_SRCFILE} |
66 | ) |
67 | |
68 | src_prepare() |
69 | { |
70 | munpack ${SRCFILE} || die |
71 | munpack de.kmap.gz ${SRCDIR} || die |
72 | munpack ${MISC_SRCFILE} || die |
73 | munpack ${SPLASHTHEME_SRCFILE} || die |
74 | cd ${SRCDIR} |
75 | |
76 | # official patches |
77 | |
78 | # magellan patches |
79 | # remove broken cflags |
80 | mpatch ${PNAME}-1.15.3-flags.patch || die |
81 | |
82 | # enhanced fbsplash from tykef |
83 | # http://tykef.havlinda.net/programovani/fbsplash/ |
84 | mpatch ${PNAME}-${PVER}-fbsplash-tykef-1.0.patch || die |
85 | |
86 | # using a custom config |
87 | cp ${SOURCEDIR}/${PNAME}/config-${CFG_CVS_REV} .config || die |
88 | |
89 | # disable static linking atm, broken with glibc-2.12 |
90 | sed -i 's/.*\(CONFIG_STATIC\).*/#\ \1 is not set/' .config || die |
91 | } |
92 | |
93 | src_compile() |
94 | { |
95 | cd ${SRCDIR} |
96 | |
97 | make oldconfig || die |
98 | mmake || die |
99 | |
100 | # create a busybox.links file |
101 | HOSTCC=gcc sh applets/busybox.mkll | sort > busybox.links || die |
102 | |
103 | # fix missing applet symlinks |
104 | echo "/bin/du" >> busybox.links || die |
105 | |
106 | # do not use ash as default sh, we want bin/bash |
107 | sed -i '/bin\/sh/d' busybox.links || die |
108 | |
109 | # use poweroff as default halt command |
110 | sed -i '/sbin\/halt/d' busybox.links || die |
111 | echo -e '#!/bin/sh\n/sbin/poweroff $*' > halt.sh || die |
112 | |
113 | cd ${MISC_SRCDIR} |
114 | mmake fbres || die |
115 | } |
116 | |
117 | src_install() |
118 | { |
119 | cd ${SRCDIR} |
120 | |
121 | minstalldir /bin || die |
122 | minstallexec busybox /bin || die |
123 | # set suid bit for suid applets like su |
124 | mchmod +s /bin/busybox || die |
125 | |
126 | minstalldir /sbin || die |
127 | minstallexec halt.sh /sbin/halt || die |
128 | |
129 | minstalldir /usr/share/busybox || die |
130 | minstallfile busybox.links /usr/share/busybox || die |
131 | |
132 | minstalldir /usr/share/busybox/keymaps || die |
133 | minstallfile de.kmap /usr/share/busybox/keymaps || die |
134 | |
135 | minstalldir /usr/share/udhcpc || die |
136 | minstallexec -s udhcpc.sh-${UDHCPC_CVS_REV} /usr/share/udhcpc/default.script || die |
137 | |
138 | minstallrc mdev.rc-${MDEVRC_CVS_REV} mdev || die |
139 | minstalldir /etc || die |
140 | minstallfile -s mdev.conf-${MDEVCONF_CVS_REV} /etc/mdev.conf || die |
141 | |
142 | # install mdev-helpers |
143 | minstalldir /lib/mdev || die |
144 | minstallexec -s dvbdev.sh /lib/mdev/devbdev || die |
145 | minstallexec -s ide_links.sh /lib/mdev/ide_links || die |
146 | minstallexec -s usbdev.sh /lib/mdev/usbdev || die |
147 | minstallexec -s usbdisk_link.sh /lib/mdev/usbdisk_link || die |
148 | |
149 | # install syslogd rc script |
150 | minstallrc syslogd.rc-${SYSLOGD_CVS_REV} syslogd || die |
151 | |
152 | # install splash-functions |
153 | minstallrc splash-functions.rc splash-functions || die |
154 | minstalldir /etc/splash || die |
155 | minstallfile -s splash.conf /etc/splash/splash.conf || die |
156 | mkfifo ${BINDIR}/etc/splash/fbfifo || die |
157 | |
158 | # install fbres for splash |
159 | minstallexec ${MISC_SRCDIR}/fbres || die |
160 | |
161 | # install fbsplash theme |
162 | cd ${SPLASHTHEME_SRCDIR} |
163 | make DESTDIR=${BINDIR} install || die |
164 | # set mcore theme as default |
165 | mlink mcore /etc/splash/themes/default || die |
166 | } |
167 | |
168 | postinstall() |
169 | { |
170 | if [[ ! -p /etc/splash/fbfifo ]] |
171 | then |
172 | mkfifo /etc/splash/fbfifo |
173 | fi |
174 | |
175 | mstartservice syslogd |
176 | } |
177 | |
178 | postremove() |
179 | { |
180 | mstopservice syslogd |
181 | } |