Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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