Annotation of /smage/trunk/core/busybox/busybox-1.17.4-r7.smage2
Parent Directory | Revision Log
Revision 1287 -
(hide annotations)
(download)
Sun Feb 6 22:40:45 2011 UTC (13 years, 3 months ago) by niro
File size: 4941 byte(s)
Sun Feb 6 22:40:45 2011 UTC (13 years, 3 months ago) by niro
File size: 4941 byte(s)
-fixed splash-functions, added theme-1.1, fixed syslog.rc, use MROOT in postinstall
1 | niro | 1287 | # $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="r7" | ||
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 | ) | ||
76 | |||
77 | src_prepare() | ||
78 | { | ||
79 | munpack ${SRCFILE} || die | ||
80 | munpack de.kmap.gz ${SRCDIR} || die | ||
81 | munpack ${MISC_SRCFILE} || die | ||
82 | munpack ${SPLASHTHEME_SRCFILE} || die | ||
83 | cd ${SRCDIR} | ||
84 | |||
85 | # official patches | ||
86 | |||
87 | # magellan patches | ||
88 | # remove broken cflags | ||
89 | mpatch ${PNAME}-1.15.3-flags.patch || die | ||
90 | |||
91 | # enhanced fbsplash from tykef | ||
92 | # http://tykef.havlinda.net/programovani/fbsplash/ | ||
93 | mpatch ${PNAME}-${PVER}-fbsplash-tykef-1.0.patch || die | ||
94 | |||
95 | # using a custom config | ||
96 | cp ${SOURCEDIR}/${PNAME}/config-${CFG_CVS_REV} .config || die | ||
97 | |||
98 | # disable static linking atm, broken with glibc-2.12 | ||
99 | sed -i 's/.*\(CONFIG_STATIC\).*/#\ \1 is not set/' .config || die | ||
100 | } | ||
101 | |||
102 | src_compile() | ||
103 | { | ||
104 | cd ${SRCDIR} | ||
105 | |||
106 | make oldconfig || die | ||
107 | mmake || die | ||
108 | |||
109 | # create a busybox.links file | ||
110 | HOSTCC=gcc sh applets/busybox.mkll | sort > busybox.links || die | ||
111 | |||
112 | # fix missing applet symlinks | ||
113 | echo "/bin/du" >> busybox.links || die | ||
114 | |||
115 | # do not use ash as default sh, we want bin/bash | ||
116 | sed -i '/bin\/sh/d' busybox.links || die | ||
117 | |||
118 | # use poweroff as default halt command | ||
119 | sed -i '/sbin\/halt/d' busybox.links || die | ||
120 | echo -e '#!/bin/sh\n/sbin/poweroff $*' > halt.sh || die | ||
121 | |||
122 | cd ${MISC_SRCDIR} | ||
123 | mmake fbres || die | ||
124 | } | ||
125 | |||
126 | src_install() | ||
127 | { | ||
128 | cd ${SRCDIR} | ||
129 | |||
130 | minstalldir /bin || die | ||
131 | minstallexec busybox /bin || die | ||
132 | # set suid bit for suid applets like su | ||
133 | mchmod +s /bin/busybox || die | ||
134 | |||
135 | minstalldir /sbin || die | ||
136 | minstallexec halt.sh /sbin/halt || die | ||
137 | |||
138 | minstalldir /usr/share/busybox || die | ||
139 | minstallfile busybox.links /usr/share/busybox || die | ||
140 | |||
141 | minstalldir /usr/share/busybox/keymaps || die | ||
142 | minstallfile de.kmap /usr/share/busybox/keymaps || die | ||
143 | |||
144 | minstalldir /usr/share/udhcpc || die | ||
145 | minstallexec -s udhcpc.sh-${UDHCPC_CVS_REV} /usr/share/udhcpc/default.script || die | ||
146 | |||
147 | minstallrc mdev.rc-${MDEVRC_CVS_REV} mdev || die | ||
148 | minstalldir /etc || die | ||
149 | minstallfile -s mdev.conf-${MDEVCONF_CVS_REV} /etc/mdev.conf || die | ||
150 | |||
151 | # install mdev-helpers | ||
152 | minstalldir /lib/mdev || die | ||
153 | minstallexec -s dvbdev.sh /lib/mdev/devbdev || die | ||
154 | minstallexec -s ide_links.sh /lib/mdev/ide_links || die | ||
155 | minstallexec -s usbdev.sh /lib/mdev/usbdev || die | ||
156 | minstallexec -s usbdisk_link.sh /lib/mdev/usbdisk_link || die | ||
157 | |||
158 | # install syslogd rc script | ||
159 | minstallrc syslogd.rc-${SYSLOGD_CVS_REV} syslogd || 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 | mkfifo ${BINDIR}/etc/splash/fbfifo || die | ||
166 | |||
167 | # install fbres for splash | ||
168 | minstallexec ${MISC_SRCDIR}/fbres || die | ||
169 | |||
170 | # install fbsplash theme | ||
171 | cd ${SPLASHTHEME_SRCDIR} | ||
172 | make DESTDIR=${BINDIR} install || die | ||
173 | # set mcore theme as default | ||
174 | mlink mcore /etc/splash/themes/default || die | ||
175 | } | ||
176 | |||
177 | postinstall() | ||
178 | { | ||
179 | if [[ ! -p ${MROOT}/etc/splash/fbfifo ]] | ||
180 | then | ||
181 | mkfifo ${MROOT}/etc/splash/fbfifo | ||
182 | fi | ||
183 | |||
184 | mstartservice syslogd | ||
185 | } | ||
186 | |||
187 | postremove() | ||
188 | { | ||
189 | mstopservice syslogd | ||
190 | } |