Magellan Linux

Contents of /smage/branches/alx-0_6_0/core/busybox/busybox-1.17.4-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1743 - (show annotations) (download)
Mon Apr 11 14:47:22 2011 UTC (13 years, 2 months ago) by niro
File size: 2937 byte(s)
auto added: ver bump to 1.17.4-r1
1 # $Id$
2
3 PNAME="busybox"
4 PVER="1.17.4"
5 PBUILD="r1"
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/syslog"
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 # syslogd.rc cvs revision
32 SYSLOGD_CVS_REV=1.3
33
34 SRCFILE="${PNAME}-${PVER}.tar.bz2"
35 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
36
37 sminclude mtools alx
38
39 SRC_URI=(
40 http://www.busybox.net/downloads/${SRCFILE}
41 mirror://${PNAME}/${SRCFILE}
42 mirror://${PNAME}/config-${CFG_CVS_REV}
43 mirror://${PNAME}/udhcpc.sh-${UDHCPC_CVS_REV}
44 mirror://${PNAME}/de.kmap.gz
45 mirror://${PNAME}/syslogd.rc-${SYSLOGD_CVS_REV}
46 mirror://${PNAME}/${PNAME}-1.15.3-flags.patch
47 mirror://${PNAME}/${PNAME}-1.18.2-tar.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 # fix tar issues: autodetection of compression modes - fixed with 1.18.3
58 # see: http://lists.busybox.net/pipermail/busybox/2011-February/074737.html
59 mpatch ${PNAME}-1.18.2-tar.patch || die
60
61 # magellan patches
62 # remove broken cflags
63 mpatch ${PNAME}-1.15.3-flags.patch || die
64
65 # using a custom config
66 cp ${SOURCEDIR}/${PNAME}/config-${CFG_CVS_REV} .config || die
67
68 # disable static linking atm, broken with glibc-2.12
69 sed -i 's/.*\(CONFIG_STATIC\).*/#\ \1 is not set/' .config || die
70 }
71
72 src_compile()
73 {
74 cd ${SRCDIR}
75
76 make oldconfig || die
77 mmake || die
78
79 # create a busybox.links file
80 HOSTCC=gcc sh applets/busybox.mkll | sort > busybox.links || die
81
82 # fix missing applet symlinks
83 echo "/bin/du" >> busybox.links || die
84
85 # do not use ash as default sh, we want bin/bash
86 sed -i '/bin\/sh/d' busybox.links || die
87
88 # use poweroff as default halt command
89 sed -i '/sbin\/halt/d' busybox.links || die
90 echo -e '#!/bin/sh\n/sbin/poweroff $*' > halt.sh || die
91 }
92
93 src_install()
94 {
95 cd ${SRCDIR}
96
97 minstalldir /bin || die
98 minstallexec busybox /bin || die
99 # set suid bit for suid applets like su
100 mchmod +s /bin/busybox || die
101
102 minstalldir /sbin || die
103 minstallexec halt.sh /sbin/halt || die
104
105 minstalldir /usr/share/busybox || die
106 minstallfile busybox.links /usr/share/busybox || die
107 # remove some applet symlinks
108 sed -i "/\/usr\/bin\/patch/d" ${BINDIR}/usr/share/busybox/busybox.links || die
109
110 minstalldir /usr/share/busybox/keymaps || die
111 minstallfile de.kmap /usr/share/busybox/keymaps || die
112
113 minstalldir /usr/share/udhcpc || die
114 minstallexec -s udhcpc.sh-${UDHCPC_CVS_REV} /usr/share/udhcpc/default.script || die
115
116 # install syslogd rc script
117 minstallrc syslogd.rc-${SYSLOGD_CVS_REV} syslogd || die
118 }
119
120 postinstall()
121 {
122 mstartservice syslogd
123 }
124
125 postremove()
126 {
127 mstopservice syslogd
128 }