dvbapp : TranscodingSetup update
[vuplus_openembedded] / recipes / pcmcia-cs / pcmcia-cs_3.2.8.bb
1 # FIXME, consider using kernel staging directory instead of KERNEL_SOURCE which is
2 # located in the work directory. see module.bbclass
3
4 DESCRIPTION = "Utilities and system configuration files for the Linux PCMCIA card services"
5 SECTION = "base"
6 PRIORITY = "required"
7 LICENSE = "GPL"
8 DEPENDS = "virtual/kernel"
9 RDEPENDS = "hostap-conf orinoco-conf"
10 PR = "r28"
11
12 SRC_URI = "${SOURCEFORGE_MIRROR}/pcmcia-cs/pcmcia-cs-${PV}.tar.gz \
13            file://busybox.patch;patch=1 \
14            file://network.patch;patch=1 \
15            file://pcic-extra.patch;patch=1 \
16            file://automount.patch;patch=1 \
17            file://ratoc-cfu1u.patch;patch=1 \
18            file://no-hostap-cards.patch;patch=1 \
19            file://gcc4_fixes.patch;patch=1 \
20            file://pcmcia \
21            file://ide.opts \
22            file://wireless.opts \
23            file://network.conf \
24            file://wnv.conf"
25
26 SRC_URI_append_spitz = " file://nocleanup.patch;patch=1"
27 SRC_URI_append_sh3 = " file://superh-noO3.patch;patch=1"
28
29 S = "${WORKDIR}/pcmcia-cs-${PV}"
30
31 INITSCRIPT_NAME = "pcmcia"
32 INITSCRIPT_PARAMS = "defaults"
33
34 inherit update-rc.d module-base
35
36 export KERNEL_SOURCE = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-source')}"
37
38 sbindir = "/sbin"
39
40 do_configure() {
41         touch .prereq.ok
42         touch config.out
43         cat >config.mk <<EOF
44 UCC=${CC}
45 UFLAGS=${CFLAGS} -I${S}/include
46 HAS_WORDEXP=y
47 SYSV_INIT=y
48 RC_DIR=/etc
49 CONFIG_PNP_BIOS=n
50 ARCH=${ARCH}
51 CONFIG_CARDBUS=n
52 CONFIG_PCMCIA=y
53 CONFIG_INET=y
54 CONFIG_SCSI=y
55 DO_IDE=y
56 EOF
57         cat >include/pcmcia/autoconf.h <<EOF
58 #define HAS_WORDEXP 1
59 EOF
60 }
61
62 do_compile() {
63         oe_runmake all HAS_XPM= FLIBS="" XMANDIR=""
64 }
65
66 INSTALL_ETC = "ftl ide ieee1394 memory network parport scsi serial wireless"
67 INSTALL_ETC_DATA =     "config config.opts ftl.opts ieee1394.opts memory.opts network.opts parport.opts scsi.opts serial.opts shared"
68 INSTALL_ETC_DATA_arm = "config             ftl.opts ieee1394.opts memory.opts network.opts parport.opts scsi.opts serial.opts shared"
69
70 do_install() {
71         install -d ${D}${sbindir}
72         for f in cardmgr/cardctl cardmgr/cardmgr cardmgr/ide_info cardmgr/ifport cardmgr/ifuser cardmgr/pcinitrd flash/ftl_check flash/ftl_format
73         do
74                 install -m 0755 $f ${D}${sbindir}/
75         done
76         install -d ${D}${sysconfdir}/init.d \
77                    ${D}${sysconfdir}/pcmcia \
78                    ${D}${sysconfdir}/pcmcia/cis
79
80         install -m 0644 ${WORKDIR}/network.conf ${D}${sysconfdir}/pcmcia/
81         install -m 0644 ${WORKDIR}/wnv.conf ${D}${sysconfdir}/pcmcia/
82
83         for i in ${INSTALL_ETC}; do
84                 install -m 0755 etc/${i} ${D}${sysconfdir}/pcmcia/
85         done
86         for i in ${INSTALL_ETC_DATA}; do
87                 install -m 0644 etc/${i} ${D}${sysconfdir}/pcmcia/
88         done
89
90         # ensure that config.opts always exists, albeit empty
91         echo >> ${D}${sysconfdir}/pcmcia/config.opts
92
93         install -m 0644 ${WORKDIR}/ide.opts ${D}${sysconfdir}/pcmcia/
94         install -m 0644 ${WORKDIR}/wireless.opts ${D}${sysconfdir}/pcmcia/
95         for i in etc/cis/*; do
96                 install -m 0644 $i ${D}${sysconfdir}/pcmcia/cis/
97         done
98         install -m 0755 etc/rc.pcmcia ${D}${sysconfdir}/init.d/pcmcia
99         install -d ${D}${sysconfdir}/sysconfig
100         install -m 0755 ${WORKDIR}/pcmcia ${D}${sysconfdir}/sysconfig/pcmcia
101 }
102
103 PACKAGES =+ "${PN}-ftl ${PN}-pcinitrd"
104
105 FILES_${PN} = "${sbindir} ${sysconfdir}"
106 FILES_${PN}-ftl = "/sbin/ftl_format /sbin/ftl_check /etc/pcmcia/ftl*"
107 FILES_${PN}-pcinitrd = "/sbin/pcinitrd"
108