|
@@ -1,7 +1,11 @@
|
|
|
+%{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
|
+
|
|
|
+%global _udevrulesdir /lib/udev/rules.d
|
|
|
+
|
|
|
Summary: The Linux Infrared Remote Control package.
|
|
|
Summary(ja): 赤外線リモートコントロールパッケージ
|
|
|
Name: lirc
|
|
|
-Version: 0.9.0
|
|
|
+Version: 0.9.4a
|
|
|
Release: 1%{?_dist_release}
|
|
|
License: GPL
|
|
|
Group: System Environment/Daemons
|
|
@@ -10,15 +14,19 @@ Source0: http://prdownloads.sourceforge.net/lirc/%{name}-%{version}.tar.bz2
|
|
|
Source1: lirc.init
|
|
|
Source2: lircd.logrotate
|
|
|
Source3: lirc.sysconfig
|
|
|
-Patch0: lirc-use-new-instead-of-conf-as-filename-suffix.patch
|
|
|
+Source4: 99-remote-control-lirc.rules
|
|
|
+
|
|
|
+Patch1: 0001-Changing-effective-user-default.patch
|
|
|
|
|
|
# Vine patch
|
|
|
|
|
|
BuildRequires: perl
|
|
|
-BuildRequires: libusb-devel, python-devel
|
|
|
+BuildRequires: libusb1-devel, python-devel
|
|
|
BuildRequires: automake libtool
|
|
|
BuildRequires: alsa-lib-devel
|
|
|
BuildRequires: libXt-devel
|
|
|
+BuildRequires: libxslt
|
|
|
+BuildRequires: python3
|
|
|
## Currently not supportd (yet) for Vine Linux
|
|
|
#BuildRequires: libftdi-devel, libirman-devel
|
|
|
Requires(post): /sbin/chkconfig
|
|
@@ -44,6 +52,22 @@ LIRC は 'Linux Infra-red Remote Control' の略です。
|
|
|
このパッケージには Linux で赤外線リモコンをサポートする為に
|
|
|
必要なデーモンといくつかのユーティリティが含まれています。
|
|
|
|
|
|
+
|
|
|
+%package devel
|
|
|
+Summary: Development files for LIRC
|
|
|
+Summary(ja): LIRCを用いた開発用のファイル
|
|
|
+Group: Development/Libraries
|
|
|
+Requires: lirc = %{version}-%{release}
|
|
|
+
|
|
|
+%description devel
|
|
|
+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 includes files for
|
|
|
+developing applications that use LIRC.
|
|
|
+
|
|
|
+
|
|
|
%package -n dkms-%{name}
|
|
|
Summary: Kernel modules for LIRC
|
|
|
Group: System Environment/Kernel
|
|
@@ -105,41 +129,13 @@ Note that lirc_gpio and lirc_parallel are in packages of their own.
|
|
|
|
|
|
%prep
|
|
|
%setup -q
|
|
|
-%patch0 -p1 -b .suffix
|
|
|
-
|
|
|
-%{__chmod} 644 contrib/*
|
|
|
-%{__chmod} +x contrib/hal
|
|
|
-%{__sed} -i -e 's|/usr/local/etc/|/etc/|' contrib/irman2lirc
|
|
|
-%{__sed} -i -e 's/\r//' remotes/hercules/lircd.conf.smarttv_stereo \
|
|
|
- remotes/adstech/lircd.conf.usbx-707
|
|
|
-%{__sed} -i -e 's|/sbin/init.d/lircd|%{_initdir}/lirc|' contrib/lircs
|
|
|
-for f in remotes/chronos/lircd.conf.chronos \
|
|
|
- remotes/creative/lircd.conf.livedrive \
|
|
|
- remotes/atiusb/lircd.conf.atiusb \
|
|
|
- NEWS ChangeLog AUTHORS contrib/lircrc ; do
|
|
|
- iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 ; mv $f.utf8 $f
|
|
|
-done
|
|
|
-
|
|
|
-# use /dev/lirc0 by default instead of /dev/lirc
|
|
|
-%{__sed} -i -e 's|#define DEV_LIRC "lirc"|#define DEV_LIRC "lirc0"|' config.h.in
|
|
|
-
|
|
|
-# use fixed instead of Courier w/xmode2, should be more prevalent on linux boxen
|
|
|
-%{__sed} -i -e 's|char.*font1_name.*Courier.*$|char font1_name[]="-misc-fixed-*-r-*-*-12-*-*-*-*-*-iso8859-1";|g' tools/xmode2.c
|
|
|
|
|
|
-# lib64 rpath
|
|
|
-%{__sed} -i -e 's|"/lib /usr/lib |"/%{_lib} %{_libdir} |' configure
|
|
|
+%patch1 -p1
|
|
|
+sed -i -e 's|/usr/local/etc/|/etc/|' contrib/irman2lirc
|
|
|
|
|
|
-# *cough* I wish there was a good way to disable portaudio/svgalib...
|
|
|
-%{__sed} -i -e 's/portaudio.h/PORTAUDIO_DISABLED/g' configure*
|
|
|
-%{__sed} -i -e 's/vga.h/SVGALIB_DISABLED/g' configure*
|
|
|
-
|
|
|
-# avoid autofoo re-run
|
|
|
-touch -r aclocal.m4 configure.ac
|
|
|
-
|
|
|
-# Do this after, as we're touching the remote definitions earlier
|
|
|
-# Don't create a backup, or the original definitions will get installed
|
|
|
|
|
|
%build
|
|
|
+autoreconf -if
|
|
|
%configure \
|
|
|
--disable-static \
|
|
|
--disable-manage-devices \
|
|
@@ -157,35 +153,21 @@ touch -r aclocal.m4 configure.ac
|
|
|
%{__make} install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
|
%{__install} -Dpm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initdir}/lirc
|
|
|
-%{__perl} -pi -e \
|
|
|
- 's|/etc/|%{_sysconfdir}/|g ;
|
|
|
- s|/var/|%{_localstatedir}/|g ;
|
|
|
- s|/usr/sbin/|%{_sbindir}/|g' \
|
|
|
- $RPM_BUILD_ROOT%{_initdir}/lirc
|
|
|
#%{__install} -m 644 -D %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/lircd
|
|
|
%{__install} -Dpm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/lirc
|
|
|
|
|
|
-%{__install} -Dpm 644 doc/lirc.hwdb $RPM_BUILD_ROOT%{_datadir}/lirc/lirc.hwdb
|
|
|
-
|
|
|
-%{__install} -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/lirc
|
|
|
-touch $RPM_BUILD_ROOT%{_sysconfdir}/lirc/lirc{d,md}.conf
|
|
|
-
|
|
|
-%{__install} -dm 755 $RPM_BUILD_ROOT%{_localstatedir}/run/lirc/
|
|
|
-touch $RPM_BUILD_ROOT%{_localstatedir}/run/lirc/lirc{d,m}
|
|
|
-
|
|
|
-# Put remote definitions in place
|
|
|
-cp -ar remotes $RPM_BUILD_ROOT%{_datadir}/lirc-remotes
|
|
|
+cd $RPM_BUILD_ROOT%{_datadir}/lirc/contrib
|
|
|
+chmod 755 irman2lirc
|
|
|
+cd $OLDPWD
|
|
|
+rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
|
|
+rm $RPM_BUILD_ROOT%{_libdir}/lirc/plugins/*.la
|
|
|
|
|
|
-# Remove unpacked file
|
|
|
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/liblirc_client.la
|
|
|
-
|
|
|
-# Remove unnecessary documents
|
|
|
-%{__mkdir} __docs
|
|
|
-%{__cp} -pR doc contrib __docs
|
|
|
-pushd __docs
|
|
|
-%{__rm} -rf doc/Makefile* doc/.libs doc/man* doc/lirc.hwdb
|
|
|
-%{__rm} -rf contrib/irman2lirc contrib/lirc.* contrib/sendxevent.c
|
|
|
-popd
|
|
|
+install -pm 755 contrib/irman2lirc $RPM_BUILD_ROOT%{_bindir}
|
|
|
+install -Dpm 644 contrib/60-lirc.rules \
|
|
|
+ $RPM_BUILD_ROOT%{_udevrulesdir}/60-lirc.rules
|
|
|
+install -Dpm 644 %{SOURCE4} \
|
|
|
+ $RPM_BUILD_ROOT%{_udevrulesdir}/99-remote-control-lirc.rules
|
|
|
+cp -a %{SOURCE1} README.fedora
|
|
|
|
|
|
|
|
|
## For DKMS sub packagtes
|
|
@@ -194,7 +176,7 @@ popd
|
|
|
for lircsrcdir in %{name}; do
|
|
|
|
|
|
install -d -m755 $RPM_BUILD_ROOT/usr/src/$lircsrcdir-%{version}-%{release}
|
|
|
-cp -a Makefile Makefile.in Makefile.am acinclude.m4 \
|
|
|
+cp -a Makefile Makefile.in Makefile.am \
|
|
|
configure.ac config.status config.h \
|
|
|
$RPM_BUILD_ROOT/usr/src/$lircsrcdir-%{version}-%{release}
|
|
|
|
|
@@ -260,6 +242,16 @@ done
|
|
|
#done
|
|
|
|
|
|
|
|
|
+%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
|
|
|
+usermod -a -G dialout lirc &> /dev/null || :
|
|
|
+usermod -a -G lock lirc &> /dev/null || :
|
|
|
+usermod -a -G input lirc &> /dev/null || :
|
|
|
+exit 0
|
|
|
+
|
|
|
%post
|
|
|
/sbin/chkconfig --add lirc
|
|
|
# If we're upgrading, move config files into their new location, if need be
|
|
@@ -316,20 +308,33 @@ dkms remove -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --all || :
|
|
|
|
|
|
%files
|
|
|
%defattr(-, root, root)
|
|
|
-%doc ANNOUNCE AUTHORS ChangeLog COPYING NEWS README TODO
|
|
|
+%license COPYING
|
|
|
+%doc ANNOUNCE AUTHORS ChangeLog NEWS README TODO
|
|
|
%doc __docs/*
|
|
|
%{_initdir}/lirc
|
|
|
#/etc/logrotate.d/lircd
|
|
|
-%ghost %config(noreplace) %{_sysconfdir}/lirc/lirc*d.conf
|
|
|
+%dir %{_sysconfdir}/lirc
|
|
|
+%dir %{_sysconfdir}/lirc/lircd.conf.d
|
|
|
+%ghost %config(noreplace) %{_sysconfdir}/lirc/*.conf
|
|
|
+%ghost %config(noreplace) %{_sysconfdir}/lirc/irexec.lircrc
|
|
|
+%ghost %config(noreplace) %{_sysconfdir}/lirc/lircd.conf.d/*
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/lirc
|
|
|
%{_bindir}/*
|
|
|
%{_sbindir}/*
|
|
|
-%{_includedir}/lirc
|
|
|
-%{_libdir}/liblirc_*
|
|
|
+%{_libdir}/*.so.*
|
|
|
+%{_libdir}/lirc
|
|
|
%{_datadir}/lirc/
|
|
|
-%{_datadir}/lirc-remotes/
|
|
|
+%{_docdir}/lirc
|
|
|
%{_mandir}/man?/*
|
|
|
-%ghost %{_localstatedir}/run/lirc/lirc*
|
|
|
+%{_localstatedir}/lib/lirc
|
|
|
+%{_udevrulesdir}/*
|
|
|
+%{python3_sitelib}/lirc
|
|
|
+
|
|
|
+%files devel
|
|
|
+%{_includedir}/lirc/
|
|
|
+%{_includedir}/*.h
|
|
|
+%{_libdir}/*.so
|
|
|
+%{_libdir}/pkgconfig/*.pc
|
|
|
|
|
|
%files -n dkms-%{name}
|
|
|
%defattr(-,root,root)
|
|
@@ -345,6 +350,11 @@ dkms remove -m %{name} -v %{version}-%{release} --rpm_safe_upgrade --all || :
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
+* Sat Jul 16 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.9.4-1
|
|
|
+- updated to 0.9.4.
|
|
|
+- dropped Patch0.
|
|
|
+- added a subpackage: lirc-devel.
|
|
|
+
|
|
|
* Fri Dec 27 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.0-1
|
|
|
- update to 0.9.0
|
|
|
- remove Patch1 (lirc-0.8.6-standardized-remote-keycodes.patch)
|