summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/lirc-utils
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core-testing/lirc-utils')
-rw-r--r--abs/core-testing/lirc-utils/PKGBUILD66
-rw-r--r--abs/core-testing/lirc-utils/kernel-2.6.26.patch122
-rw-r--r--abs/core-testing/lirc-utils/lirc.logrotate5
-rwxr-xr-xabs/core-testing/lirc-utils/lircd43
-rw-r--r--abs/core-testing/lirc-utils/lircd.conf.d8
-rwxr-xr-xabs/core-testing/lirc-utils/lircmd36
6 files changed, 280 insertions, 0 deletions
diff --git a/abs/core-testing/lirc-utils/PKGBUILD b/abs/core-testing/lirc-utils/PKGBUILD
new file mode 100644
index 0000000..b1f1f9a
--- /dev/null
+++ b/abs/core-testing/lirc-utils/PKGBUILD
@@ -0,0 +1,66 @@
+# $Id: PKGBUILD 6058 2008-07-23 02:50:00Z eric $
+# Maintainer: Paul Mattal <paul@archlinux.org>
+
+pkgname=lirc-utils
+pkgver=0.8.3
+pkgrel=1
+pkgdesc="Linux Infrared Remote Control utils"
+arch=(i686 x86_64)
+url="http://www.lirc.org/"
+license=('GPL')
+_kernver=2.6.26-ARCH
+depends=('alsa-lib' 'libusb' 'libx11' 'libsm')
+makedepends=('help2man')
+replaces=('lirc+pctv')
+backup=('etc/lircd.conf' 'etc/lircmd.conf'\
+ 'etc/conf.d/lircd')
+options=('!libtool' '!makeflags')
+source=(http://umn.dl.sf.net/sourceforge/lirc/lirc-$pkgver.tar.bz2 \
+ lircd lircmd lirc.logrotate lircd.conf.d kernel-2.6.26.patch)
+md5sums=('8e78eeded7b31e5ad02e328970437c0f' '909ad968afa10e4511e1da277bb23c3b'\
+ '85f7fdac55e5256967241864049bf5e9' '3deb02604b37811d41816e9b4385fcc3'\
+ '5b1f8c9cd788a39a6283f93302ce5c6e' '1753acd774f50b638e6173d364de53fd')
+
+build() {
+ # configure
+ cd $startdir/src/lirc-$pkgver || return 1
+ patch -Np1 -i ../kernel-2.6.26.patch || return 1
+
+ # Disabling lirc_gpio driver as it does no longer work Kernel 2.6.22+
+ sed -i -e "s:lirc_gpio\.o::" drivers/lirc_gpio/Makefile.am || return 1
+
+ autoreconf || return 1
+ libtoolize || return 1
+
+ ./configure --enable-sandboxed --prefix=/usr \
+ --with-driver=all --with-kerneldir=/usr/src/linux-${_kernver} \
+ --with-moduledir=/lib/modules/${_kernver}/kernel/drivers/misc \
+ --with-transmitter \
+ || return 1
+ # disable parallel and bt829
+ # because of incompatibility with smp systems
+ sed -i -e "s:lirc_parallel::" -e "s:lirc_bt829::" \
+ Makefile drivers/Makefile drivers/*/Makefile tools/Makefile \
+ || return 1
+
+ # build
+ make || return 1
+ make DESTDIR=$startdir/pkg install || return 1
+ mkdir -p $startdir/pkg/usr/share/lirc $startdir/pkg/etc/rc.d \
+ || return 1
+ cp $startdir/src/{lircd,lircmd} $startdir/pkg/etc/rc.d/ \
+ || return 1
+ cp -rp remotes $startdir/pkg/usr/share/lirc || return 1
+ chmod -R go-w $startdir/pkg/usr/share/lirc/ || return 1
+
+ # install the logrotate config
+ install -D -m644 $startdir/src/lirc.logrotate \
+ $startdir/pkg/etc/logrotate.d/lirc || return 1
+
+ # install conf.d file
+ install -D -m644 $startdir/src/lircd.conf.d \
+ $startdir/pkg/etc/conf.d/lircd || return 1
+
+ # remove built modules
+ rm -r $startdir/pkg/lib/
+}
diff --git a/abs/core-testing/lirc-utils/kernel-2.6.26.patch b/abs/core-testing/lirc-utils/kernel-2.6.26.patch
new file mode 100644
index 0000000..74bb986
--- /dev/null
+++ b/abs/core-testing/lirc-utils/kernel-2.6.26.patch
@@ -0,0 +1,122 @@
+--- a/drivers/kcompat.h 2008-01-13 11:26:28.000000000 +0100
++++ b/drivers/kcompat.h 2008-05-14 18:37:49.000000000 +0200
+@@ -1,4 +1,4 @@
+-/* $Id: kcompat.h,v 5.34 2008/01/13 10:26:28 lirc Exp $ */
++/* $Id: kcompat.h,v 5.36 2008/05/14 16:37:49 lirc Exp $ */
+
+ #ifndef _KCOMPAT_H
+ #define _KCOMPAT_H
+@@ -36,10 +36,10 @@
+ class_simple_destroy(cls);
+ }
+
+-#define lirc_class_device_create(cs, parent, dev, device, fmt, args...) \
+- class_simple_device_add(cs, dev, device, fmt, ## args)
++#define lirc_device_create(cs, parent, dev, fmt, args...) \
++ class_simple_device_add(cs, dev, parent, fmt, ## args)
+
+-static inline void class_device_destroy(lirc_class_t *cls, dev_t devt)
++static inline void lirc_device_destroy(lirc_class_t *cls, dev_t devt)
+ {
+ class_simple_device_remove(devt);
+ }
+@@ -48,20 +48,40 @@
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 15)
+
+-#define lirc_class_device_create(cs, parent, dev, device, fmt, args...) \
+- class_device_create(cs, dev, device, fmt, ## args)
++#define lirc_device_create(cs, parent, dev, fmt, args...) \
++ class_device_create(cs, dev, parent, fmt, ## args)
+
+ #else /* >= 2.6.15 */
+
+-#define lirc_class_device_create class_device_create
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
++
++#define lirc_device_create(cs, parent, dev, fmt, args...) \
++ class_device_create(cs, NULL, dev, parent, fmt, ## args)
++
++#else /* >= 2.6.26 */
++
++#define lirc_device_create device_create
++
++#endif /* >= 2.6.26 */
++
+ #define LIRC_DEVFS_PREFIX
+
+-#endif
++#endif /* >= 2.6.15 */
+
+ typedef struct class lirc_class_t;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
++
++#define lirc_device_destroy class_device_destroy
++
++#else
++
++#define lirc_device_destroy device_destroy
++
+ #endif
+
++#endif /* >= 2.6.13 */
++
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
+ #define LIRC_HAVE_DEVFS
+ #define LIRC_HAVE_DEVFS_24
+@@ -133,8 +153,8 @@
+ #ifndef LIRC_HAVE_SYSFS
+ #define class_destroy(x) do { } while (0)
+ #define class_create(x, y) NULL
+-#define class_device_destroy(x, y) do { } while (0)
+-#define lirc_class_device_create(x, y, z, xx, yy, zz) 0
++#define lirc_class_destroy(x, y) do { } while (0)
++#define lirc_class_create(x, y, z, xx, yy, zz) 0
+ #define IS_ERR(x) 0
+ typedef struct class_simple
+ {
+--- a/drivers/lirc_dev/lirc_dev.c 2008-01-13 11:45:02.000000000 +0100
++++ b/drivers/lirc_dev/lirc_dev.c 2008-05-14 18:37:49.000000000 +0200
+@@ -17,7 +17,7 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+- * $Id: lirc_dev.c,v 1.56 2008/01/13 10:45:02 lirc Exp $
++ * $Id: lirc_dev.c,v 1.58 2008/05/14 16:37:49 lirc Exp $
+ *
+ */
+
+@@ -145,7 +145,8 @@
+ #ifdef LIRC_HAVE_DEVFS_26
+ devfs_remove(DEV_LIRC "/%u", ir->p.minor);
+ #endif
+- class_device_destroy(lirc_class, MKDEV(IRCTL_DEV_MAJOR, ir->p.minor));
++ lirc_device_destroy(lirc_class,
++ MKDEV(IRCTL_DEV_MAJOR, ir->p.minor));
+
+ if (ir->buf != ir->p.rbuf) {
+ lirc_buffer_free(ir->buf);
+@@ -400,9 +401,9 @@
+ S_IFCHR|S_IRUSR|S_IWUSR,
+ DEV_LIRC "/%u", ir->p.minor);
+ #endif
+- (void) lirc_class_device_create(lirc_class, NULL,
+- MKDEV(IRCTL_DEV_MAJOR, ir->p.minor),
+- ir->p.dev, "lirc%u", ir->p.minor);
++ (void) lirc_device_create(lirc_class, ir->p.dev,
++ MKDEV(IRCTL_DEV_MAJOR, ir->p.minor),
++ "lirc%u", ir->p.minor);
+
+ if (p->sample_rate || p->get_queue) {
+ /* try to fire up polling thread */
+@@ -441,7 +442,8 @@
+ return minor;
+
+ out_sysfs:
+- class_device_destroy(lirc_class, MKDEV(IRCTL_DEV_MAJOR, ir->p.minor));
++ lirc_device_destroy(lirc_class,
++ MKDEV(IRCTL_DEV_MAJOR, ir->p.minor));
+ #ifdef LIRC_HAVE_DEVFS_24
+ devfs_unregister(ir->devfs_handle);
+ #endif
diff --git a/abs/core-testing/lirc-utils/lirc.logrotate b/abs/core-testing/lirc-utils/lirc.logrotate
new file mode 100644
index 0000000..623c4f3
--- /dev/null
+++ b/abs/core-testing/lirc-utils/lirc.logrotate
@@ -0,0 +1,5 @@
+/var/log/lircd {
+ missingok
+ notifempty
+ delaycompress
+}
diff --git a/abs/core-testing/lirc-utils/lircd b/abs/core-testing/lirc-utils/lircd
new file mode 100755
index 0000000..f4686d7
--- /dev/null
+++ b/abs/core-testing/lirc-utils/lircd
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/lircd
+
+PID=$(pidof -o %PPID /usr/sbin/lircd)
+case "$1" in
+ start)
+ stat_busy "Starting LIRC Daemon"
+ [ -n "$LIRC_DRIVER" ] && LIRC_EXTRAOPTS="-H $LIRC_DRIVER $LIRC_EXTRAOPTS"
+ [ -z "$PID" ] &&
+ if [ -n "$LIRC_DEVICE" ] ; then
+ /usr/sbin/lircd -d "$LIRC_DEVICE" $LIRC_EXTRAOPTS $LIRC_CONFIGFILE
+ else
+ /usr/sbin/lircd $LIRC_EXTRAOPTS $LIRC_CONFIGFILE
+ fi
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon lircd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping LIRC Daemon"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon lircd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/core-testing/lirc-utils/lircd.conf.d b/abs/core-testing/lirc-utils/lircd.conf.d
new file mode 100644
index 0000000..760dab0
--- /dev/null
+++ b/abs/core-testing/lirc-utils/lircd.conf.d
@@ -0,0 +1,8 @@
+#
+# Parameters for lirc daemon
+#
+
+LIRC_DEVICE="/dev/lirc0"
+LIRC_DRIVER=""
+LIRC_EXTRAOPTS=""
+LIRC_CONFIGFILE=""
diff --git a/abs/core-testing/lirc-utils/lircmd b/abs/core-testing/lirc-utils/lircmd
new file mode 100755
index 0000000..220c47c
--- /dev/null
+++ b/abs/core-testing/lirc-utils/lircmd
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/lircmd`
+case "$1" in
+ start)
+ stat_busy "Starting lircmd Daemon"
+ [ -z "$PID" ] && /usr/sbin/lircmd
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon lircmd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping lircmd Daemon"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon lircmd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0