packages/lirc: Update lirc to 0.8.0
authorMatthias Goebl <oe@m.goebl.net>
Thu, 2 Feb 2006 17:29:32 +0000 (17:29 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Thu, 2 Feb 2006 17:29:32 +0000 (17:29 +0000)
 - 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

packages/lirc/files/lircd.init
packages/lirc/files/lircexec.init
packages/lirc/lirc-modules_0.8.0.bb [moved from packages/lirc/lirc-modules_0.7.2+0.8.0pre4.bb with 67% similarity]
packages/lirc/lirc_0.8.0.bb [moved from packages/lirc/lirc_0.7.2+0.8.0pre4.bb with 74% similarity]

index 4bb2b7e..11ce624 100755 (executable)
@@ -7,6 +7,7 @@
 
 
 test -f /usr/sbin/lircd || exit 0
+test -f /etc/lircd.conf || exit 0
 
 case "$1" in
   start)
index a9724af..d3329bd 100755 (executable)
@@ -8,6 +8,7 @@
 
 
 test -f /usr/bin/irexec || exit 0
+test -f /etc/lircrc || exit 0
 
 case "$1" in
   start)
similarity index 67%
rename from packages/lirc/lirc-modules_0.7.2+0.8.0pre4.bb
rename to packages/lirc/lirc-modules_0.8.0.bb
index 67e83b1..fb765d5 100644 (file)
@@ -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"
similarity index 74%
rename from packages/lirc/lirc_0.7.2+0.8.0pre4.bb
rename to packages/lirc/lirc_0.8.0.bb
index ec3c204..9a92784 100644 (file)
@@ -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 "