]> git.pld-linux.org Git - packages/lirc.git/blobdiff - lirc.spec
- rebuild for kernel-3.7.10-4
[packages/lirc.git] / lirc.spec
index 7610c9abc6443350617a52ade91db147fd7e7b73..f12325ae2b078e51c52e6c634aa30618c24cd2a6 100644 (file)
--- a/lirc.spec
+++ b/lirc.spec
@@ -3,6 +3,7 @@
 # - try to make it use builder_kernel_modules and install_kernel_modules; I couldn't make it
 # - build is running kernel arch dependent, try to get rid of this
 # - libcaraca_client (http://caraca.sourceforge.net/) - no releases yet
+# - create modprobe alias files instead of reminding in post scriptlets
 #
 # Conditional build:
 %bcond_without dist_kernel     # without sources of distribution kernel
@@ -20,7 +21,7 @@
 %endif
 
 %define                pname   lirc
-%define                rel     31
+%define                rel     82
 
 #
 # main package
@@ -58,6 +59,8 @@ Patch3:               %{pname}-kernel.patch
 Patch4:                %{pname}-sparc.patch
 Patch5:                %{pname}-remotes.patch
 Patch6:                %{pname}-kernelcc.patch
+Patch7:                format-security.patch
+Patch8:                %{pname}-am.patch
 URL:           http://www.lirc.org/
 BuildRequires: alsa-lib-devel
 BuildRequires: autoconf >= 2.50
@@ -68,8 +71,8 @@ BuildRequires:        libirman-devel >= 0.4.5
 BuildRequires: libtool
 BuildRequires: libusb-compat-devel >= 0.1.0
 %if %{with kernel}
-BuildRequires: kernel%{_alt_kernel}-module-build
 BuildRequires: kernel%{_alt_kernel}-headers
+BuildRequires: kernel%{_alt_kernel}-module-build
 %endif
 %{?with_kernel:BuildRequires:  %{kgcc_package}}
 BuildRequires: rpm-pythonprov
@@ -77,8 +80,10 @@ BuildRequires:       rpmbuild(macros) >= 1.379
 %{?with_svga:BuildRequires:    svgalib-devel}
 %{?with_x:BuildRequires:       xorg-lib-libX11-devel}
 Requires(post,preun):  /sbin/chkconfig
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires:      %{pname}-libs = %{version}-%{release}
 Requires:      libftdi >= 0.12
+Requires:      rc-scripts
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %if %{without userspace}
@@ -91,8 +96,8 @@ of many (but not all) commonly used remote controls.
 
 %description -l pl.UTF-8
 LIRC to program pozwalający na dekodowanie nadchodzących oraz
-wysyłanie sygnałów w podczerwieni za pomocą wielu (ale nie
-wszystkich) popularnych urządzeń do zdalnego sterowania.
+wysyłanie sygnałów w podczerwieni za pomocą wielu (ale nie wszystkich)
+popularnych urządzeń do zdalnego sterowania.
 
 %package remotes
 Summary:       Lirc remotes database
@@ -158,8 +163,8 @@ This package provides the files necessary to develop LIRC-based
 programs.
 
 %description devel -l pl.UTF-8
-Ten pakiet zawiera pliki niezbędne do tworzenia programów opartych
-na LIRC.
+Ten pakiet zawiera pliki niezbędne do tworzenia programów opartych na
+LIRC.
 
 %package static
 Summary:       Static library for LIRC development
@@ -172,8 +177,8 @@ The files necessary for development of statically-linked lirc-based
 programs.
 
 %description static -l pl.UTF-8
-Pliki potrzebne do tworzenia łączonych statycznie programów
-opartych na LIRC.
+Pliki potrzebne do tworzenia łączonych statycznie programów opartych
+na LIRC.
 
 %package -n kernel%{_alt_kernel}-char-lirc-atiusb
 Summary:       Kernel modules for Linux Infrared Remote Control
@@ -185,7 +190,7 @@ Group:              Base/Kernel
 Requires(postun):      %releq_kernel
 %endif
 Requires(post,postun): /sbin/depmod
-Requires:      %{pname} = %{version}-%{rel}
+Requires:      %{pname} = %{version}
 Conflicts:     dev < 2.8.0-3
 
 %description -n kernel%{_alt_kernel}-char-lirc-atiusb
@@ -211,7 +216,7 @@ Group:              Base/Kernel
 Requires(postun):      %releq_kernel
 %endif
 Requires(post,postun): /sbin/depmod
-Requires:      %{pname} = %{version}-%{rel}
+Requires:      %{pname} = %{version}
 Conflicts:     dev < 2.8.0-3
 
 %description -n kernel%{_alt_kernel}-char-lirc-bt829
@@ -237,7 +242,7 @@ Group:              Base/Kernel
 Requires(postun):      %releq_kernel
 %endif
 Requires(post,postun): /sbin/depmod
-Requires:      %{pname} = %{version}-%{rel}
+Requires:      %{pname} = %{version}
 Obsoletes:     lirc-modules
 Obsoletes:     lirc-modules-dev
 Conflicts:     dev < 2.8.0-3
@@ -265,7 +270,7 @@ Group:              Base/Kernel
 Requires(postun):      %releq_kernel
 %endif
 Requires(post,postun): /sbin/depmod
-Requires:      %{pname} = %{version}-%{rel}
+Requires:      %{pname} = %{version}
 Obsoletes:     lirc-modules
 Conflicts:     dev < 2.8.0-3
 
@@ -292,7 +297,7 @@ Group:              Base/Kernel
 Requires(postun):      %releq_kernel
 %endif
 Requires(post,postun): /sbin/depmod
-Requires:      %{pname} = %{version}-%{rel}
+Requires:      %{pname} = %{version}
 Obsoletes:     lirc-modules
 Obsoletes:     lirc-modules-gpio
 Conflicts:     dev < 2.8.0-3
@@ -320,7 +325,7 @@ Group:              Base/Kernel
 Requires(postun):      %releq_kernel
 %endif
 Requires(post,postun): /sbin/depmod
-Requires:      %{pname} = %{version}-%{rel}
+Requires:      %{pname} = %{version}
 Obsoletes:     lirc-modules
 Obsoletes:     lirc-modules-i2c
 Conflicts:     dev < 2.8.0-3
@@ -348,7 +353,7 @@ Group:              Base/Kernel
 Requires(postun):      %releq_kernel
 %endif
 Requires(post,postun): /sbin/depmod
-Requires:      %{pname} = %{version}-%{rel}
+Requires:      %{pname} = %{version}
 Obsoletes:     lirc-modules
 Obsoletes:     lirc-modules-igorplugusb
 Conflicts:     dev < 2.8.0-3
@@ -376,7 +381,7 @@ Group:              Base/Kernel
 Requires(postun):      %releq_kernel
 %endif
 Requires(post,postun): /sbin/depmod
-Requires:      %{pname} = %{version}-%{rel}
+Requires:      %{pname} = %{version}
 Obsoletes:     lirc-modules
 Obsoletes:     lirc-modules-imon
 Conflicts:     dev < 2.8.0-3
@@ -404,7 +409,7 @@ Group:              Base/Kernel
 Requires(postun):      %releq_kernel
 %endif
 Requires(post,postun): /sbin/depmod
-Requires:      %{pname} = %{version}-%{rel}
+Requires:      %{pname} = %{version}
 Conflicts:     dev < 2.8.0-3
 
 %description -n kernel%{_alt_kernel}-char-lirc-sasem
@@ -430,7 +435,7 @@ Group:              Base/Kernel
 Requires(postun):      %releq_kernel
 %endif
 Requires(post,postun): /sbin/depmod
-Requires:      %{pname} = %{version}-%{rel}
+Requires:      %{pname} = %{version}
 %{?with_dist_kernel:Requires:  setserial}
 Obsoletes:     lirc-modules
 Obsoletes:     lirc-modules-serial
@@ -459,7 +464,7 @@ Group:              Base/Kernel
 Requires(postun):      %releq_kernel
 %endif
 Requires(post,postun): /sbin/depmod
-Requires:      %{pname} = %{version}-%{rel}
+Requires:      %{pname} = %{version}
 Obsoletes:     lirc-modules
 Obsoletes:     lirc-modules-sir
 Conflicts:     dev < 2.8.0-3
@@ -487,7 +492,7 @@ Group:              Base/Kernel
 Requires(postun):      %releq_kernel
 %endif
 Requires(post,postun): /sbin/depmod
-Requires:      %{pname} = %{version}-%{rel}
+Requires:      %{pname} = %{version}
 Obsoletes:     lirc-modules
 Obsoletes:     lirc-modules-ttusbir
 Conflicts:     dev < 2.8.0-3
@@ -505,17 +510,17 @@ TechnoTrend USB IR Receiver.
 Moduł lirc_ttusbir.
 
 %package -n kernel%{_alt_kernel}-char-lirc-wpc87691
-Summary:        Kernel modules for Linux Infrared Remote Control
-Summary(pl.UTF-8):      Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni
-Release:        %{rel}@%{_kernel_ver_str}
-Group:          Base/Kernel
+Summary:       Kernel modules for Linux Infrared Remote Control
+Summary(pl.UTF-8):     Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni
+Release:       %{rel}@%{_kernel_ver_str}
+Group:         Base/Kernel
 %if %{with dist_kernel}
 %requires_releq_kernel
-Requires(postun):       %releq_kernel
+Requires(postun):      %releq_kernel
 %endif
-Requires(post,postun):  /sbin/depmod
-Requires:       %{pname} = %{version}-%{rel}
-Conflicts:      dev < 2.8.0-3
+Requires(post,postun): /sbin/depmod
+Requires:      %{pname} = %{version}
+Conflicts:     dev < 2.8.0-3
 
 %description -n kernel%{_alt_kernel}-char-lirc-wpc87691
 This package contains the kernel modules necessary to operate
@@ -539,7 +544,7 @@ Group:              Base/Kernel
 Requires(postun):      %releq_kernel
 %endif
 Requires(post,postun): /sbin/depmod
-Requires:      %{pname} = %{version}-%{rel}
+Requires:      %{pname} = %{version}
 Obsoletes:     lirc-modules
 Obsoletes:     lirc-modules-parallel
 Conflicts:     dev < 2.8.0-3
@@ -555,8 +560,7 @@ lirc-parallel module for devices connected to parallel port.
 Ten pakiet zawiera moduły jądra niezbędne do obsługi niektórych
 pilotów na podczerwień (w tym tych dostarczanych z kartami TV).
 
-Moduł lirc_parallel dla urządzeń podłączanych do portu
-równoległego.
+Moduł lirc_parallel dla urządzeń podłączanych do portu równoległego.
 
 %prep
 %setup -q -n %{pname}-%{version} -a 1
@@ -569,6 +573,8 @@ równoległego.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
+%patch8 -p1
 
 %build
 echo '#' > drivers/Makefile.am
@@ -628,14 +634,14 @@ rm -rf $RPM_BUILD_ROOT
 drivers=%{drivers}
 install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc
 for drv in $drivers; do
-       install drivers/$drv/$drv.ko $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/$drv.ko
+       %install_kernel_modules -m drivers/$drv/$drv -d misc
 done
 %endif
 
 %if %{with userspace}
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_aclocaldir},/dev,/var/{log,run/lirc}} \
-       $RPM_BUILD_ROOT/etc/{lirc,rc.d/init.d,sysconfig} \
-       $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
+       $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,lirc} \
+       $RPM_BUILD_ROOT%{systemdtmpfilesdir}
 
 %{__make} -j1 install \
        DESTDIR=$RPM_BUILD_ROOT \
@@ -648,13 +654,13 @@ cat>$RPM_BUILD_ROOT%{_sysconfdir}/lirc/lircd.conf<<END
 #
 END
 cp -f $RPM_BUILD_ROOT%{_sysconfdir}/lirc/lirc{,m}d.conf
-install contrib/*.m4 $RPM_BUILD_ROOT%{_aclocaldir}
+cp -p contrib/*.m4 $RPM_BUILD_ROOT%{_aclocaldir}
 :> $RPM_BUILD_ROOT/var/log/lircd
 
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/lircd
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/lircd
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/lircmd
-install %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/lircd
+install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/lircd
+install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/lircmd
+cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
 %endif
 
 %clean
@@ -665,32 +671,18 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add lircd
-if [ -f /var/lock/subsys/lircd ]; then
-       /etc/rc.d/init.d/lircd restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/lircd start\" to start lircd." >&2
-fi
 /sbin/chkconfig --add lircmd
-if [ -f /var/lock/subsys/lircmd ]; then
-       /etc/rc.d/init.d/lircmd restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/lircmd start\" to start lircmd." >&2
-fi
+%service lircd restart
+%service lircmd restart
+
 echo "If you are using a kernel-module-based driver, don't forget to"
-echo "install the kernel%{_alt_kernel}-char-lirc-<your_driver> or"
-echo "kernel%{_alt_kernel}-smp-char-lirc-<your_driver> package."
+echo "install the kernel%{_alt_kernel}-char-lirc-<your_driver> package."
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/lircd ]; then
-               /etc/rc.d/init.d/lircd stop >&2
-       fi
+       %service lircd stop
+       %service lircmd stop
        /sbin/chkconfig --del lircd
-fi
-if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/lircmd ]; then
-               /etc/rc.d/init.d/lircmd stop >&2
-       fi
        /sbin/chkconfig --del lircmd
 fi
 
@@ -705,8 +697,7 @@ fi
 %post  -n kernel%{_alt_kernel}-char-lirc-atiusb
 %depmod %{_kernel_ver}
 if [ "$1" = "1" ]; then
-       echo "Don't forget to add an 'alias lirc lirc_atiusb' line"
-       echo "to your /etc/modules.conf."
+       echo "Don't forget to add an 'alias lirc lirc_atiusb' to modprobe config"
 fi
 
 %postun        -n kernel%{_alt_kernel}-char-lirc-atiusb
@@ -715,8 +706,7 @@ fi
 %post  -n kernel%{_alt_kernel}-char-lirc-bt829
 %depmod %{_kernel_ver}
 if [ "$1" = "1" ]; then
-       echo "Don't forget to add an 'alias lirc lirc_bt829' line"
-       echo "to your /etc/modules.conf."
+       echo "Don't forget to add an 'alias lirc lirc_bt829' to modprobe config"
 fi
 
 %postun        -n kernel%{_alt_kernel}-char-lirc-bt829
@@ -737,8 +727,7 @@ fi
 %post  -n kernel%{_alt_kernel}-char-lirc-gpio
 %depmod %{_kernel_ver}
 if [ "$1" = "1" ]; then
-       echo "Don't forget to add an 'alias lirc lirc_gpio' line"
-       echo "to your /etc/modules.conf."
+       echo "Don't forget to add an 'alias lirc lirc_gpio' to modprobe config"
 fi
 
 %postun        -n kernel%{_alt_kernel}-char-lirc-gpio
@@ -747,8 +736,7 @@ fi
 %post  -n kernel%{_alt_kernel}-char-lirc-i2c
 %depmod %{_kernel_ver}
 if [ "$1" = "1" ]; then
-       echo "Don't forget to add an 'alias lirc lirc_i2c' line"
-       echo "to your /etc/modules.conf."
+       echo "Don't forget to add an 'alias lirc lirc_i2c' to modprobe config"
 fi
 
 %postun        -n kernel%{_alt_kernel}-char-lirc-i2c
@@ -757,8 +745,7 @@ fi
 %post  -n kernel%{_alt_kernel}-char-lirc-igorplugusb
 %depmod %{_kernel_ver}
 if [ "$1" = "1" ]; then
-       echo "Don't forget to add an 'alias lirc lirc_igorplugusb' line"
-       echo "to your /etc/modules.conf."
+       echo "Don't forget to add an 'alias lirc lirc_igorplugusb' to modprobe config"
 fi
 
 %postun        -n kernel%{_alt_kernel}-char-lirc-igorplugusb
@@ -767,8 +754,7 @@ fi
 %post  -n kernel%{_alt_kernel}-char-lirc-imon
 %depmod %{_kernel_ver}
 if [ "$1" = "1" ]; then
-       echo "Don't forget to add an 'alias lirc lirc_imon' line"
-       echo "to your /etc/modules.conf."
+       echo "Don't forget to add an 'alias lirc lirc_imon' to modprobe config"
 fi
 
 %postun        -n kernel%{_alt_kernel}-char-lirc-imon
@@ -777,8 +763,7 @@ fi
 %post  -n kernel%{_alt_kernel}-char-lirc-sasem
 %depmod %{_kernel_ver}
 if [ "$1" = "1" ]; then
-       echo "Don't forget to add an 'alias lirc lirc_sasem' line"
-       echo "to your /etc/modules.conf."
+       echo "Don't forget to add an 'alias lirc lirc_sasem' to modprobe config"
 fi
 
 %postun        -n kernel%{_alt_kernel}-char-lirc-sasem
@@ -787,8 +772,7 @@ fi
 %post  -n kernel%{_alt_kernel}-char-lirc-serial
 %depmod %{_kernel_ver}
 if [ "$1" = "1" ]; then
-       echo "Don't forget to add an 'alias lirc lirc_serial' line"
-       echo "to your /etc/modules.conf."
+       echo "Don't forget to add an 'alias lirc lirc_serial' to modprobe config"
 fi
 
 %postun        -n kernel%{_alt_kernel}-char-lirc-serial
@@ -797,8 +781,7 @@ fi
 %post  -n kernel%{_alt_kernel}-char-lirc-parallel
 %depmod %{_kernel_ver}
 if [ "$1" = "1" ]; then
-       echo "Don't forget to add an 'alias lirc lirc_parallel' line"
-       echo "to your /etc/modules.conf."
+       echo "Don't forget to add an 'alias lirc lirc_parallel' modprobe config"
 fi
 
 %postun        -n kernel%{_alt_kernel}-char-lirc-parallel
@@ -807,8 +790,7 @@ fi
 %post  -n kernel%{_alt_kernel}-char-lirc-sir
 %depmod %{_kernel_ver}
 if [ "$1" = "1" ]; then
-       echo "Don't forget to add an 'alias lirc lirc_sir' line"
-       echo "to your /etc/modules.conf."
+       echo "Don't forget to add an 'alias lirc lirc_sir' to modprobe config"
 fi
 
 %postun        -n kernel%{_alt_kernel}-char-lirc-sir
@@ -817,8 +799,7 @@ fi
 %post  -n kernel%{_alt_kernel}-char-lirc-ttusbir
 %depmod %{_kernel_ver}
 if [ "$1" = "1" ]; then
-       echo "Don't forget to add an 'alias lirc lirc_ttusbir' line"
-       echo "to your /etc/modules.conf."
+       echo "Don't forget to add an 'alias lirc lirc_ttusbir' to modprobe config"
 fi
 
 %postun        -n kernel%{_alt_kernel}-char-lirc-ttusbir
@@ -827,8 +808,7 @@ fi
 %post   -n kernel%{_alt_kernel}-char-lirc-wpc87691
 %depmod %{_kernel_ver}
 if [ "$1" = "1" ]; then
-       echo "Don't forget to add an 'alias lirc lirc_wpc87691' line"
-       echo "to your /etc/modules.conf."
+       echo "Don't forget to add an 'alias lirc lirc_wpc87691' to modprobe config"
 fi
 
 %postun -n kernel%{_alt_kernel}-char-lirc-wpc87691
@@ -868,7 +848,7 @@ fi
 %{_mandir}/man8/lircmd.8*
 %attr(600,root,root) %ghost /var/log/lircd
 %dir /var/run/lirc
-/usr/lib/tmpfiles.d/%{name}.conf
+%{systemdtmpfilesdir}/%{name}.conf
 
 %files remotes
 %defattr(644,root,root,755)
This page took 0.114703 seconds and 4 git commands to generate.