summaryrefslogtreecommitdiff
path: root/pcmcia-cs/pcmcia-cs_3.2.7.oe
blob: 0306e78743088f9632a1312aa3124f4ed74691eb (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
DESCRIPTION = "Utilities and system configuration files for the Linux PCMCIA card services"
SECTION = "base"
PRIORITY = "required"
LICENSE = "GPL"
DEPENDS = "virtual/kernel"

SRC_URI = "${SOURCEFORGE_MIRROR}/pcmcia-cs/pcmcia-cs-${PV}.tar.gz"
S = "${WORKDIR}/pcmcia-cs-${PV}"

INITSCRIPT_NAME = "pcmcia"
INITSCRIPT_PARAMS = "defaults"

inherit update-rc.d

export KERNEL_SOURCE = ${@base_read_file('${STAGING_DIR}/${HOST_SYS}/kernel/kernel-source')}

sbindir = "/sbin"

do_configure() {
	touch .prereq.ok
	touch config.out
	cat >config.mk <<EOF
UCC=${CC}
UFLAGS=${CFLAGS} -I${S}/include
HAS_WORDEXP=y
SYSV_INIT=y
RC_DIR=/etc
CONFIG_PNP_BIOS=n
ARCH=${ARCH}
CONFIG_CARDBUS=n
CONFIG_PCMCIA=y
CONFIG_INET=y
CONFIG_SCSI=y
DO_IDE=y
EOF
	cat >include/pcmcia/autoconf.h <<EOF
#define HAS_WORDEXP 1
EOF
}

do_compile() {
        oe_runmake all HAS_XPM= FLIBS="" XMANDIR=""
}

do_install() {
	install -d ${D}/${sbindir}
	for f in cardmgr/cardctl cardmgr/cardmgr cardmgr/ide_info cardmgr/ifport cardmgr/ifuser cardmgr/pcinitrd flash/ftl_check flash/ftl_format
	do
		install -m 0755 $f ${D}/${sbindir}/
	done
	install -d ${D}/${sysconfdir}/init.d \
		   ${D}/${sysconfdir}/pcmcia
	cp -a etc/* ${D}/${sysconfdir}/pcmcia/
	install -m 0755 etc/rc.pcmcia ${D}/${sysconfdir}/init.d/pcmcia
}

FILES_${PN} = "${sbindir} ${sysconfdir}"