|
|
|
@ -24,7 +24,7 @@
|
|
|
|
|
Name: lirc
|
|
|
|
|
Version: 0.9.0
|
|
|
|
|
%if 0%{?released}
|
|
|
|
|
Release: 8%{?dist}
|
|
|
|
|
Release: 9%{?dist}
|
|
|
|
|
%else
|
|
|
|
|
Release: 0.1.%{pre}%{?dist}
|
|
|
|
|
%endif
|
|
|
|
@ -38,8 +38,9 @@ Source0: http://downloads.sourceforge.net/lirc/%{name}-%{version}.tar.bz2
|
|
|
|
|
%else
|
|
|
|
|
Source0: http://www.lirc.org/software/snapshots/%{name}-%{version}-%{pre}.tar.bz2
|
|
|
|
|
%endif
|
|
|
|
|
Source1: %{name}.init
|
|
|
|
|
Source1: %{name}.service
|
|
|
|
|
Source2: %{name}.sysconfig
|
|
|
|
|
Source3: %{name}md.service
|
|
|
|
|
Patch0: lirc-0.9.0-libusb-config-is-no-more.patch
|
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
|
|
|
|
|
@ -68,10 +69,13 @@ BuildRequires: libXt-devel
|
|
|
|
|
BuildRequires: iguanaIR-devel
|
|
|
|
|
%endif
|
|
|
|
|
Requires: %{name}-libs = %{version}-%{release}
|
|
|
|
|
Requires(post): /sbin/chkconfig
|
|
|
|
|
Requires(post): /sbin/ldconfig
|
|
|
|
|
Requires(preun): /sbin/chkconfig
|
|
|
|
|
Requires(postun): /sbin/ldconfig
|
|
|
|
|
Requires(post): systemd-units
|
|
|
|
|
Requires(preun): systemd-units
|
|
|
|
|
Requires(postun): systemd-units
|
|
|
|
|
#for triggerun
|
|
|
|
|
Requires(post): systemd-sysv
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
LIRC is a package that allows you to decode and send infra-red and
|
|
|
|
@ -208,12 +212,8 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/man1/xmode2.1*
|
|
|
|
|
|
|
|
|
|
install -Dpm 644 doc/lirc.hwdb $RPM_BUILD_ROOT%{_datadir}/lirc/lirc.hwdb
|
|
|
|
|
|
|
|
|
|
install -Dpm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/lirc
|
|
|
|
|
%{__perl} -pi -e \
|
|
|
|
|
's|/etc/|%{_sysconfdir}/|g ;
|
|
|
|
|
s|/var/|%{_localstatedir}/|g ;
|
|
|
|
|
s|/usr/sbin/|%{_sbindir}/|g' \
|
|
|
|
|
$RPM_BUILD_ROOT%{_initrddir}/lirc
|
|
|
|
|
install -Dpm 644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/lirc.service
|
|
|
|
|
install -Dpm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/lircmd.service
|
|
|
|
|
install -Dpm 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/lirc
|
|
|
|
|
|
|
|
|
|
mkdir __docs
|
|
|
|
@ -246,7 +246,10 @@ rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
/sbin/chkconfig --add lirc
|
|
|
|
|
if [ $1 -eq 1 ] ; then
|
|
|
|
|
# Initial installation
|
|
|
|
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
|
|
|
fi
|
|
|
|
|
# If we're upgrading, move config files into their new location, if need be
|
|
|
|
|
if [ $1 -ge 2 ] ; then
|
|
|
|
|
if [ -e %{_sysconfdir}/lircd.conf -a ! -e %{_sysconfdir}/lirc/lircd.conf ]; then
|
|
|
|
@ -261,20 +264,44 @@ fi
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
|
%{_initrddir}/lirc stop >/dev/null || :
|
|
|
|
|
/sbin/chkconfig --del lirc || :
|
|
|
|
|
# Package removal, not upgrade
|
|
|
|
|
/bin/systemctl --no-reload disable lirc.service > /dev/null 2>&1 || :
|
|
|
|
|
/bin/systemctl stop lirc.service > /dev/null 2>&1 || :
|
|
|
|
|
/bin/systemctl --no-reload disable lircmd.service > /dev/null 2>&1 || :
|
|
|
|
|
/bin/systemctl stop lircmd.service > /dev/null 2>&1 || :
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
|
|
|
if [ $1 -ge 1 ] ; then
|
|
|
|
|
# Package upgrade, not uninstall
|
|
|
|
|
/bin/systemctl try-restart lirc.service >/dev/null 2>&1 || :
|
|
|
|
|
/bin/systemctl try-restart lircmd.service >/dev/null 2>&1 || :
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%postun libs -p /sbin/ldconfig
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%triggerun -- lirc < 0.9.0-9
|
|
|
|
|
# Save the current service runlevel info
|
|
|
|
|
# User must manually run systemd-sysv-convert --apply lirc
|
|
|
|
|
# to migrate them to systemd targets
|
|
|
|
|
/usr/bin/systemd-sysv-convert --save lirc >/dev/null 2>&1 ||:
|
|
|
|
|
|
|
|
|
|
# Run these because the SysV package being removed won't do them
|
|
|
|
|
/sbin/chkconfig --del lirc >/dev/null 2>&1 || :
|
|
|
|
|
/bin/systemctl try-restart lirc.service >/dev/null 2>&1 || :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc ANNOUNCE AUTHORS ChangeLog COPYING NEWS README TODO
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/lirc/lirc*d.conf
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/lirc
|
|
|
|
|
%config(noreplace) %{_sysconfdir}/tmpfiles.d/lirc.conf
|
|
|
|
|
%{_initrddir}/lirc
|
|
|
|
|
%{_unitdir}/lirc*
|
|
|
|
|
%{_bindir}/*ir*
|
|
|
|
|
%{_bindir}/*mode2
|
|
|
|
|
%{_sbindir}/lirc*d
|
|
|
|
@ -307,6 +334,9 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu Apr 19 2012 Jon Ciesla <limburgher@gmail.com> - 0.9.0-9
|
|
|
|
|
- Migrate to systemd, BZ 789760.
|
|
|
|
|
|
|
|
|
|
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-8
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|