summaryrefslogtreecommitdiff
path: root/lirc/lirc-modules_0.6.6.oe
blob: 7f254d86692d39da513203cf44469024470c075c (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
DESCRIPTION = "LIRC is a package that allows you to decode and send infra-red signals of many commonly used remote controls."
SECTION = "base"
PRIORITY = "optional"
MAINTAINER = "Michael Lauer <mickey@Vanille.de>"
LICENSE = "GPL"
RDEPENDS = "linux-${KERNEL_VERSION}"
DEPENDS = "virtual/kernel"

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

inherit autotools

export ARCH=${TARGET_ARCH}
export OS=${TARGET_OS}
export CROSS_COMPILE=${CROSS}

KERNEL_VERSION = ${@base_read_file('${STAGING_DIR}/${HOST_SYS}/kernel/kernel-version')}
KERNEL_SOURCE = ${@base_read_file('${STAGING_DIR}/${HOST_SYS}/kernel/kernel-source')}
KERNEL_PATH = "${STAGING_LIBDIR}/../kernel"

export TOPDIR = "${KERNEL_SOURCE}"

#FIXME: Caution: EXTRA_OECONF is arm-specific!

EXTRA_OECONF = "--with-kerneldir=${KERNEL_SOURCE}                      \
                --with-driver=sa1100                                   \ 
                --without-x"

do_compile() {
	cd drivers && oe_runmake
}

do_install() {
	install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/char
	install -m 755 drivers/lirc_sir/lirc_sir.o ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/char/lirc_sir.o
}

pkg_postinst() {
#!/bin/sh
 mknod /dev/lirc c 61 0
 if [ -n $D ]; then exit 1; fi
}

PACKAGES_append=" lirc-modules"
FILES_lirc-modules="/lib/modules"