lirc: Updated version 0.8.4a -> 0.9.0

This commit is contained in:
Alan Mizrahi 2012-03-28 23:38:55 +09:00
parent 95143152a3
commit 5611829052
4 changed files with 60 additions and 49 deletions

View File

@ -1,3 +1,3 @@
40f056cd6de6df25be459a37f3291d4c irxevent_name.diff 8f59ad9b5931b23dced6925272a519ce irxevent_name.diff
606b714ed843d28060163ffc571fc1f7 lirc-0.8.4a.tar.bz2 b232aef26f23fe33ea8305d276637086 lirc-0.9.0.tar.bz2
22eb1f55aaf27e0417d1e53c891fe01e lircd b8936af7efea355f95cabcc67798e4be lircd

View File

@ -5,7 +5,7 @@
# Depends on: # Depends on:
name=lirc name=lirc
version=0.8.4a version=0.9.0
release=1 release=1
source=(http://download.sourceforge.net/$name/$name-$version.tar.bz2 irxevent_name.diff lircd) source=(http://download.sourceforge.net/$name/$name-$version.tar.bz2 irxevent_name.diff lircd)
@ -35,5 +35,5 @@ build() {
make make
make DESTDIR=$PKG install make DESTDIR=$PKG install
install -D -m 755 $SRC/lircd $PKG/etc/rc.d/lircd install -D -m 755 $SRC/lircd $PKG/etc/rc.d/lircd
rm -rf $PKG/dev rm -rf $PKG/dev $PKG/var
} }

View File

@ -1,51 +1,62 @@
--- lirc-0.8.2/tools/irxevent.c.orig 2008-04-17 11:10:26.113550983 -0430 --- lirc-0.9.0/tools/irxevent.c.orig 2012-03-28 17:37:58.603657279 +0900
+++ lirc-0.8.2/tools/irxevent.c 2008-04-17 14:20:15.917788728 -0430 +++ lirc-0.9.0/tools/irxevent.c 2012-03-28 17:41:20.432647800 +0900
@@ -133,6 +133,7 @@ @@ -131,6 +131,7 @@
static const char *root_window_name = "RootWindow";
static const char *progname = "irxevent";
static const char *progname="irxevent";
+static char *lirc_progname = NULL; /* program name to react to, by default irxevent */ +static char *lirc_progname = NULL; /* program name to react to, by default irxevent */
static Display *dpy; static Display *dpy;
static Window root; static Window root;
static XEvent xev; static XEvent xev;
@@ -543,9 +544,10 @@ @@ -550,6 +551,7 @@
}
static struct option long_options[] = static struct option long_options[] = {
{
- {"daemon", no_argument, NULL, 'd'},
- {"help", no_argument, NULL, 'h'},
- {"version", no_argument, NULL, 'V'},
+ {"daemon", no_argument, NULL, 'd'},
+ {"name", required_argument, NULL, 'n'}, + {"name", required_argument, NULL, 'n'},
+ {"help", no_argument, NULL, 'h'}, {"daemon", no_argument, NULL, 'd'},
+ {"version", no_argument, NULL, 'V'}, {"help", no_argument, NULL, 'h'},
{0, 0, 0, 0} {"version", no_argument, NULL, 'V'},
}; @@ -566,8 +568,11 @@
@@ -559,13 +561,16 @@
int c; int c;
int WindowID; int WindowID;
- while ((c = getopt_long(argc, argv, "dhV", long_options, NULL)) != EOF) { - while ((c = getopt_long(argc, argv, "dhV", long_options, NULL)) != EOF) {
+ while ((c = getopt_long(argc, argv, "dn:hV", long_options, NULL)) != EOF) { + while ((c = getopt_long(argc, argv, "n:dhV", long_options, NULL)) != EOF) {
switch (c) { switch (c) {
case 'd':
bDaemon = 1; continue;
+ case 'n': + case 'n':
+ lirc_progname = optarg; continue; + lirc_progname = optarg;
case 'h': + continue;
printf("Usage: %s [option]... [config file]\n" case 'd':
" -d --daemon fork and run in background\n" bDaemon = 1;
+ " -n --name use this program name\n" continue;
" -h --help display usage summary\n" @@ -605,7 +610,7 @@
" -V --version display version\n", progname);
return(EXIT_SUCCESS);
@@ -597,7 +602,7 @@
// windows may get closed at wrong time. Override default error handler... // windows may get closed at wrong time. Override default error handler...
XSetErrorHandler(errorHandler); XSetErrorHandler(errorHandler);
- if(lirc_init("irxevent",1)==-1) exit(EXIT_FAILURE); - if (lirc_init("irxevent", 1) == -1)
+ if(lirc_init(lirc_progname?lirc_progname:progname,1)==-1) exit(EXIT_FAILURE); + if (lirc_init(lirc_progname?lirc_progname:progname, 1) == -1)
exit(EXIT_FAILURE);
if(lirc_readconfig(config_file,&config,check)==0) if (lirc_readconfig(config_file, &config, check) == 0) {
{ --- lirc-0.9.0/doc/man/irxevent.1.orig 2012-03-28 17:49:49.743623879 +0900
+++ lirc-0.9.0/doc/man/irxevent.1 2012-03-28 17:53:34.603613319 +0900
@@ -14,6 +14,9 @@
Irxevent is a complement to irexec and irpty.
.TP
+\fB\-n\fR \fB\-\-name\fR
+program name in .lircrc for this irxevent instance
+.TP
\fB\-d\fR \fB\-\-daemon\fR
fork and run in background
.TP
--- lirc-0.9.0/doc/html/irxevent.html.orig 2012-03-28 17:54:15.632611392 +0900
+++ lirc-0.9.0/doc/html/irxevent.html 2012-03-28 17:54:44.502610035 +0900
@@ -55,6 +55,7 @@
<P>
Irxevent is a complement to irexec and irpty.
<DL COMPACT>
+<DT><B>-n</B> <B>--name</B><DD>
<DT><B>-d</B> <B>--daemon</B><DD>
fork and run in background
<DT><B>-h</B> <B>--help</B><DD>

View File

@ -9,7 +9,7 @@ case "$1" in
;; ;;
stop) stop)
if [ -f /var/run/lircd.pid ]; then if [ -f /var/run/lircd.pid ]; then
kill `cat /var/run/lircd.pid` && rm -f /var/run/lircd.pid kill $(< /var/run/lircd.pid) && rm -f /var/run/lircd.pid
else else
return 1 return 1
fi fi