5 DEFAULT_PREFERENCE = "-1"
7 SRC_URI = "file://wget-long-options.patch;patch=1 \
11 install -m 0644 ${WORKDIR}/defconfig ${S}/.config.oe
13 echo "CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"" > ${S}/.config
14 echo "USING_CROSS_COMPILER=y" >> ${S}/.config
16 sed -e '/CROSS_COMPILER_PREFIX/d' \
17 -e '/USING_CROSS_COMPILER/d' \
18 '${S}/.config.oe' >>'${S}/.config'
23 install -d ${D}${sysconfdir}/init.d
24 oe_runmake "PREFIX=${D}" install
25 cp -pPR ${S}/_install/* ${D}/
27 # Move everything to /busybox (not supposed to end up in any package)
28 install -d ${D}/busybox
31 cp -dPr ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ${D}/busybox/
32 # Move the busybox binary back to /bin
33 install -d ${D}${base_bindir}
34 mv ${D}/busybox${base_bindir}/busybox ${D}${base_bindir}/
35 # Move back the sh symlink
36 test -h ${D}/busybox${base_bindir}/sh && mv ${D}/busybox${base_bindir}/sh ${D}${base_bindir}/
38 install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
39 install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
40 if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
41 # Move crond back to /usr/sbin/crond
42 install -d ${D}${sbindir}
43 mv ${D}/busybox${sbindir}/crond ${D}${sbindir}/
45 install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
47 if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then
48 # Move httpd back to /usr/sbin/httpd
49 install -d ${D}${sbindir}
50 mv ${D}/busybox${sbindir}/httpd ${D}${sbindir}/
52 install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/
53 install -d ${D}/srv/www
55 if grep "CONFIG_APP_UDHCPD=y" ${WORKDIR}/defconfig; then
56 # Move udhcpd back to /usr/sbin/udhcpd
57 install -d ${D}${sbindir}
58 mv ${D}/busybox${sbindir}/udhcpd ${D}${sbindir}/
60 install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/
62 if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then
63 # Move hwclock back to /sbin/hwclock
64 install -d ${D}${base_sbindir}
65 mv ${D}/busybox${base_sbindir}/hwclock ${D}${base_sbindir}/
67 install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/
69 if grep "CONFIG_APP_UDHCPC=y" ${WORKDIR}/defconfig; then
70 # Move dhcpc back to /usr/sbin/udhcpc
71 install -d ${D}${base_sbindir}
72 mv ${D}/busybox${base_sbindir}/udhcpc ${D}${base_sbindir}/
74 install -d ${D}${sysconfdir}/udhcpc.d
75 install -d ${D}${datadir}/udhcpc
76 install -m 0755 ${S}/examples/udhcp/simple.script ${D}${sysconfdir}/udhcpc.d/50default
77 install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script
80 install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
84 # This is so you can make busybox commit suicide - removing busybox with no other packages
85 # providing its files, this will make update-alternatives work, but the update-rc.d part
86 # for syslog, httpd and/or udhcpd will fail if there is no other package providing sh
87 tmpdir=`mktemp -d /tmp/busyboxrm-XXXXXX`
88 ln -s /bin/busybox $tmpdir/[
89 ln -s /bin/busybox $tmpdir/test
90 ln -s /bin/busybox $tmpdir/head
91 ln -s /bin/busybox $tmpdir/sh
92 ln -s /bin/busybox $tmpdir/basename
93 ln -s /bin/busybox $tmpdir/echo
94 ln -s /bin/busybox $tmpdir/mv
95 ln -s /bin/busybox $tmpdir/ln
96 ln -s /bin/busybox $tmpdir/dirname
97 ln -s /bin/busybox $tmpdir/rm
98 ln -s /bin/busybox $tmpdir/sed
99 ln -s /bin/busybox $tmpdir/sort
100 export PATH=$PATH:$tmpdir
101 while read link; do case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; bn=`basename $link`; sh /usr/bin/update-alternatives --remove $bn $to; done </etc/busybox.links