Accepting request 250565 from home:posophe:branches:vdr
Update + fixes OBS-URL: https://build.opensuse.org/request/show/250565 OBS-URL: https://build.opensuse.org/package/show/vdr/lirc?expand=0&rev=42
This commit is contained in:
parent
9cdca6ff72
commit
93032dc58b
26
0001-Fix-segfault-when-starting-lircd-AUR-41581.patch
Normal file
26
0001-Fix-segfault-when-starting-lircd-AUR-41581.patch
Normal file
@ -0,0 +1,26 @@
|
||||
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
|
||||
|
25
0002-lircd-Fix-bad-default-for-lircdfile.patch
Normal file
25
0002-lircd-Fix-bad-default-for-lircdfile.patch
Normal file
@ -0,0 +1,25 @@
|
||||
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,26 @@
|
||||
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
|
||||
|
25
0004-lircd-fix-compiler-error-format-security-error.patch
Normal file
25
0004-lircd-fix-compiler-error-format-security-error.patch
Normal file
@ -0,0 +1,25 @@
|
||||
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
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6323afae6ad498d4369675f77ec3dbb680fe661bea586aa296e67f2e2daba4ff
|
||||
size 857286
|
3
lirc-0.9.1a.tar.bz2
Normal file
3
lirc-0.9.1a.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1961fe032c54630c9ac3d1c26230142864770b007245f9efcf4108ddf4833ba4
|
||||
size 945140
|
36
lirc.changes
36
lirc.changes
@ -1,3 +1,39 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 21 15:44:05 UTC 2014 - p.drouand@gmail.com
|
||||
|
||||
- Update to version 0.9.1a
|
||||
+ configuration file setup hotfix.
|
||||
+ --output option hotfix.
|
||||
- Changes from version 0.9.1
|
||||
+ Added systemd support: unit files, socket activation.
|
||||
+ Default config files are installed in /etc, use --install-etc
|
||||
to disable.
|
||||
+ Building kernel modules is not supported.
|
||||
+ New config file lirc_options.conf with cli options default values.
|
||||
+ Automagically sets the lirc protocol for /dev/rc devices.
|
||||
+ Whitespace cleanup and git hook to enforce whitespace handling.
|
||||
+ Docs are built as part of normal build process.
|
||||
+ Bugfixes
|
||||
+ Autotools update and Darwin fixes.
|
||||
+ docs: Added new Configuration Guide
|
||||
- Specfile clean-up
|
||||
+ Remove obsolete macros
|
||||
+ Use %configure
|
||||
- Use systemd instead of sysvinit
|
||||
- Drop sysconfig support
|
||||
- Add disable-kernel-rc subpackage; allow user to easily replace
|
||||
in-kernel solution with lirc
|
||||
- Add patches from Fedora
|
||||
+ 0001-Fix-segfault-when-starting-lircd-AUR-41581.patch
|
||||
+ 0002-lircd-Fix-bad-default-for-lircdfile.patch
|
||||
+ 0003-0.9.1a-Bugfix-segfault-when-parsing-connect-in-confi.patch
|
||||
+ 0004-lircd-fix-compiler-error-format-security-error.patch
|
||||
- Install remote configuration files in the correct location
|
||||
- Do not ghost lirc configuration files anymore; there are now
|
||||
real and installed by lirc
|
||||
- Build with -fno-strict-aliasing; alsa module would break with
|
||||
new gcc
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 8 11:44:22 CEST 2014 - ro@suse.de
|
||||
|
||||
|
224
lirc.spec
224
lirc.spec
@ -21,60 +21,53 @@ BuildRequires: alsa-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: xorg-x11-devel
|
||||
# for hw_atilibusb driver
|
||||
%if 0%{?suse_version} > 1020
|
||||
BuildRequires: libusb-devel
|
||||
%else
|
||||
BuildRequires: libusb
|
||||
%endif
|
||||
%ifnarch s390 s390x
|
||||
# for hw_i2cuser driver
|
||||
%if 0%{?suse_version} > 1010
|
||||
BuildRequires: linux-kernel-headers
|
||||
%if 0%{?suse_version} > 1030
|
||||
# i2c-dev.h now moved to that package
|
||||
BuildRequires: i2c-tools
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1020
|
||||
BuildRequires: fdupes
|
||||
%endif
|
||||
%if 0%{?snapshot:1}
|
||||
BuildRequires: help2man
|
||||
%endif
|
||||
BuildRequires: systemd
|
||||
Url: http://www.lirc.org/
|
||||
# bug437293
|
||||
%ifarch ppc64
|
||||
Obsoletes: lirc-64bit
|
||||
%endif
|
||||
#
|
||||
Version: 0.9.0
|
||||
Version: 0.9.1a
|
||||
Release: 0
|
||||
Summary: Tools for Infrared Receivers
|
||||
License: GPL-2.0+
|
||||
Group: Hardware/Other
|
||||
Source0: http://downloads.sourceforge.net/project/lirc/LIRC/%{version}/lirc-%{version}%{?snapshot:-%snapshot}.tar.bz2
|
||||
Source0: http://downloads.sourceforge.net/project/lirc/LIRC/%{version}/lirc-%{version}.tar.bz2
|
||||
Source1: baselibs.conf
|
||||
Source4: rc.lirc
|
||||
Source5: sysconfig.lirc
|
||||
Source6: fix-remote-keys.pl
|
||||
Source8: README.SUSE
|
||||
Source9: 51-lirc.rules
|
||||
# PATCH-FEATURE-UPSTREAM 0001-Fix-segfault-when-starting-lircd-AUR-41581.patch --lircd fails to start ending in a segfault
|
||||
Patch0: 0001-Fix-segfault-when-starting-lircd-AUR-41581.patch
|
||||
# PATCH-FEATURE-UPSTREAM 0002-lircd-Fix-bad-default-for-lircdfile.patch -- Fix bad default for lircdfile
|
||||
Patch1: 0002-lircd-Fix-bad-default-for-lircdfile.patch
|
||||
# PATCH-FEATURE-UPSTREAM 0003-0.9.1a-Bugfix-segfault-when-parsing-connect-in-confi.patch --segfault when parsing
|
||||
# --connect in config file
|
||||
Patch2: 0003-0.9.1a-Bugfix-segfault-when-parsing-connect-in-confi.patch
|
||||
# PATCH-FEATURE-UPSTREAM 0004-lircd-fix-compiler-error-format-security-error.patch --fix compiler error=format-security error
|
||||
Patch3: 0004-lircd-fix-compiler-error-format-security-error.patch
|
||||
# PATCH-FEATURE-UPSTREAM -- lirc config for iMON-PAD remote
|
||||
Patch90: imon2_conf.patch
|
||||
Requires: udev
|
||||
Recommends: lirc-remotes
|
||||
Suggests: lirc-kmp
|
||||
Supplements: lirc-kmp
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: pkgconfig(udev)
|
||||
%define _udevdir %(pkg-config --variable udevdir udev)
|
||||
%if ! %{defined _rundir}
|
||||
%define _rundir %{_localstatedir}/run
|
||||
%endif
|
||||
|
||||
Requires(pre): %fillup_prereq
|
||||
Requires(pre): %insserv_prereq
|
||||
%{?systemd_requires}
|
||||
|
||||
%description
|
||||
LIRC is a package that supports receiving and sending IR signals with
|
||||
@ -117,134 +110,98 @@ Conflicts: lirc <= 0.8.4
|
||||
The LIRC client library. To actually use LIRC the lircd daemon from
|
||||
the 'lirc' package has to be configured and started.
|
||||
|
||||
%package disable-kernel-rc
|
||||
Summary: Disable kernel ir device handling in favor of lirc
|
||||
Group: Hardware/Other
|
||||
Recommends: lirc = %{version}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%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.
|
||||
|
||||
# Don't provide or require anything from _docdir, per policy.
|
||||
%global __provides_exclude_from ^%{_docdir}/.*$
|
||||
%global __requires_exclude_from ^%{_docdir}/.*$
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}%{?snapshot:-%snapshot}
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch90 -p1
|
||||
cp %{SOURCE8} .
|
||||
#find . -type d -name CVS -print0 | xargs -0 -- rm -rf
|
||||
#find . -name .cvsignore -print0 | xargs -0 -- rm -rf
|
||||
|
||||
# automake 1.13 deprecated the old macro
|
||||
sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.ac
|
||||
mkdir m4
|
||||
%if %{defined _rundir}
|
||||
# Fix rundir for openSUSE > 13.1
|
||||
sed -i 's|${localstatedir}/run|run|g' configure
|
||||
%else
|
||||
# But fix systemd unit files for openSUSE <= 13.1
|
||||
sed -i 's|run|%{_localstatedir}/run|g' systemd/lircd.socket
|
||||
%endif
|
||||
|
||||
%build
|
||||
%if 0%{?suse_version} < 1020
|
||||
# XXX: hw_i2cuser doesn't build on sles10
|
||||
sed -i -e 's/linux\/i2c-dev\.h/foobarblah.h/' configure.ac
|
||||
%endif
|
||||
%{?suse_update_config:%{suse_update_config -fl}}
|
||||
autoreconf -vfi
|
||||
autoreconf -fi
|
||||
PYTHON=/usr/bin/python \
|
||||
CFLAGS="%{optflags}" ./configure \
|
||||
--disable-static \
|
||||
--disable-dependency-tracking \
|
||||
--prefix=%{_prefix} \
|
||||
--mandir=%{_mandir} \
|
||||
--libdir=%{_libdir} \
|
||||
--sysconfdir=/etc \
|
||||
CFLAGS="%{optflags} -fno-strict-aliasing" %configure \
|
||||
--with-igor \
|
||||
--with-transmitter \
|
||||
--with-driver=userspace \
|
||||
--with-port=0x3f8 \
|
||||
--with-irq=4 \
|
||||
--with-syslog
|
||||
make -C daemons
|
||||
make -C tools
|
||||
make -C doc
|
||||
# make %%{?_smp_mflags}
|
||||
# parallel makes are currently busted, do single-threaded for now
|
||||
make
|
||||
chmod -R u+w remotes
|
||||
chmod -R +r remotes
|
||||
rm -rf remotes/*/.xvpics/
|
||||
perl %{SOURCE6} remotes
|
||||
%if 0%{?snapshot:1}
|
||||
if [ ! -e doc/lirc.hwdb ]; then
|
||||
make -C doc release
|
||||
fi
|
||||
%endif
|
||||
|
||||
%install
|
||||
# lirc
|
||||
make -C daemons DESTDIR=%{buildroot} install
|
||||
make -C tools DESTDIR=%{buildroot} install
|
||||
make -C doc DESTDIR=%{buildroot} install
|
||||
mkdir -p %{buildroot}%{_datadir}/lirc
|
||||
cp -a remotes %{buildroot}%{_datadir}/lirc
|
||||
install -d -m 755 %{buildroot}/dev
|
||||
mkdir -p %{buildroot}%{_rundir}/lirc
|
||||
touch %{buildroot}%{_rundir}/lirc/lircd
|
||||
chmod 600 %{buildroot}%{_rundir}/lirc/*
|
||||
# lircd init scripts
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/init.d \
|
||||
%{buildroot}%{_sbindir} \
|
||||
%{buildroot}%{_localstatedir}/adm/fillup-templates
|
||||
install -m 0755 %{SOURCE4} %{buildroot}%{_initddir}/lirc
|
||||
ln -sf ../../etc/init.d/lirc %{buildroot}%{_sbindir}/rclirc
|
||||
install -m 0644 %{SOURCE5} %{buildroot}%{_localstatedir}/adm/fillup-templates
|
||||
make DESTDIR=%{buildroot} install
|
||||
# Put remote definitions in place
|
||||
cp -ar remotes %{buildroot}%{_datadir}/lirc-remotes
|
||||
# Create backward compatibility symlink
|
||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{name}
|
||||
mkdir -p %{buildroot}%{_tmpfilesdir}
|
||||
echo "d /var/run/lirc 0755 root root 10d" \
|
||||
> $RPM_BUILD_ROOT/%{_tmpfilesdir}/lirc.conf
|
||||
#
|
||||
# udev stuff
|
||||
install -d -m 755 %{buildroot}/%_udevdir/rules.d
|
||||
install -d -m 755 %{buildroot}/sbin
|
||||
install -m 644 %{SOURCE9} %{buildroot}/%_udevdir/rules.d
|
||||
find %{buildroot}%{_datadir}/lirc -perm +111 -type f -print0 | xargs -r -0 chmod a-x
|
||||
#
|
||||
install -Dpm 644 contrib/99-remote-control-lirc.rules \
|
||||
%{buildroot}%{_udevrulesdir}/99-remote-control-lirc.rules
|
||||
# get rid of libtool file
|
||||
rm -f %{buildroot}%{_libdir}/liblirc_client.la
|
||||
#
|
||||
# get rid of useless contrib stuff
|
||||
rm contrib/lirc.*
|
||||
#
|
||||
# ghost files
|
||||
install -D -m 644 /dev/null %{buildroot}%{_sysconfdir}/lirc/lircd.conf
|
||||
install -D -m 644 /dev/null %{buildroot}%{_sysconfdir}/lirc/lircmd.conf
|
||||
install -D -m 644 /dev/null %{buildroot}%{_sysconfdir}/lirc/lircrc
|
||||
# Don't install documentation in a non standard directory
|
||||
rm -rf %{buildroot}%{_datadir}/doc
|
||||
# hide python dependency
|
||||
chmod 644 %{buildroot}%{_bindir}/pronto2lirc
|
||||
mkdir -p %{buildroot}%{_rundir}
|
||||
# Remove old %{_rundir}; depreciated but still installed by lirc, which is not looking for it
|
||||
rm -rf %{buildroot}%{_localstatedir}
|
||||
#
|
||||
#
|
||||
%if 0%{?suse_version} > 1020
|
||||
%fdupes %{buildroot}
|
||||
%endif
|
||||
%fdupes -s %{buildroot}
|
||||
%fdupes -s .
|
||||
|
||||
%files
|
||||
%defattr (-,root,root)
|
||||
%doc ANNOUNCE AUTHORS COPYING ChangeLog NEWS README TODO
|
||||
%doc README.SUSE
|
||||
%doc doc/html doc/images doc/lirc.hwdb doc/lirc.css doc/irxevent.keys
|
||||
%doc contrib
|
||||
%dir %ghost %{_rundir}/lirc
|
||||
%ghost %{_rundir}/lirc/lircm
|
||||
%ghost %{_rundir}/lirc/lircd
|
||||
%attr(0755,root,root)/usr/bin/*
|
||||
%{_sbindir}/*
|
||||
%{_sysconfdir}/init.d/lirc
|
||||
%{_localstatedir}/adm/fillup-templates/sysconfig.lirc
|
||||
%_udevdir/rules.d/51-lirc.rules
|
||||
%doc %{_mandir}/man1/*
|
||||
%doc %{_mandir}/man8/*
|
||||
%dir %{_sysconfdir}/lirc
|
||||
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/lirc/lircd.conf
|
||||
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/lirc/lircmd.conf
|
||||
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) %{_sysconfdir}/lirc/lircrc
|
||||
%post -n liblirc_client0 -p /sbin/ldconfig
|
||||
|
||||
%files devel
|
||||
%defattr (-,root,root)
|
||||
%dir %{_includedir}/lirc
|
||||
%{_includedir}/lirc/lirc_client.h
|
||||
%{_libdir}/liblirc_client.so
|
||||
%postun -n liblirc_client0 -p /sbin/ldconfig
|
||||
|
||||
%files remotes
|
||||
%defattr (-,root,root)
|
||||
%{_datadir}/lirc
|
||||
|
||||
%files -n liblirc_client0
|
||||
%defattr (-,root,root)
|
||||
%{_libdir}/liblirc_client.so.*
|
||||
|
||||
%preun
|
||||
%stop_on_removal lirc
|
||||
%pre
|
||||
%service_add_pre lircd.service lircmd.service lircd.socket
|
||||
|
||||
%post
|
||||
%{fillup_and_insserv lirc}
|
||||
%service_add_post lircd.service lircmd.service lircd.socket
|
||||
systemd-tmpfiles --create %{_tmpfilesdir}/lirc.conf
|
||||
# config files moved to /etc/lirc in 0.8.6
|
||||
for file in lircd.conf lircmd.conf lircrc; do
|
||||
if [ -e /etc/$file -a ! -L /etc/$file ]; then
|
||||
@ -257,12 +214,49 @@ for file in lircd.conf lircmd.conf lircrc; do
|
||||
fi
|
||||
done
|
||||
|
||||
%post -n liblirc_client0 -p /sbin/ldconfig
|
||||
|
||||
%postun -n liblirc_client0 -p /sbin/ldconfig
|
||||
%preun
|
||||
%service_del_preun lircd.service lircmd.service lircd.socket
|
||||
|
||||
%postun
|
||||
%restart_on_update lirc
|
||||
%{insserv_cleanup}
|
||||
%service_del_postun lircd.service lircmd.service lircd.socket
|
||||
|
||||
%files
|
||||
%defattr (-,root,root)
|
||||
%doc AUTHORS COPYING ChangeLog NEWS README TODO
|
||||
%doc README.SUSE
|
||||
%doc doc/html doc/images doc/lirc.hwdb doc/lirc.css doc/irxevent.keys
|
||||
%doc contrib
|
||||
%dir %ghost %{_rundir}/lirc
|
||||
%ghost %{_rundir}/lirc/lircm
|
||||
%ghost %{_rundir}/lirc/lircd
|
||||
%attr(0755,root,root)/usr/bin/*
|
||||
%{_sbindir}/*
|
||||
%_udevdir/rules.d/51-lirc.rules
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man8/*
|
||||
%dir %{_sysconfdir}/lirc
|
||||
%config(noreplace,missingok) %{_sysconfdir}/lirc/lircd.conf
|
||||
%config(noreplace,missingok) %{_sysconfdir}/lirc/lircmd.conf
|
||||
%config(noreplace,missingok) %{_sysconfdir}/lirc/lirc_options.conf
|
||||
%{_unitdir}/lirc*
|
||||
%{_tmpfilesdir}/lirc.conf
|
||||
|
||||
%files devel
|
||||
%defattr (-,root,root)
|
||||
%dir %{_includedir}/lirc
|
||||
%{_includedir}/lirc/lirc_client.h
|
||||
%{_libdir}/liblirc_client.so
|
||||
|
||||
%files remotes
|
||||
%defattr (-,root,root)
|
||||
%{_datadir}/lirc-remotes
|
||||
|
||||
%files -n liblirc_client0
|
||||
%defattr (-,root,root)
|
||||
%{_libdir}/liblirc_client.so.*
|
||||
|
||||
%files disable-kernel-rc
|
||||
%defattr (-,root,root)
|
||||
%{_udevrulesdir}/99-remote-control-lirc.rules
|
||||
|
||||
%changelog
|
||||
|
150
rc.lirc
150
rc.lirc
@ -1,150 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Copyright (c) 1995-2002 SuSE Linux AG, Nuernberg, Germany.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Author: Kurt Garloff <feedback@suse.de>
|
||||
# Author: Ludwig Nussel <feedback@suse.de>
|
||||
#
|
||||
# /etc/init.d/lirc
|
||||
# and its symbolic link
|
||||
# /usr/sbin/rclirc
|
||||
#
|
||||
# LSB compatible service control script; see http://www.linuxbase.org/spec/
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: lirc
|
||||
# Required-Start: $remote_fs
|
||||
# Required-Stop: $remote_fs
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: lirc daemon
|
||||
# Description: The main task of lircd is to decode the infrared
|
||||
# signals and provide an uniform interface for client applications
|
||||
### END INIT INFO
|
||||
|
||||
# Check for missing binaries (stale symlinks should not happen)
|
||||
lircd_BIN=/usr/sbin/lircd
|
||||
test -x $lircd_BIN || exit 5
|
||||
|
||||
# Check for existence of needed config file and read it
|
||||
lircd_CONFIG=/etc/sysconfig/lirc
|
||||
test -r $lircd_CONFIG || exit 6
|
||||
. $lircd_CONFIG
|
||||
|
||||
lircd_CONF=/etc/lirc/lircd.conf
|
||||
lircd_PID=/var/run/lirc/lircd.pid
|
||||
|
||||
. /etc/rc.status
|
||||
|
||||
rc_reset
|
||||
|
||||
setdefaults()
|
||||
{
|
||||
# set LIRCD_DEVICE default if unset
|
||||
for retries in 1 2; do
|
||||
if test "$LIRCD_DEVICE" != ""; then
|
||||
break;
|
||||
fi
|
||||
if test -L "/dev/input/ir"; then
|
||||
# have input driver
|
||||
LIRCD_DEVICE="/dev/input/ir"
|
||||
elif grep -q BaseRemoteCtl /proc/devices && [ -e /dev/lirc0 -o -e /dev/lirc ]; then
|
||||
# have lirc driver
|
||||
if [ -e /dev/lirc0 ]; then
|
||||
LIRCD_DEVICE="/dev/lirc0"
|
||||
else
|
||||
LIRCD_DEVICE="/dev/lirc"
|
||||
fi
|
||||
else
|
||||
# wait for udev and try again
|
||||
udevadm settle
|
||||
fi
|
||||
done
|
||||
|
||||
# set LIRCD_DRIVER default if unset
|
||||
if test "$LIRCD_DRIVER" = "" -a "$LIRCD_DEVICE" = "/dev/input/ir"; then
|
||||
LIRCD_DRIVER="dev/input"
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting lircd "
|
||||
modinfo evdev > /dev/null 2>&1 && modprobe evdev || :
|
||||
if test "$LIRC_MODULE" != ""; then
|
||||
modprobe "$LIRC_MODULE"
|
||||
fi
|
||||
setdefaults
|
||||
if [ -z "$LIRCD_DRIVER" -a -z "$LIRCD_DEVICE" -a ! -e /dev/lirc ]; then
|
||||
echo -n "Error: no device found"
|
||||
rc_failed 6
|
||||
rc_status -v
|
||||
rc_exit
|
||||
fi
|
||||
if [ ! -e "$lircd_CONF" ]; then
|
||||
DEVINPUTCONF='/usr/share/lirc/remotes/devinput/lircd.conf.devinput'
|
||||
if [ "$LIRCD_DEVICE" = "/dev/input/ir" -a -e "$LIRCD_DEVICE" -a -e "$DEVINPUTCONF" ]; then
|
||||
install -m 644 "$DEVINPUTCONF" "$lircd_CONF"
|
||||
else
|
||||
echo -n "Error: please create "$lircd_CONF""
|
||||
rc_failed 6
|
||||
rc_status -v
|
||||
rc_exit
|
||||
fi
|
||||
fi
|
||||
[ -n "$LIRCD_DEVICE" ] && echo -n "($LIRCD_DEVICE)"
|
||||
install -d -m 755 /var/run/lirc
|
||||
install -m "$LIRCD_DEV_PERMISSIONS" /dev/null /var/run/lirc/lircd
|
||||
chown "$LIRCD_DEV_OWNER" /var/run/lirc/lircd
|
||||
if [ ! -L /dev/lircd ]; then
|
||||
rm -f /dev/lircd
|
||||
ln -s /var/run/lirc/lircd /dev/lircd
|
||||
fi
|
||||
|
||||
lircd_ARGS=()
|
||||
[ -n "$LIRCD_DRIVER" ] && lircd_ARGS+=(-H "$LIRCD_DRIVER")
|
||||
[ -n "$LIRCD_DEVICE" ] && lircd_ARGS+=(-d "$LIRCD_DEVICE")
|
||||
[ -n "$LIRCD_LISTENPORT" ] && lircd_ARGS+=(--listen="$LIRCD_LISTENPORT")
|
||||
[ -n "$LIRCD_CONNECT" ] && lircd_ARGS+=(-c "$LIRCD_CONNECT")
|
||||
|
||||
start_daemon -p $lircd_PID $lircd_BIN "${lircd_ARGS[@]}"
|
||||
rc_status -v
|
||||
;;
|
||||
stop)
|
||||
echo -n "Shutting down lircd "
|
||||
killproc -TERM -p $lircd_PID $lircd_BIN
|
||||
rc_status -v
|
||||
;;
|
||||
try-restart)
|
||||
$0 status >/dev/null && $0 restart
|
||||
rc_status
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
rc_status
|
||||
;;
|
||||
force-reload|reload)
|
||||
echo -n "Reload service lircd "
|
||||
killproc -HUP $lircd_BIN
|
||||
touch "$lircd_PID"
|
||||
rc_status -v
|
||||
;;
|
||||
status)
|
||||
echo -n "Checking for service lircd "
|
||||
checkproc -p $lircd_PID $lircd_BIN
|
||||
rc_status -v
|
||||
;;
|
||||
probe)
|
||||
if test "$lircd_CONFIG" -nt "$lircd_PID"; then
|
||||
echo reload
|
||||
elif test "$lircd_CONF" -nt "$lircd_PID"; then
|
||||
echo reload
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
rc_exit
|
@ -1,55 +0,0 @@
|
||||
## Path: Hardware/Lirc
|
||||
## Description: lirc (infrared remote control) configuration
|
||||
## ServiceRestart: lirc
|
||||
|
||||
## Type: string
|
||||
## Default: "660"
|
||||
#
|
||||
# permissions for /dev/lircd
|
||||
#
|
||||
LIRCD_DEV_PERMISSIONS="660"
|
||||
|
||||
## Type: string
|
||||
## Default: "root:video"
|
||||
#
|
||||
# owner and group for /dev/lircd
|
||||
#
|
||||
LIRCD_DEV_OWNER="root:video"
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
#
|
||||
# use given driver
|
||||
#
|
||||
LIRCD_DRIVER=""
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
#
|
||||
# read from given device
|
||||
#
|
||||
LIRCD_DEVICE=""
|
||||
|
||||
## Type: string(lirc_bt829,lirc_gpio,lirc_i2c,lirc_it87,lirc_parallel,lirc_sir,ir-kbd-i2c,ir-kbd-gpio)
|
||||
## Default: ""
|
||||
#
|
||||
# load given lirc driver module
|
||||
#
|
||||
LIRC_MODULE=
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
#
|
||||
# listen for network connections on specified port.
|
||||
# WARNING: don't use this on a machine with an internet
|
||||
# connection as lircd is running as root!
|
||||
#
|
||||
LIRCD_LISTENPORT=
|
||||
|
||||
## Type: string
|
||||
## Default: ""
|
||||
#
|
||||
# connect lircd to specified host
|
||||
#
|
||||
LIRCD_CONNECT=
|
||||
|
Loading…
x
Reference in New Issue
Block a user