Magellan Linux

Annotation of /smage/trunk/core/busybox/busybox-1.17.4-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 964 - (hide annotations) (download)
Fri Dec 10 23:09:06 2010 UTC (13 years, 5 months ago) by niro
File size: 3230 byte(s)
-fixed mdev.conf issue
1 niro 963 # $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="r3"
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.2
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-${MDEVCONF_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    
101     minstalldir /sbin || die
102     minstallexec halt.sh /sbin/halt || die
103    
104     minstalldir /usr/share/busybox || die
105     minstallfile busybox.links /usr/share/busybox || die
106    
107     minstalldir /usr/share/busybox/keymaps || die
108     minstallfile de.kmap /usr/share/busybox/keymaps || die
109    
110     minstalldir /usr/share/udhcpc || die
111     minstallexec -s udhcpc.sh-${UDHCPC_CVS_REV} /usr/share/udhcpc/default.script || die
112    
113     minstallrc mdev.rc-${MDEVCONF_CVS_REV} mdev || die
114     minstalldir /etc || die
115 niro 964 minstallfile -s mdev.conf-${MDEVCONF_CVS_REV} /etc/mdev.conf || die
116 niro 963
117     # install mdev-helpers
118     minstalldir /lib/mdev || die
119     minstallexec -s dvbdev.sh /lib/mdev/devbdev || die
120     minstallexec -s ide_links.sh /lib/mdev/ide_links || die
121     minstallexec -s usbdev.sh /lib/mdev/usbdev || die
122     minstallexec -s usbdisk_link.sh /lib/mdev/usbdisk_link || die
123    
124     # install syslogd rc script
125     minstallrc syslogd.rc-${SYSLOGD_CVS_REV} syslogd || die
126     }
127    
128     postinstall()
129     {
130     mstartservice syslogd
131     }
132    
133     postremove()
134     {
135     mstopservice syslogd
136     }