[arch-commits] Commit in lirc-utils/trunk (PKGBUILD irexec.conf irexecd lircd)

Hugo Doria hugo at archlinux.org
Tue Oct 20 19:12:22 UTC 2009


    Date: Tuesday, October 20, 2009 @ 15:12:20
  Author: hugo
Revision: 56260

upgpkg: lirc-utils 0.8.6-3
    Fixing FS#15861, FS#16748, FS#16014, FS#16704

Added:
  lirc-utils/trunk/irexec.conf
  lirc-utils/trunk/irexecd
Modified:
  lirc-utils/trunk/PKGBUILD
  lirc-utils/trunk/lircd

-------------+
 PKGBUILD    |   29 ++++++++++++++++++-----------
 irexec.conf |    5 +++++
 irexecd     |   38 ++++++++++++++++++++++++++++++++++++++
 lircd       |   12 ++++++++++--
 4 files changed, 71 insertions(+), 13 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-10-20 15:39:52 UTC (rev 56259)
+++ PKGBUILD	2009-10-20 19:12:20 UTC (rev 56260)
@@ -3,7 +3,7 @@
 
 pkgname=lirc-utils
 pkgver=0.8.6
-pkgrel=2
+pkgrel=3
 pkgdesc="Linux Infrared Remote Control utils"
 arch=('i686' 'x86_64')
 url="http://www.lirc.org/"
@@ -12,11 +12,10 @@
 depends=('alsa-lib' 'libusb' 'libx11' 'libsm' 'python' 'libftdi')
 makedepends=('help2man')
 replaces=('lirc+pctv')
-backup=('etc/lircd.conf' 'etc/lircmd.conf'\
-        'etc/conf.d/lircd', 'etc/lirc/lircd.conf')
+backup=('etc/conf.d/lircd.conf' 'etc/conf.d/lircmd.conf' 'etc/lirc/lircd.conf')
 options=('!libtool' '!makeflags')
 source=(http://downloads.sourceforge.net/sourceforge/lirc/lirc-$pkgver.tar.bz2
-	lircd lircmd lirc.logrotate lircd.conf)
+	lircd lircmd lirc.logrotate lircd.conf irexec.conf irexecd)
 
 build() {
 	# configure
@@ -44,26 +43,34 @@
 	make DESTDIR=${pkgdir} install || return 1
 	mkdir -p ${pkgdir}/usr/share/lirc ${pkgdir}/etc/rc.d \
 		|| return 1
-	cp ${srcdir}/{lircd,lircmd} ${pkgdir}/etc/rc.d/ \
+	cp ${srcdir}/{lircd,lircmd,irexecd} ${pkgdir}/etc/rc.d/ \
 		|| return 1
 	cp -rp remotes ${pkgdir}/usr/share/lirc || return 1
 	chmod -R go-w ${pkgdir}/usr/share/lirc/ || return 1
 
+
 	# install the logrotate config
-	install -D -m644 ${srcdir}/lirc.logrotate \
-		${pkgdir}/etc/logrotate.d/lirc || return 1
-	
+    	install -D -m644 ${srcdir}/lirc.logrotate \
+        	${pkgdir}/etc/logrotate.d/lirc || return 1
+    
 	# install conf.d file
 	install -D -m644 ${srcdir}/lircd.conf \
-		${pkgdir}/etc/lirc/lircd.conf || return 1
+        	${pkgdir}/etc/conf.d/lircd.conf || return 1
 
+	# install conf.d file
+        install -D -m644 ${srcdir}/irexec.conf \
+                ${pkgdir}/etc/conf.d/irexec.conf || return 1
+
+	install -d -m755 ${pkgdir}/etc/lirc || return 1
 	install -d -m755 ${pkgdir}/var/run/lirc || return 1
 
 	# remove built modules
 	rm -r ${pkgdir}/lib/
 }
 md5sums=('4ca24da6f5e7c2dcea74878c27a4a3f7'
-         'b01189975f573b4ceab8bf3d58d7f77a'
+         '310f718169b16b6afa6615fa53a0ef21'
          '85f7fdac55e5256967241864049bf5e9'
          '3deb02604b37811d41816e9b4385fcc3'
-         '5b1f8c9cd788a39a6283f93302ce5c6e')
+         '5b1f8c9cd788a39a6283f93302ce5c6e'
+         'f0c0ac930326168035f0c8e24357ae55'
+         '618ca4f666341d6ade8c616ce59f4d1b')

Added: irexec.conf
===================================================================
--- irexec.conf	                        (rev 0)
+++ irexec.conf	2009-10-20 19:12:20 UTC (rev 56260)
@@ -0,0 +1,5 @@
+#
+# Parameters for irexec daemon (path to lircrc)
+#
+
+IREXEC_OPTS=""
\ No newline at end of file

Added: irexecd
===================================================================
--- irexecd	                        (rev 0)
+++ irexecd	2009-10-20 19:12:20 UTC (rev 56260)
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/irexec.conf
+
+PID=`pidof -o %PPID /usr/bin/irexec`
+case "$1" in
+  start)
+    stat_busy "Starting IREXEC Daemon"
+    [ -z "$PID" ] && /usr/bin/irexec --daemon $IREXEC_OPTS
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      add_daemon irexec
+      stat_done
+    fi
+    ;;
+  stop)
+    stat_busy "Stopping IREXEC Daemon"
+    [ ! -z "$PID" ]  && kill $PID &> /dev/null
+    if [ $? -gt 0 ]; then
+      stat_fail
+    else
+      rm_daemon irexec
+      stat_done
+    fi
+    ;;
+  restart)
+    $0 stop
+    sleep 1
+    $0 start
+    ;;
+  *)
+    echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
+


Property changes on: lirc-utils/trunk/irexecd
___________________________________________________________________
Added: svn:executable
   + *

Modified: lircd
===================================================================
--- lircd	2009-10-20 15:39:52 UTC (rev 56259)
+++ lircd	2009-10-20 19:12:20 UTC (rev 56260)
@@ -2,12 +2,19 @@
 
 . /etc/rc.conf
 . /etc/rc.d/functions
-. /etc/lirc/lircd.conf
+. /etc/conf.d/lircd.conf
 
 PID=$(pidof -o %PPID /usr/sbin/lircd)
+LIRCD_SYMLINKFILE=/dev/lircd
+LIRCD_SOCKET=/var/run/lirc/lircd
 case "$1" in
   start)
     stat_busy "Starting LIRC Daemon"
+    rm -f $LIRCD_SOCKET && ln -s $LIRCD_SOCKET $LIRCD_SYMLINKFILE
+    if [ $? -ne 0 ]; then
+      stat_fail
+      exit 0
+    fi
     [ -n "$LIRC_DRIVER" ] && LIRC_EXTRAOPTS="-H $LIRC_DRIVER $LIRC_EXTRAOPTS"
     [ -z "$PID" ] && 
       if [ -n "$LIRC_DEVICE" ] ; then
@@ -24,6 +31,7 @@
     ;;
   stop)
     stat_busy "Stopping LIRC Daemon"
+    rm -f $LIRCD_SYMLINKFILE
     [ ! -z "$PID" ] && kill $PID &> /dev/null
     if [ $? -gt 0 ]; then
       stat_fail
@@ -38,6 +46,6 @@
     $0 start
     ;;
   *)
-    echo "usage: $0 {start|stop|restart}"
+    echo "usage: $0 start|stop|restart"
 esac
 exit 0




More information about the arch-commits mailing list