First shot on 0.9.2.

epel8
Alec Leamas 10 years ago
parent a8ac73c715
commit 2e793985c5

@ -0,0 +1,24 @@
From 184366b6200c80fae167853bab0038a54538ad16 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@gmail.com>
Date: Thu, 11 Dec 2014 00:30:23 +0100
Subject: [PATCH] Changing effective-user default
---
lirc_options.conf | 1 +
1 file changed, 1 insertion(+)
diff --git a/lirc_options.conf b/lirc_options.conf
index 9dc672a..bf342c1 100644
--- a/lirc_options.conf
+++ b/lirc_options.conf
@@ -12,6 +12,7 @@ plugindir = /usr/lib/lirc/plugins
permission = 666
allow-simulate = No
repeat-max = 600
+effective-user = lirc
#listen = [address:]port
#connect = host[:port]
#debug = 6
--
1.9.3

@ -1,26 +0,0 @@
From 8459a881fd53525a47ae2f9180fa3644be5df343 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas@nowhere.net>
Date: Mon, 18 Aug 2014 10:00:49 +0200
Subject: [PATCH 1/3] Fix segfault when starting lircd (AUR 41581)
See https://bugs.archlinux.org/task/41581
---
lirc_options.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lirc_options.conf b/lirc_options.conf
index d8ddedd..11293e2 100644
--- a/lirc_options.conf
+++ b/lirc_options.conf
@@ -7,7 +7,7 @@ nodaemon = False
permission = 666
driver = default
device = /dev/lirc0
-output = /var/run/lirc/lircd
+lircdfile = /var/run/lirc/lircd
pidfile = /var/run/lirc/lircd.pid
plugindir = /usr/lib/lirc/plugins
allow-simulate = No
--
1.8.4.2

@ -1,25 +0,0 @@
From 4a9b45822890f50c5ed36660468e0a99cd4531e0 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas@nowhere.net>
Date: Mon, 18 Aug 2014 10:05:44 +0200
Subject: [PATCH 2/3] lircd: Fix bad default for lircdfile.
---
daemons/lircd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemons/lircd.c b/daemons/lircd.c
index db8ea13..fa8cf17 100644
--- a/daemons/lircd.c
+++ b/daemons/lircd.c
@@ -2147,7 +2147,7 @@ static void lircd_add_defaults(void)
"lircd:device", LIRC_DRIVER_DEVICE,
"lircd:listen", NULL ,
"lircd:connect", NULL,
- "lircd:output", LIRCD,
+ "lircd:lircdfile", LIRCD,
"lircd:pidfile", PIDFILE,
"lircd:logfile", LOGFILE,
"lircd:debug", "False",
--
1.8.4.2

@ -0,0 +1,42 @@
From 1b347e9e7909afd08fce12992da67340144aeb70 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@gmail.com>
Date: Thu, 11 Dec 2014 04:44:49 +0100
Subject: [PATCH 1/5] tools: Make make_rel_symlink.py use python3.
---
tools/make_rel_symlink.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/make_rel_symlink.py b/tools/make_rel_symlink.py
index 5c89305..896637f 100755
--- a/tools/make_rel_symlink.py
+++ b/tools/make_rel_symlink.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import os
import os.path
@@ -32,16 +32,16 @@ if sys.argv[1] == "-p":
sys.argv = sys.argv[ 1:]
if len( sys.argv ) != 3:
- print USAGE
+ print(USAGE)
sys.exit( 1 )
if os.path.isdir( sys.argv[2] ):
- print "Removing link target dir:" + sys.argv[2]
+ print("Removing link target dir:" + sys.argv[2])
shutil.rmtree( sys.argv[2])
link_path = relative_ln_s( sys.argv[1], sys.argv[2] )
if just_print:
- print link_path
+ print(link_path)
else:
os.chdir( os.path.dirname( sys.argv[2]))
target = os.path.basename( sys.argv[2])
--
1.9.3

@ -1,26 +0,0 @@
From 3ebd89ac194279fb56d781d03a5368f4b0e76caa Mon Sep 17 00:00:00 2001
From: Andreas Bader <andreasbader at badersystems.de>
Date: Tue, 19 Aug 2014 16:58:21 +0200
Subject: [PATCH 3/3] 0.9.1a: Bugfix: segfault when parsing --connect in config
file.
---
daemons/lircd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemons/lircd.c b/daemons/lircd.c
index fa8cf17..7af4265 100644
--- a/daemons/lircd.c
+++ b/daemons/lircd.c
@@ -2311,7 +2311,7 @@ int main(int argc, char **argv)
}
opt = options_getstring("lircd:connect");
if (opt != NULL) {
- if (!add_peer_connection(optarg))
+ if (!add_peer_connection(opt))
return(EXIT_FAILURE);
}
# ifdef DEBUG
--
1.8.4.2

File diff suppressed because it is too large Load Diff

@ -0,0 +1,87 @@
From 18933e88521431abea8f0bf720cf35cc37d2def4 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@gmail.com>
Date: Thu, 11 Dec 2014 11:03:12 +0100
Subject: [PATCH 4/5] all: Sanitize feature tests macros.
---
daemons/lircd.c | 3 ---
lib/lirc_client.c | 6 +-----
plugins/srm7500libusb.c | 1 +
tools/lirc-lsplugins.c | 0
tools/lirc-lsremotes.c | 4 ----
5 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/daemons/lircd.c b/daemons/lircd.c
index ab44e80..d1bdc7c 100644
--- a/daemons/lircd.c
+++ b/daemons/lircd.c
@@ -31,9 +31,6 @@
# include <config.h>
#endif
-#define _GNU_SOURCE
-#define _BSD_SOURCE
-
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
diff --git a/lib/lirc_client.c b/lib/lirc_client.c
index 4720f3f..b161f0e 100644
--- a/lib/lirc_client.c
+++ b/lib/lirc_client.c
@@ -17,11 +17,6 @@
* @author Christoph Bartelmus, Trent Piepho, Michal Svec
*/
-// define _XOPEN_SOURCE for WEXITSTATUS
-#define _XOPEN_SOURCE
-// define _BSD_SOURCE for strdup()
-#define _BSD_SOURCE
-
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -34,6 +29,7 @@
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
+#include <strings.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>
diff --git a/plugins/srm7500libusb.c b/plugins/srm7500libusb.c
index f598f4d..06206bc 100644
--- a/plugins/srm7500libusb.c
+++ b/plugins/srm7500libusb.c
@@ -33,6 +33,7 @@
#endif
#define _GNU_SOURCE
+
#include <errno.h>
#include <signal.h>
#include <string.h>
diff --git a/tools/lirc-lsremotes.c b/tools/lirc-lsremotes.c
index 11e806a..7c6ab06 100644
--- a/tools/lirc-lsremotes.c
+++ b/tools/lirc-lsremotes.c
@@ -7,16 +7,12 @@
*
*/
-#define _GNU_SOURCE
-
#include <config.h>
#include <dirent.h>
#include <getopt.h>
#include <errno.h>
#include <fnmatch.h>
-
-
#include <glob.h>
#include <libgen.h>
#include <limits.h>
--
1.9.3

@ -1,25 +0,0 @@
From d80c94ead949e16053449ddf215a88a5e5e159e3 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@gmail.com>
Date: Tue, 19 Aug 2014 19:21:25 +0200
Subject: [PATCH 4/4] lircd: fix compiler error=format-security error.
---
daemons/lircd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemons/lircd.c b/daemons/lircd.c
index 7af4265..50fd9c6 100644
--- a/daemons/lircd.c
+++ b/daemons/lircd.c
@@ -2303,7 +2303,7 @@ int main(int argc, char **argv)
opt = options_getstring("lircd:listen_hostport");
if (opt){
if (opt2host_port(opt, &address, &port, errmsg) != 0){
- fprintf(stderr, errmsg);
+ printf(stderr, errmsg);
return(EXIT_FAILURE);
}
} else
--
1.8.4.2

@ -0,0 +1,53 @@
From 192e627fa81c3e8df086801dea228cb2fdcbb8bb Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@gmail.com>
Date: Thu, 11 Dec 2014 11:24:27 +0100
Subject: [PATCH] configure.ac: Use pkg-config to locate ftdi.
This picks up changed locations e. g., in fedora-22.
---
configure.ac | 13 ++++++++++---
plugins/Makefile.am | 2 +-
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index aaba636..b32b1e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -183,11 +183,18 @@ AC_CHECK_HEADER(usb.h,[
],[
AM_CONDITIONAL([BUILD_USB],[false])]
)
-AC_CHECK_HEADER(ftdi.h,[
+PKG_CHECK_MODULES([FTDI],[libftdi],,[true])
+test -z "$FTDI_LIBS" && PKG_CHECK_MODULES([FTDI], [libftdi1],,[true])
+
+if test -n "$FTDI_LIBS"; then
+ CFLAGS="$CFLAGS $SYSTEMD_CFLAGS"
+ LDFLAGS="$LDFLAGS $FTDI_LIBS"
+ AC_DEFINE(HAVE_FTDI)
AM_CONDITIONAL([BUILD_FTDI],[true])
- ],[
+ AC_SUBST(FTDI_LIBS)
+else
AM_CONDITIONAL([BUILD_FTDI],[false])]
-)
+fi
AC_CHECK_HEADER(iguanaIR.h,[
AM_CONDITIONAL([BUILD_IGUANAIR],[true])
],[
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 175b025..07cf187 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -47,7 +47,7 @@ endif
if BUILD_FTDI
plugin_LTLIBRARIES += ftdi.la
ftdi_la_SOURCES = ftdi.c
-ftdi_la_LDFLAGS = $(AM_LDFLAGS) -lftdi
+ftdi_la_LDFLAGS = $(AM_LDFLAGS) @FTDI_LIBS@
endif
if BUILD_IGUANAIR
--
1.9.3

@ -1,12 +1,75 @@
## Fedora README
### Upstream release 0.9.1a
0.9.2
The changes that broke the update for 0.9.0 are now in upstream. There
are no functional fedora-specific patches in this release, just some
bugfixes.
This a major upstream update. Don't expect things to be the same, read
the NEWS file in the documentation (/usr/share/doc/lirc/NEWS).
Packaging-wise, the package has been split into smaller packages. Installing
the 'lirc' package will bring all of them. You might be interested in
not installing or removing e. g., unused drivers, the gui and/or the
config package.
The lircd daemon now runs as user lirc. This is using the new
--effective-user option, so it's still started as root and runs as root
until all devices and files are opened. Should this become a problem, just
change the effective-user option in lirc_options.conf.
0.9.1
#### Systemd
The fedora lirc package supports two systemd services lircd.socket
and lircmd.service. See below for enabling and starting these
services.
Since systemd quite aggressively runs things in parallel during startup,
clients like irexec sometimes runs into troubles because the socket
they want to connect to isn't available. This can cause hard to debug
problems. From this version, lircd supports a --wait-for-socket option.
Using this, the calling party is blocked until the socket is available.
#### New configuration file(s)
From this version lirc supports a new configuration file
/etc/lirc/lirc_options.conf. This holds default values for all
command line options, and does in fact replace those in most
installations. When updating, you need to use your old
/etc/sysconfig/lirc config file to update lirc_options.conf.
The old file /etc/sysconfig/lirc is no longer used.
The need to define a device that should be reserved (the old
LIRC_IR_DEVICE option) is no longer needed - lircd is clever enough
to do this by itself.
#### Enable lirc protocol (obsolete)
In previous version the lirc protocol had to be be enabled
for the actual device used. This was done using either by installing the
lirc-disable-kernel-rc subpackage or by setting the LIRCD_IR_DEVICE in
/etc/sysconfig/lirc. This is no longer needed, lircd does this
automatically. The lirc-disable-kernel-rc subpackage is still available
"just in case" but should normally not be needed.
#### Socket activation
As of 0.9.4-15+, the Fedora lirc package sports systemd socket
activation. This should fix the problems at startup when clients can't
connect to /var/run/lircd because the lircd service is yet not started.
To start the lircd service using socket activation:
```
# systemctl enable lircd.socket
# systemctl start lircd.socket
```
The lircmd is started the usual way:
```
# systemctl enable lircmd.service
# systemctl start lircmd.service
```
#### Running another instance.
Sometimes another lircd instance is required to handle some other input
@ -52,11 +115,13 @@ If lircd fails to start or dies after restart, first check logs for errors:
# systemctl restart lircd.service
```
You could also run lircd in foreground after stopping service, using the
driver and device defined in lirc_options.conf:
You could also run lircd in foreground after stopping service:
```
# systemctl stop lircd.service
# /usr/sbin/lircd --nodaemon
# bash
# source /etc/systconfig/lirc
# /usr/sbin/lircd $LIRCD_OPTIONS --driver $LIRC_DRIVER \
> --device $LIRC_DEVICE --nodaemon
```
Sometimes kernel complains about multiple clients trying to access the
@ -66,7 +131,7 @@ remote using the atilibusb driver. This needs to blacklist the built_in
ati_remote module. This is is done by creating the file
/etc/modprobe.conf.d/blacklist-ati-remote.conf as:
```
## Block built-in handling of ati-remote (use lircd instead).
# Block built-in handling of ati-remote (use lircd instead).
blacklist ati_remote
```

@ -1,7 +0,0 @@
- Move to -devel (?): irw, *mode2, others?
note: xmode2 inflicts a dependency on X, and smode2 on svgalib
- does someone actually need xmode2/smode2 for something?
- Split utils into subpackage (keep daemons in main package), perhaps also
having the irw, *mode2 etc.
- Don't run as root and/or create dedicated group, reduce fifo permissions?
http://stackoverflow.com/questions/11939255/writing-to-dev-uinput-on-ubuntu-12-04

@ -1,134 +0,0 @@
#!/bin/sh
#
# lirc Startup script for the Linux Infrared Remote Control daemons
#
# chkconfig: - 29 71
# description: Enables infrared controls through LIRC.
# processname: lircd
# processname: lircmd
# config: /etc/lirc/lircd.conf
# config: /etc/lirc/lircmd.conf
# pidfile: /var/run/lirc/lircd.pid
### BEGIN INIT INFO
# Provides: lirc
# Should-Start: $syslog $network
# Should-Stop: $syslog $network
# Short-Description: Linux Infrared Remote Control daemon
# Description: Enables remote control devices through LIRC.
### END INIT INFO
# Source function library.
. /etc/init.d/functions
exec="/usr/sbin/lircd"
exec2="/usr/sbin/lircmd"
prog=$(basename $exec)
prog2=$(basename $exec2)
[ -e /etc/sysconfig/lirc ] && . /etc/sysconfig/lirc
lockfile=/var/lock/subsys/lirc
# Default to first lirc character device and the lirc chardev driver
LIRC_DEVICE=${LIRC_DEVICE:-/dev/lirc0}
LIRC_DRIVER=${LIRC_DRIVER:-default}
start() {
echo -n $"Starting infrared remote control daemon ($prog): "
daemon $exec --driver=$LIRC_DRIVER --device=$LIRC_DEVICE $LIRCD_OPTIONS
retval=$?
echo
status $prog >/dev/null 2>&1
if [ $? -eq 0 -a "$ENABLE_LIRCMD" = "yes" ] ; then
echo -n $"Starting infrared remote control mouse daemon ($prog2): "
daemon $exec2 $LIRCMD_OPTIONS
retval=$?
echo
fi
[ $retval -eq 0 ] && touch $lockfile
# To prevent double key events w/both in-kernel and lirc decode,
# we disable the in-kernel decoding when lircd is started up
# successfully with a raw IR rc-core receiver
if [ $retval -eq 0 ]; then
if [ $(echo "$LIRC_DRIVER" | grep -c "default") -ge 1 ]; then
lircdev=$(basename $LIRC_DEVICE)
rcdev=$(find -L /sys/class/rc/ -maxdepth 2 -name $lircdev 2> /dev/null)
if [ ! -z ${rcdev} ]; then
(echo lirc > ${rcdev}/../protocols) 2> /dev/null
fi
fi
fi
return $retval
}
stop() {
retval=0
if status $prog2 >/dev/null 2>&1 ; then
echo -n $"Stopping infrared remote control mouse daemon ($prog2): "
killproc $prog2
retval=$?
echo
fi
if [ $retval -eq 0 ] ; then
echo -n $"Stopping infrared remote control daemon ($prog): "
killproc $prog
retval=$?
echo
fi
[ $retval -eq 0 ] && rm -f $lockfile
# On lircd shutdown, turn all the in-kernel IR decoders back on
lircdev=$(basename $LIRC_DEVICE)
rcdev=$(find -L /sys/class/rc/ -maxdepth 2 -name $lircdev 2> /dev/null)
if [ ! -z ${rcdev} ]; then
protonode=${rcdev}/../protocols
echo none > ${protonode}
protos=$(cat ${protonode})
for p in $protos
do
(echo "+${p}" > ${protonode}) 2> /dev/null
done
fi
return $retval
}
restart() {
stop
start
}
reload() {
# lircmd doesn't apparently respond to HUP, so if it's running, restart.
if status $prog2 >/dev/null 2>&1 ; then
restart
else
echo -n $"Reloading infrared remote control daemon ($prog): "
killproc $prog -HUP
retval=$?
echo
return $retval
fi
}
case "$1" in
start|stop|restart|reload)
$1
;;
force-reload)
reload || restart
;;
status)
status $prog2
status $prog
;;
try-restart|condrestart)
[ ! -f $lockfile ] || restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
exit 2
esac

@ -1,86 +1,64 @@
#
# rpmlint warnings:
# only-non-binary-in-usr-lib:
# https://bugzilla.redhat.com/show_bug.cgi?id=794777
# incorrect-fsf-address :
# https://sf.net/mailarchive/forum.php?forum_name=lirc-list&viewmonth=201310
#
%bcond_without alsa
%bcond_without portaudio
%bcond_without x
%bcond_with svgalib
%bcond_without irman
%bcond_without ftdi
%bcond_without iguanaIR
%global commit 228db97ccb454932a69deb6685b15e9fca9c6967
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global _hardened_build 1
%global released 1
%define pre pre1
#define pre pre3
Name: lirc
Version: 0.9.1a
Version: 0.9.2
%global src_vers %(echo %{version} | sed 's/_/-/g' )
%if 0%{?released}
Release: 4%{?dist}
Release: 1%{?dist}
%else
Release: 0.10.%{pre}%{?dist}
Release: 1
%endif
Summary: The Linux Infrared Remote Control package
Group: System Environment/Daemons
# Some LGPLv2 files in iguanaIR promoted to GPLv2
License: GPLv2
# lib/ciniparser* and lib/dictionary* are BSD, others GPLv2
License: GPLv2 and BSD
URL: http://www.lirc.org/
%if 0%{?released}
Source0: http://downloads.sourceforge.net/lirc/%{name}-%{version}.tar.bz2
Source0: http://downloads.sourceforge.net/lirc/%{name}-%{src_vers}.tar.gz
%else
Source0: http://www.lirc.org/software/snapshots/%{name}-%{version}-%{pre}.tar.bz2
Source0: http://leamas.fedorapeople.org/lirc/lirc-%{src_vers}.tar.gz
%endif
Source6: README.fedora
Source7: 99-remote-control-lirc.rules
# Config only, cannot be upstreamed.
Patch1: 0001-Changing-effective-user-default.patch
# Already upstream (0002..0006).
Patch2: 0002-tools-Make-make_rel_symlink.py-use-python3.patch
Patch3: 0003-all-Use-puts-instead-of-printf-when-applicable.patch
Patch4: 0004-all-Sanitize-feature-tests-macros.patch
Patch5: 0005-configure.ac-Use-pkg-config-to-locate-ftdi.patch
Patch6: 0006-Add-Doxyfile-not-part-of-dist-tarball.patch
Source1: README.fedora
Source2: 99-remote-control-lirc.rules
# Patches 1-3 are from upstream
Patch1: 0001-Fix-segfault-when-starting-lircd-AUR-41581.patch
Patch2: 0002-lircd-Fix-bad-default-for-lircdfile.patch
Patch3: 0003-0.9.1a-Bugfix-segfault-when-parsing-connect-in-confi.patch
Patch4: 0004-lircd-fix-compiler-error-format-security-error.patch
BuildRequires: alsa-lib-devel
Buildrequires: autoconf
BuildRequires: automake
%if %{with alsa}
BuildRequires: alsa-lib-devel
%endif
%if %{with iguanaIR}
BuildRequires: doxygen
BuildRequires: iguanaIR-devel
%endif
BuildRequires: help2man
%if %{with ftdi}
BuildRequires: kernel-headers
BuildRequires: man2html
BuildRequires: libftdi-devel
%endif
%if %{with irman}
BuildRequires: libirman-devel
%endif
BuildRequires: libtool
BuildRequires: libusb-devel
BuildRequires: libusb1-devel
%if %{with x}
BuildRequires: libXt-devel
%endif
%if %{with portaudio}
BuildRequires: portaudio-devel >= 19
%endif
BuildRequires: python2-devel
%if %{with svgalib}
BuildRequires: svgalib-devel
%endif
BuildRequires: portaudio-devel
BuildRequires: python3-devel
BuildRequires: python3-PyYAML
BuildRequires: systemd-devel
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires: python3-PyYAML
Requires(pre): shadow-utils
Requires(post): systemd
#for triggerun
Requires(post): systemd-sysv
@ -94,9 +72,39 @@ Included applications include daemons which decode the received
signals as well as user space applications which allow controlling a
computer with a remote control.
Installing this package will install most of the LIRC sub-packages.
You might want to install lirc-core, possibly adding some other
packages to get a smaller installation.
%package core
Summary: LIRC core, always needed to run LIRC
%description core
The LIRC core contains the lircd daemons, the devinput and
default driver and most of the applications.
%package compat
Summary: Compatibility package installing all lirc packages
Obsoletes: lirc <= 0.9.1
Provides: lirc = %{version}-%{release}
Requires: lirc-core%{?_isa} = %{version}-%{release}
Requires: lirc-config = %{version}-%{release}
Requires: lirc-tools-gui%{?_isa} = %{version}-%{release}
Requires: lirc-drv-iguanaIR%{?_isa} = %{version}-%{release}
Requires: lirc-drv-portaudio%{?_isa} = %{version}-%{release}
Requires: lirc-drv-irman%{?_isa} = %{version}-%{release}
Requires: lirc-drv-ftdi%{?_isa} = %{version}-%{release}
%description compat
Installing this package will install most lirc sub-packages, roughly
the same as installing previous versions of the lirc package.
%package libs
Summary: LIRC libraries
Group: System Environment/Libraries
Requires: lirc-core%{?_isa} = %{version}-%{release}
%description libs
LIRC is a package that allows you to decode and send infra-red and
@ -106,10 +114,21 @@ signals as well as user space applications which allow controlling a
computer with a remote control. This package includes shared libraries
that applications use to interface with LIRC.
%package config
Summary: LIRC Configuration Tools and Data
Requires: lirc-core = %{version}-%{release}
BuildArch: noarch
%description config
The LIRC config package contains tools and data to ease the
LIRC configuration process.
%package devel
Summary: Development files for LIRC
Group: Development/Libraries
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: lirc-libs%{?_isa} = %{version}-%{release}
%description devel
LIRC is a package that allows you to decode and send infra-red and
@ -119,9 +138,11 @@ signals as well as user space applications which allow controlling a
computer with a remote control. This package includes files for
developing applications that use LIRC.
%package doc
Summary: LIRC documentation
Group: Documentation
BuildArch: noarch
%description doc
LIRC is a package that allows you to decode and send infra-red and
@ -131,26 +152,61 @@ signals as well as user space applications which allow controlling a
computer with a remote control. This package contains LIRC
documentation.
%package remotes
Summary: LIRC remote definitions
Group: System Environment/Daemons
%description remotes
LIRC is a package that allows you to decode and send infra-red and
other signals of many (but not all) commonly used remote controls.
Included applications include daemons which decode the received
signals as well as user space applications which allow controlling a
computer with a remote control. This package contains a collection
of remote control configuration files.
%package disable-kernel-rc
Summary: Disable kernel ir device handling in favor of lirc
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description disable-kernel-rc
Udev rule which disables the kernel built-in handling of infrared devices
(i. e., rc* ones) by making lirc the only used protocol. An alternative is
to use the LIRCD_IR_DEVICE option in /etc/sysconfig/lirc
(i. e., rc* ones) by making lirc the only used protocol.
%package tools-gui
Summary: LIRC GUI tools
Requires: lirc-core%{?_isa} = %{version}-%{release}
%description tools-gui
Some seldom used X11-based tools for debugging lirc configurations.
%package drv-iguanaIR
Summary: IguanaIR LIRC User-Space Driver
Requires: lirc-core%{?_isa} = %{version}-%{release}
License: LGPLv2
%description drv-iguanaIR
LIRC user-space driver which works together with the low-level iguanaIR
package, providing full-fledged support for the iguanaIR devices.
%package drv-portaudio
Summary: Portaudio LIRC User-Space Driver
Requires: lirc-core%{?_isa} = %{version}-%{release}
License: LGPLv2
%description drv-portaudio
LIRC user space driver which supports a IR receiver in microphone input
using the portaudio library.
%package drv-irman
Summary: Irman LIRC User-Space Driver
Requires: lirc-core%{?_isa} = %{version}-%{release}
%description drv-irman
LIRC user-space driver which works together with the kernel, providing
full support for the irman device.
%package drv-ftdi
Summary: Ftdi LIRC User-Space Driver
Requires: lirc-core%{?_isa} = %{version}-%{release}
%description drv-ftdi
LIRC user-space driver which works together with the kernel, providing
full support for the ftdi device.
# Don't provide or require anything from _docdir, per policy.
@ -162,61 +218,52 @@ to use the LIRCD_IR_DEVICE option in /etc/sysconfig/lirc
%if 0%{?released}
%setup -q
%else
%setup -q -n %{name}-%{version}-%{pre}
%setup -qn %{name}-%{src_vers}
%endif
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
chmod 644 contrib/*
chmod +x contrib/hal
chmod +x daemons/input_map.sh
%patch5 -p1
%patch6 -p1
sed -i -e 's|/usr/local/etc/|/etc/|' contrib/irman2lirc
%build
mkdir m4 || :
autoreconf -fi
export CFLAGS="%{optflags} -Werror=format-security"
%configure \
--libdir=%{_libdir} \
--disable-static \
--disable-dependency-tracking \
--enable-sandboxed \
%if ! %{with x}
--without-x \
%endif
--with-syslog=LOG_DAEMON \
--with-driver=userspace
# make %%{?_smp_mflags}
# parallel makes are currently busted, do single-threaded for now
make
CFLAGS="-I/usr/include/libftdi1 %{optflags}" %configure --libdir=%{_libdir}
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
tar -C $RPM_BUILD_ROOT/%{_pkgdocdir} \
-xzf $RPM_BUILD_ROOT/%{_pkgdocdir}/api-docs.tar.gz
rm $RPM_BUILD_ROOT/%{_pkgdocdir}/api-docs.tar.gz
cd $RPM_BUILD_ROOT%{_datadir}/lirc/contrib
chmod 755 irman2lirc devinput.sh
chmod 755 lirc.debian lirc.redhat lircs lirc.suse*
cd $OLDPWD
rm $RPM_BUILD_ROOT%{_libdir}/*.la
rm $RPM_BUILD_ROOT%{_libdir}/lirc/plugins/*.la
install -pm 755 contrib/irman2lirc $RPM_BUILD_ROOT%{_bindir}
install -Dpm 644 doc/lirc.hwdb $RPM_BUILD_ROOT%{_datadir}/lirc/lirc.hwdb
cp -a %{SOURCE1} README.fedora
install -Dpm 644 %{SOURCE2} \
install -Dpm 644 %{SOURCE7} \
$RPM_BUILD_ROOT%{_udevrulesdir}/99-remote-control-lirc.rules
# Put remote definitions in place
cp -ar remotes $RPM_BUILD_ROOT%{_datadir}/lirc-remotes
rm $RPM_BUILD_ROOT%{_libdir}/liblirc_client.la
rm -rf __docs; mkdir __docs
mv $RPM_BUILD_ROOT/usr/share/doc/lirc/* __docs
cp -pR contrib __docs
cp -a %{SOURCE6} README.fedora
mkdir -p $RPM_BUILD_ROOT/%{_tmpfilesdir}
echo "d /var/run/lirc 0755 root root 10d" \
> $RPM_BUILD_ROOT/%{_tmpfilesdir}/lirc.conf
> $RPM_BUILD_ROOT%{_tmpfilesdir}/lirc.conf
%pre
getent group lirc >/dev/null || groupadd -r lirc
getent passwd lirc >/dev/null || \
useradd -r -g lirc -d /var/log/lirc -s /sbin/nologin \
-c "LIRC daemon user, runs lircd." lirc
exit 0
%post
%systemd_post lircd.service lircmd.service
@ -232,45 +279,113 @@ find /etc/systemd -name lirc.service -xtype l -delete || :
%postun
%systemd_postun_with_restart lircd.service lircmd.servic
%postun libs -p /sbin/ldconfig
%files
%postun libs -p /sbin/ldconfig
%files
%doc AUTHORS ChangeLog COPYING NEWS README TODO README.fedora
%files compat
%files drv-iguanaIR
%{_libdir}/lirc/plugins/iguanaIR.so
%{_datadir}/lirc/configs/iguanaIR.conf
%files drv-irman
%{_libdir}/lirc/plugins/irman.so
%{_datadir}/lirc/configs/irman.conf
%files drv-portaudio
%{_libdir}/lirc/plugins/audio.so
%{_datadir}/lirc/configs/audio.conf
%files drv-ftdi
%{_libdir}/lirc/plugins/ftdi.so
%{_datadir}/lirc/configs/ftdi.conf
%files tools-gui
%{_bindir}/xmode2
%{_bindir}/irxevent
%{_mandir}/man1/irxevent*
%{_mandir}/man1/xmode2*
%files config
%{_bindir}/irdb-get
%{_bindir}/lirc-config-tool
%{_bindir}/lirc-setup
%{_mandir}/man1/irdb-get*
%{_mandir}/man1/lirc-config-tool*
%{_mandir}/man1/lirc-setup*
%{_datadir}/lirc/configs/*
%{python3_sitelib}/lirc
%exclude %{_datadir}/lirc/configs/iguanaIR.conf
%exclude %{_datadir}/lirc/configs/irman.conf
%exclude %{_datadir}/lirc/configs/ftdi.conf
%exclude %{_datadir}/lirc/configs/audio.conf
%files core
%license COPYING
%doc README AUTHORS NEWS README.fedora
%dir /etc/lirc
%config(noreplace) /etc/lirc/lirc*d.conf
%config(noreplace) /etc/lirc/lirc_options.conf
/etc/lirc/lircd.conf.d
%config(noreplace) /etc/lirc/lirc*.conf
%{_tmpfilesdir}/lirc.conf
%{_unitdir}/lirc*
%{_bindir}/*ir*
%{_bindir}/*mode2
%{_sbindir}/lirc*d
%exclude %{_bindir}/irdb-get
%exclude %{_bindir}/xmode2
%exclude %{_bindir}/irxevent
%exclude %{_bindir}/lirc-setup
%exclude %{_bindir}/lirc-config-tool
%{_sbindir}/lirc*
%{_libdir}/lirc/plugins
%exclude %{_libdir}/lirc/plugins/iguanaIR.so
%exclude %{_libdir}/lirc/plugins/irman.so
%exclude %{_libdir}/lirc/plugins/ftdi.so
%exclude %{_libdir}/lirc/plugins/audio.so
%{_datadir}/lirc/
%exclude %{_datadir}/lirc/configs/*
%{_mandir}/man1/*ir*.1*
%{_mandir}/man1/*mode2*.1*
%{_mandir}/man8/lirc*d.8*
%{_mandir}/man5/lircd.conf.*
%exclude %{_mandir}/man1/lirc-config-tool*
%exclude %{_mandir}/man1/irdb-get*
%exclude %{_mandir}/man1/lirc-setup*
%exclude %{_mandir}/man1/irxevent*
%exclude %{_mandir}/man1/xmode2*
%files libs
%doc COPYING
#doc COPYING
%{_libdir}/liblirc_client.so.*
%{_libdir}/liblirc_driver.so.*
%{_libdir}/liblirc.so.*
%files devel
%{_includedir}/lirc/
%{_includedir}/lirc_private.h
%{_includedir}/lirc_driver.h
%{_includedir}/lirc_client.h
%{_libdir}/liblirc_client.so
%{_libdir}/liblirc_driver.so
%{_libdir}/liblirc.so
%{_libdir}/pkgconfig/lirc-driver.pc
%{_libdir}/pkgconfig/lirc.pc
%files doc
%doc COPYING __docs/*
%files remotes
%doc AUTHORS ChangeLog COPYING README
%{_datadir}/lirc-remotes
%doc COPYING ChangeLog
%{_pkgdocdir}
%files disable-kernel-rc
%{_udevrulesdir}/99-remote-control-lirc.rules
%changelog
* Wed Dec 10 2014 Alec Leamas <leamas.alec@nowhere.net> - 0.9.2-1
- Major upstream update.
- New package structure with more, smaller packages.
* Wed Sep 03 2014 Alec Leamas <leamas@nowhere.net> - 0.9.1a-4
- rebuilt

Loading…
Cancel
Save