Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 962 - (show annotations) (download)
Fri Dec 10 22:52:22 2010 UTC (13 years, 4 months ago) by niro
File size: 3055 byte(s)
auto added: ver bump to 1.17.4-r2
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="r2"
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.12
24 # udhcpc client script CVS revision
25 UDHCPC_CVS_REV=1.1
26 # mdev.conf cvs revision
27 MDEVCONF_CVS_REV=1.2
28
29 SRCFILE="${PNAME}-${PVER}.tar.bz2"
30 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
31
32 sminclude mtools
33
34 SRC_URI=(
35 http://www.busybox.net/downloads/${SRCFILE}
36 mirror://${PNAME}/${SRCFILE}
37 mirror://${PNAME}/config-${CFG_CVS_REV}
38 mirror://${PNAME}/udhcpc.sh-${UDHCPC_CVS_REV}
39 mirror://${PNAME}/de.kmap.gz
40 mirror://${PNAME}/mdev.rc
41 mirror://${PNAME}/mdev.conf-${MDEVCONF_CVS_REV}
42 mirror://${PNAME}/dvbdev.sh
43 mirror://${PNAME}/ide_links.sh
44 mirror://${PNAME}/usbdev.sh
45 mirror://${PNAME}/usbdisk_link.sh
46 mirror://${PNAME}/syslogd.rc
47 mirror://${PNAME}/${PNAME}-1.15.3-flags.patch
48 )
49
50 src_prepare()
51 {
52 munpack ${SRCFILE} || die
53 munpack de.kmap.gz ${SRCDIR} || die
54 cd ${SRCDIR}
55
56 # official patches
57
58 # magellan patches
59 # remove broken cflags
60 mpatch ${PNAME}-1.15.3-flags.patch || die
61
62 # using a custom config
63 cp ${SOURCEDIR}/${PNAME}/config-${CFG_CVS_REV} .config || die
64
65 # disable static linking atm, broken with glibc-2.12
66 sed -i 's/.*\(CONFIG_STATIC\).*/#\ \1 is not set/' .config || die
67 }
68
69 src_compile()
70 {
71 cd ${SRCDIR}
72
73 make oldconfig || die
74 mmake || die
75
76 # create a busybox.links file
77 HOSTCC=gcc sh applets/busybox.mkll | sort > busybox.links || die
78
79 # fix missing applet symlinks
80 echo "/bin/du" >> busybox.links || die
81
82 # do not use ash as default sh, we want bin/bash
83 sed -i '/bin\/sh/d' busybox.links || die
84
85 # use poweroff as default halt command
86 sed -i '/sbin\/halt/d' busybox.links || die
87 echo -e '#!/bin/sh\n/sbin/poweroff $*' > halt.sh || die
88 }
89
90 src_install()
91 {
92 cd ${SRCDIR}
93
94 minstalldir /bin || die
95 minstallexec busybox /bin || die
96
97 minstalldir /sbin || die
98 minstallexec halt.sh /sbin/halt || die
99
100 minstalldir /usr/share/busybox || die
101 minstallfile busybox.links /usr/share/busybox || die
102
103 minstalldir /usr/share/busybox/keymaps || die
104 minstallfile de.kmap /usr/share/busybox/keymaps || die
105
106 minstalldir /usr/share/udhcpc || die
107 minstallexec -s udhcpc.sh-${UDHCPC_CVS_REV} /usr/share/udhcpc/default.script || die
108
109 minstallrc mdev.rc mdev || die
110 minstalldir /etc || die
111 minstallfile -s mdev.conf-${MDEVCONF_CVS_REV} /etc || die
112
113 # install mdev-helpers
114 minstalldir /lib/mdev || die
115 minstallexec -s dvbdev.sh /lib/mdev/devbdev || die
116 minstallexec -s ide_links.sh /lib/mdev/ide_links || die
117 minstallexec -s usbdev.sh /lib/mdev/usbdev || die
118 minstallexec -s usbdisk_link.sh /lib/mdev/usbdisk_link || die
119
120 # install syslogd rc script
121 minstallrc syslogd.rc syslogd || die
122 }
123
124 postinstall()
125 {
126 mstartservice syslogd
127 }
128
129 postremove()
130 {
131 mstopservice syslogd
132 }