Contents of /smage/trunk/core/busybox/busybox-1.17.4-r5.smage2
Parent Directory | Revision Log
Revision 1048 -
(show annotations)
(download)
Fri Dec 17 16:29:03 2010 UTC (13 years, 9 months ago) by niro
File size: 3298 byte(s)
Fri Dec 17 16:29:03 2010 UTC (13 years, 9 months ago) by niro
File size: 3298 byte(s)
-set suid bit for busybox
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="r5" |
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.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 | sminclude mtools |
37 | |
38 | SRC_URI=( |
39 | http://www.busybox.net/downloads/${SRCFILE} |
40 | mirror://${PNAME}/${SRCFILE} |
41 | mirror://${PNAME}/config-${CFG_CVS_REV} |
42 | mirror://${PNAME}/udhcpc.sh-${UDHCPC_CVS_REV} |
43 | mirror://${PNAME}/de.kmap.gz |
44 | mirror://${PNAME}/mdev.rc-${MDEVRC_CVS_REV} |
45 | mirror://${PNAME}/mdev.conf-${MDEVCONF_CVS_REV} |
46 | mirror://${PNAME}/dvbdev.sh |
47 | mirror://${PNAME}/ide_links.sh |
48 | mirror://${PNAME}/usbdev.sh |
49 | mirror://${PNAME}/usbdisk_link.sh |
50 | mirror://${PNAME}/syslogd.rc-${SYSLOGD_CVS_REV} |
51 | mirror://${PNAME}/${PNAME}-1.15.3-flags.patch |
52 | ) |
53 | |
54 | src_prepare() |
55 | { |
56 | munpack ${SRCFILE} || die |
57 | munpack de.kmap.gz ${SRCDIR} || die |
58 | cd ${SRCDIR} |
59 | |
60 | # official patches |
61 | |
62 | # magellan patches |
63 | # remove broken cflags |
64 | mpatch ${PNAME}-1.15.3-flags.patch || die |
65 | |
66 | # using a custom config |
67 | cp ${SOURCEDIR}/${PNAME}/config-${CFG_CVS_REV} .config || die |
68 | |
69 | # disable static linking atm, broken with glibc-2.12 |
70 | sed -i 's/.*\(CONFIG_STATIC\).*/#\ \1 is not set/' .config || die |
71 | } |
72 | |
73 | src_compile() |
74 | { |
75 | cd ${SRCDIR} |
76 | |
77 | make oldconfig || die |
78 | mmake || die |
79 | |
80 | # create a busybox.links file |
81 | HOSTCC=gcc sh applets/busybox.mkll | sort > busybox.links || die |
82 | |
83 | # fix missing applet symlinks |
84 | echo "/bin/du" >> busybox.links || die |
85 | |
86 | # do not use ash as default sh, we want bin/bash |
87 | sed -i '/bin\/sh/d' busybox.links || die |
88 | |
89 | # use poweroff as default halt command |
90 | sed -i '/sbin\/halt/d' busybox.links || die |
91 | echo -e '#!/bin/sh\n/sbin/poweroff $*' > halt.sh || die |
92 | } |
93 | |
94 | src_install() |
95 | { |
96 | cd ${SRCDIR} |
97 | |
98 | minstalldir /bin || die |
99 | minstallexec busybox /bin || die |
100 | # set suid bit for suid applets like su |
101 | mchmod +s /bin/busybox || die |
102 | |
103 | minstalldir /sbin || die |
104 | minstallexec halt.sh /sbin/halt || die |
105 | |
106 | minstalldir /usr/share/busybox || die |
107 | minstallfile busybox.links /usr/share/busybox || die |
108 | |
109 | minstalldir /usr/share/busybox/keymaps || die |
110 | minstallfile de.kmap /usr/share/busybox/keymaps || die |
111 | |
112 | minstalldir /usr/share/udhcpc || die |
113 | minstallexec -s udhcpc.sh-${UDHCPC_CVS_REV} /usr/share/udhcpc/default.script || die |
114 | |
115 | minstallrc mdev.rc-${MDEVRC_CVS_REV} mdev || die |
116 | minstalldir /etc || die |
117 | minstallfile -s mdev.conf-${MDEVCONF_CVS_REV} /etc/mdev.conf || die |
118 | |
119 | # install mdev-helpers |
120 | minstalldir /lib/mdev || die |
121 | minstallexec -s dvbdev.sh /lib/mdev/devbdev || die |
122 | minstallexec -s ide_links.sh /lib/mdev/ide_links || die |
123 | minstallexec -s usbdev.sh /lib/mdev/usbdev || die |
124 | minstallexec -s usbdisk_link.sh /lib/mdev/usbdisk_link || die |
125 | |
126 | # install syslogd rc script |
127 | minstallrc syslogd.rc-${SYSLOGD_CVS_REV} syslogd || die |
128 | } |
129 | |
130 | postinstall() |
131 | { |
132 | mstartservice syslogd |
133 | } |
134 | |
135 | postremove() |
136 | { |
137 | mstopservice syslogd |
138 | } |