-DESCRIPTION = "LIRC is a package that allows you to decode and send infra-red signals of many commonly used remote controls."
+DESCRIPTION = "LIRC is a package that allows you to decode and send infra-red signals of many commonly used remote controls. This package contains the lirc kernel modules."
SECTION = "base"
PRIORITY = "optional"
MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de>"
RDEPENDS_nslu2 = "setserial"
PR = "r1"
-SRC_URI = "http://lirc.sourceforge.net/software/snapshots/lirc-0.8.0pre4.tar.bz2"
-S = "${WORKDIR}/lirc-0.8.0pre4"
+SRC_URI = "${SOURCEFORGE_MIRROR}/lirc/lirc-${PV}.tar.gz"
+S = "${WORKDIR}/lirc-${PV}"
-inherit autotools module-base
+inherit autotools module
include lirc-config.inc
-do_compile() {
- # ${KERNEL_LD} doesn't understand the LDFLAGS, so suppress them
- cd drivers && oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" LDFLAGS=""
-}
+MAKE_TARGETS = "KERNEL_PATH=${STAGING_KERNEL_DIR} MAKE='make -e' -C drivers"
fakeroot do_install() {
oe_runmake -C drivers DESTDIR="${D}" moduledir="/lib/modules/${KERNEL_VERSION}/lirc" install
rm -rf ${D}/dev
}
+# nslu2 uses udev, so /dev/lirc0 will be created automatically
+# and /dev/lirc will be created by /etc/udev/rules.d/lirc.rules
+# (that's the kernel-2.6+udev solution)
do_install_append_nslu2() {
install -d ${D}${sysconfdir}/modutils/
echo 'lirc_serial' > ${D}${sysconfdir}/modutils/lirc_serial
echo 'KERNEL="lirc0", SYMLINK="lirc"' > ${D}${sysconfdir}/udev/rules.d/lirc.rules
}
-pkg_postinst() {
-#!/bin/sh
-set -e
-if [ ! -c $D/dev/lirc ]; then mknod $D/dev/lirc c 61 0; fi
-exit 0
-}
-
-# nslu2 uses udev, so /dev/lirc0 will be created automatically
-# and /dev/lirc will be created by /etc/udev/rules.d/lirc.rules
-# (that's the kernel-2.6+udev solution)
-pkg_postinst_nslu2() {
- depmod -a
- update-modules
-}
-pkg_prerm_nslu2() {
- rmmod lirc_serial
- rmmod lirc_dev
-}
-pkg_postrm_nslu2() {
- update-modules
+# this is for distributions that don't use udev
+pkg_postinst_append() {
+if [ ! -c $D/dev/lirc -a ! -f /sbin/udevd ]; then mknod $D/dev/lirc c 61 0; fi
}
FILES_${PN} = "/lib/modules"
DESCRIPTION = "LIRC is a package that allows you to decode and send infra-red signals of many commonly used remote controls."
+DESCRIPTION_append_lirc = " This package contains the lirc daemon, libraries and tools."
+DESCRIPTION_append_lirc-x = " This package contains lirc tools for X11."
+DESCRIPTION_append_lirc-exec = " This package contains a daemon that runs programs on IR signals."
+DESCRIPTION_append_lirc-remotes = " This package contains some config files for remotes."
+DESCRIPTION_append_lirc-nslu2example = " This package contains a working config for RC5 remotes and a modified NSLU2."
SECTION = "console/network"
PRIORITY = "optional"
MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de>"
RDEPENDS_lirc-nslu2example = "lirc lirc-exec"
PR = "r1"
-SRC_URI = "http://lirc.sourceforge.net/software/snapshots/lirc-0.8.0pre4.tar.bz2 \
+SRC_URI = "${SOURCEFORGE_MIRROR}/lirc/lirc-${PV}.tar.gz \
file://lircd.init file://lircmd.init"
SRC_URI_append_nslu2 = " file://lircexec.init \
file://lircd.conf_nslu2 file://lircrc_nslu2"
-S = "${WORKDIR}/lirc-0.8.0pre4"
+S = "${WORKDIR}/lirc-${PV}"
inherit autotools module-base update-rc.d
+INITSCRIPT_PACKAGES = "lirc lirc-exec"
INITSCRIPT_NAME = "lircd"
INITSCRIPT_PARAMS = "defaults 20"
+INITSCRIPT_NAME_lirc-exec = "lircexec"
+INITSCRIPT_PARAMS_lirc-exec = "defaults 21"
include lirc-config.inc
install ${WORKDIR}/lircexec.init ${D}${sysconfdir}/init.d/lircexec
install -d ${D}${datadir}/lirc/
cp -pPR ${S}/remotes ${D}${datadir}/lirc/
+ rm -rf ${D}/dev
}
do_install_append_nslu2() {
install -d ${D}${sysconfdir}
- # These are example configs for RC5 remotes and a NSLU2.
- # As RC5 is very common, it should work for many people out of the box.
- # The timings are for a de-underclocked NSLU2.
install ${WORKDIR}/lircd.conf_nslu2 ${D}${sysconfdir}/lircd.conf
install ${WORKDIR}/lircrc_nslu2 ${D}${sysconfdir}/lircrc
}
-pkg_postinst_lirc-exec() {
- if test "x$D" != "x"; then D="-r $D"; else D="-s"; fi
- update-rc.d $D lircexec defaults 20
-}
-pkg_prerm_lirc-exec() {
- if test "x$D" != "x"; then D="-r $D"; else /etc/init.d/lircexec stop; fi
-}
-pkg_postrm_lirc-exec() {
- update-rc.d $D lircexec remove
-}
-
PACKAGES =+ "lirc-x lirc-exec lirc-remotes"
PACKAGES_prepend_nslu2 = "lirc-nslu2example "