Merge oe-devel@oe-devel.bkbits.net:packages
[openembedded.git] / busybox / switchbox_1.00.oe
1 DESCRIPTION = "SwitchBox version ${PV}. \
2 SwitchBox is a minimal version of BusyBox with just enough functionality \
3 to switch between different root filesystem options on an Unslung NSLU2 device."
4 HOMEPAGE = "http://www.busybox.net"
5 LICENSE = "GPL"
6 SECTION = "base"
7 PRIORITY = "required"
8 PR = "r2"
9
10 SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
11            file://defconfig \
12            file://linuxrc \
13            file://switchbox.patch;patch=1"
14            
15 S = "${WORKDIR}/busybox-${PV}"
16
17 python () {
18         # Don't build switchbox unless we're targeting an nslu2
19         if oe.data.getVar("MACHINE", d, 1) != "nslu2":
20                 raise oe.parse.SkipPackage("switchbox only builds for the Linksys NSLU2")
21 }
22
23 LDFLAGS =+ "-static"
24
25 export EXTRA_CFLAGS = "${CFLAGS}"
26 EXTRA_OEMAKE_append = " CROSS=${HOST_PREFIX}"
27
28 PACKAGES = "${PN}"
29 FILES_${PN} = "/"
30 FILES_${PN}-doc = ""
31 FILES_${PN}-dev = ""
32 FILES_${PN}-locale = ""
33
34 inherit cml1
35
36 do_configure () {
37         install -m 0644 ${WORKDIR}/defconfig ${S}/.config
38         cml1_do_configure
39 }
40
41 do_compile () {
42         unset CFLAGS
43         base_do_compile
44 }
45
46 do_install () {
47         oe_runmake 'PREFIX=${D}' install
48         install -m 0755 ${WORKDIR}/linuxrc ${D}/
49         mkdir -p ${D}/proc ${D}/mnt/tmpmnt
50 }