diff options
author | Matthias Goebl <oe@m.goebl.net> | 2006-02-02 17:29:32 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-02-02 17:29:32 +0000 |
commit | 2f6e5394c33692a068a8b7660cff51ecc7d428ca (patch) | |
tree | c2917cafd754a82f8216690d70b85671e3a9fde1 | |
parent | 3354297ae90fab87537a0f0b22cdfa0d4bb92676 (diff) |
packages/lirc: Update lirc to 0.8.0
- Update 0.7.2+0.8.0pre4 to 0.8.0
- Inherit module-base - class for compilation of kernel-module
- Start lircd and lircexec only if config exists
- Describe sub-packages
- Use oe-provided pre/post-scripts
-rwxr-xr-x | packages/lirc/files/lircd.init | 1 | ||||
-rwxr-xr-x | packages/lirc/files/lircexec.init | 1 | ||||
-rw-r--r-- | packages/lirc/lirc-modules_0.8.0.bb (renamed from packages/lirc/lirc-modules_0.7.2+0.8.0pre4.bb) | 39 | ||||
-rw-r--r-- | packages/lirc/lirc_0.8.0.bb (renamed from packages/lirc/lirc_0.7.2+0.8.0pre4.bb) | 27 |
4 files changed, 24 insertions, 44 deletions
diff --git a/packages/lirc/files/lircd.init b/packages/lirc/files/lircd.init index 4bb2b7ee0a..11ce62447f 100755 --- a/packages/lirc/files/lircd.init +++ b/packages/lirc/files/lircd.init @@ -7,6 +7,7 @@ test -f /usr/sbin/lircd || exit 0 +test -f /etc/lircd.conf || exit 0 case "$1" in start) diff --git a/packages/lirc/files/lircexec.init b/packages/lirc/files/lircexec.init index a9724af0fa..d3329bdc37 100755 --- a/packages/lirc/files/lircexec.init +++ b/packages/lirc/files/lircexec.init @@ -8,6 +8,7 @@ test -f /usr/bin/irexec || exit 0 +test -f /etc/lircrc || exit 0 case "$1" in start) diff --git a/packages/lirc/lirc-modules_0.7.2+0.8.0pre4.bb b/packages/lirc/lirc-modules_0.8.0.bb index 67e83b1b52..fb765d595c 100644 --- a/packages/lirc/lirc-modules_0.7.2+0.8.0pre4.bb +++ b/packages/lirc/lirc-modules_0.8.0.bb @@ -1,4 +1,4 @@ -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>" @@ -8,23 +8,23 @@ DEPENDS = "virtual/kernel fakeroot-native setserial" 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 @@ -34,26 +34,9 @@ do_install_append_nslu2() { 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" diff --git a/packages/lirc/lirc_0.7.2+0.8.0pre4.bb b/packages/lirc/lirc_0.8.0.bb index ec3c204244..9a9278425d 100644 --- a/packages/lirc/lirc_0.7.2+0.8.0pre4.bb +++ b/packages/lirc/lirc_0.8.0.bb @@ -1,4 +1,9 @@ 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>" @@ -12,17 +17,20 @@ RDEPENDS_lirc-exec = "lirc" 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 @@ -40,28 +48,15 @@ do_install_append() { 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 " |