From e6acbb565a793cb0de650bfce064fb9ab63c2739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Thu, 14 Feb 2008 18:58:02 +0000 Subject: [PATCH] - Split libraries into -libs subpackage. - Refresh autotools re-run avoidance hack. --- lirc.spec | 46 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/lirc.spec b/lirc.spec index f8f6184..7dab4a2 100644 --- a/lirc.spec +++ b/lirc.spec @@ -6,7 +6,7 @@ # - 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 into -libs and -utils (daemons in main package)? +# - split utils into subpackage (keep daemons in main package) # - don't run as root and/or create dedicated group, reduce fifo permissions? # - Fixup /etc/lirc(m)d.conf %%ghost'ification, existence after erase etc. @@ -14,11 +14,11 @@ %bcond_with portaudio %bcond_with svgalib %bcond_without x -%define pre pre1 +%define pre pre1 Name: lirc Version: 0.8.3 -Release: 0.1.%{?pre}%{?dist} +Release: 0.2%{?pre:.%{pre}}%{?dist} Summary: The Linux Infrared Remote Control package Group: System Environment/Daemons @@ -44,6 +44,7 @@ BuildRequires: svgalib-devel %if %{with x} BuildRequires: libXt-devel %endif +Requires: %{name}-libs = %{version}-%{release} Requires(post): /sbin/chkconfig Requires(post): /sbin/ldconfig Requires(preun): /sbin/chkconfig @@ -56,10 +57,22 @@ Included applications include daemons which decode the received signals as well as user space applications which allow controlling a computer with a remote control. +%package libs +Summary: LIRC libraries +Group: System Environment/Libraries + +%description libs +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 shared libraries +that applications use to interface with LIRC. + %package devel Summary: Development files for LIRC Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} %description devel LIRC is a package that allows you to decode and send infra-red and @@ -84,17 +97,24 @@ documentation and a collection of remote control configuration files. %prep %setup -q -n %{name}-%{version}%{?pre} + chmod 644 contrib/* + 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|%{_initrddir}/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 + sed -i -e 's|"/lib /usr/lib |"/%{_lib} %{_libdir} |' configure # lib64 rpath + # *cough* I wish there was a good way to disable alsa/portaudio/svgalib... %if ! %{with alsa} sed -i -e 's/asoundlib.h/ALSA_DISABLED/g' configure* @@ -105,7 +125,8 @@ sed -i -e 's/portaudio.h/PORTAUDIO_DISABLED/g' configure* %if ! %{with svgalib} sed -i -e 's/vga.h/SVGALIB_DISABLED/g' configure* %endif -touch -r acconfig.h aclocal.m4 configure.in # avoid autofoo re-run + +touch -r acconfig.h aclocal.m4 configure.ac # avoid autofoo re-run %build @@ -164,9 +185,10 @@ rm -rf $RPM_BUILD_ROOT %post -/sbin/ldconfig /sbin/chkconfig --add lirc +%post libs -p /sbin/ldconfig + %preun if [ $1 -eq 0 ] ; then %{_initrddir}/lirc stop >/dev/null || : @@ -174,11 +196,12 @@ if [ $1 -eq 0 ] ; then fi %postun -/sbin/ldconfig if [ $1 -gt 0 ] ; then %{_initrddir}/lirc try-restart >/dev/null || : fi +%postun libs -p /sbin/ldconfig + %files %defattr(-,root,root,-) @@ -189,13 +212,16 @@ fi %{_bindir}/*ir* %{_bindir}/*mode2 %{_sbindir}/lirc*d -%{_libdir}/liblirc_client.so.* %{_datadir}/lirc/ %{_mandir}/man1/*ir*.1* %{_mandir}/man1/*mode2*.1* %{_mandir}/man8/lirc*d.8* %ghost /dev/lirc* +%files libs +%defattr(-,root,root,-) +%{_libdir}/liblirc_client.so.* + %files devel %defattr(-,root,root,-) %{_includedir}/lirc/ @@ -207,6 +233,10 @@ fi %changelog +* Tue Feb 12 2008 Ville Skyttä - 0.8.3-0.2.pre1 +- Split libraries into -libs subpackage. +- Refresh autotools re-run avoidance hack. + * Thu Oct 18 2007 Jarod Wilson - 0.8.3-0.1.pre1 - 0.8.3pre1 - adds Mac IR support, resolves bz #284291