summaryrefslogtreecommitdiff
path: root/busybox/busybox_1.00-rc3.oe
blob: 211717730f9426118696a2ea881fb93cf089aba6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
DESCRIPTION = "BusyBox version ${PV}. \
BusyBox combines tiny versions of many common UNIX utilities into a single \
small executable. It provides minimalist replacements for most of the \
utilities you usually find in GNU fileutils, shellutils, etc. The utilities \
in BusyBox generally have fewer options than their full-featured GNU \
cousins; however, the options that are included provide the expected \
functionality and behave very much like their GNU counterparts. BusyBox \
provides a fairly complete POSIX environment for any small or embedded \
system."
HOMEPAGE = "http://www.busybox.net"
LICENSE = "GPL"
SECTION = "base"
PRIORITY = "required"
PR = "r10"

#	file://busybox-1.00-pre10-fuser.patch;patch=1
SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
           file://HEAD-20040829.patch;patch=1 \
           file://add-getkey-applet.patch;patch=1 \
	   file://awk2.patch;patch=1 \
	   file://udhcpscript.patch;patch=1 \
	   file://dhcpretrytime.patch;patch=1 \
           file://defconfig \
           file://busybox-cron \
	   file://busybox-httpd \
	   file://busybox-udhcpd \
	   file://syslog \
           file://hwclock.sh"
	   
S = "${WORKDIR}/busybox-${PV}"

export EXTRA_CFLAGS = "${CFLAGS}"
EXTRA_OEMAKE_append = " CROSS=${HOST_PREFIX}"
FILES_${PN} += " ${datadir}/udhcpc"

inherit cml1 update-rc.d

INITSCRIPT_NAME = "syslog"
INITSCRIPT_PARAMS = "defaults"

do_configure () {
	install -m 0644 ${WORKDIR}/defconfig ${S}/.config
	cml1_do_configure
}

do_compile () {
	unset CFLAGS
	base_do_compile
}

do_install () {
	install -d ${D}/etc/init.d
	oe_runmake 'PREFIX=${D}' install
	install -m 0755 ${WORKDIR}/syslog ${D}/etc/init.d/
	if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then 
		install -m 0755 ${WORKDIR}/busybox-cron ${D}/etc/init.d/
	fi
	if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then 
		install -m 0755 ${WORKDIR}/busybox-httpd ${D}/etc/init.d/
	fi
	if grep "CONFIG_UDHCPD=y" ${WORKDIR}/defconfig; then 
		install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}/etc/init.d/
	fi
	if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then 
		install -m 0755 ${WORKDIR}/hwclock.sh ${D}/etc/init.d/hwclock.sh
	fi
	if grep "CONFIG_UDHCPC=y" ${WORKDIR}/defconfig; then 
		install -d ${D}${datadir}/udhcpc
		install -m 0755 ${S}/examples/udhcp/simple.script ${D}${datadir}/udhcpc/default.script
	fi
}