]> git.pld-linux.org Git - packages/cups.git/blobdiff - cups.spec
- clean es/cat too
[packages/cups.git] / cups.spec
index 9117fcf8f0107e67e2a19d8b554dc2ab15843d91..ba5063b01d05062896f80a2f8acbe66622f1ff1c 100644 (file)
--- a/cups.spec
+++ b/cups.spec
@@ -1,7 +1,7 @@
 #
 # Conditional build:
-# _without_php don't build php extension
-# _without_perl        don't build perl extension
+%bcond_without php     # don't build PHP extension
+%bcond_without perl    # don't build Perl extension
 #
 # TODO:
 # - register php module
@@ -12,18 +12,16 @@ Summary:    Common Unix Printing System
 Summary(pl):   Popularny system druku dla Uniksa
 Summary(pt_BR):        Sistema Unix de Impressão
 Name:          cups
-%define        rcver   rc6
-Version:       1.1.20
-Release:       0.%{rcver}.2
+Version:       1.1.22
+Release:       1
 Epoch:         1
 License:       GPL/LGPL
 Group:         Applications/Printing
-Source0:       ftp://ftp.easysw.com/pub/%{name}/%{version}%{rcver}/%{name}-%{version}%{rcver}-source.tar.bz2
-# Source0-md5: 9728a739b65c420cb43e1da8db5cca39
+Source0:       http://ftp.easysw.com/pub/cups/%{version}/%{name}-%{version}-source.tar.bz2
+# Source0-md5: fe0a1b0fedccfe8b2e35e0cea1e5f0a9
 Source1:       %{name}.init
 Source2:       %{name}.pamd
 Source3:       %{name}.logrotate
-Patch0:                %{name}-DESTDIR.patch
 Patch1:                %{name}-config.patch
 Patch2:                %{name}-tmpdir.patch
 Patch3:                %{name}-lp-lpr.patch
@@ -31,8 +29,9 @@ Patch4:               %{name}-options.patch
 Patch5:                %{name}-ENCRYPTIONtxt.patch
 Patch6:                %{name}-man_pages_linking.patch
 Patch7:                %{name}-nolibs.patch
-Patch8:                %{name}-chown.patch
 Patch9:                %{name}-nostrip.patch
+Patch10:       %{name}-rpath.patch
+Patch11:       %{name}-gcc34.patch
 URL:           http://www.cups.org/
 BuildRequires: autoconf
 BuildRequires: automake
@@ -40,21 +39,23 @@ BuildRequires:      libjpeg-devel
 BuildRequires: libpng-devel
 BuildRequires: libtiff-devel
 BuildRequires: openslp-devel
-BuildRequires: openssl-devel >= 0.9.7c
+BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: pam-devel
-%{?!_without_php:BuildRequires:        php-devel}
+%{?with_php:BuildRequires:     php-devel}
 BuildRequires: pkgconfig
 BuildRequires: rpm-perlprov
-PreReq:                %{name}-libs = %{epoch}:%{version}
+PreReq:                %{name}-libs = %{epoch}:%{version}-%{release}
 Requires(post,preun):  /sbin/chkconfig
 Requires:      pam >= 0.77.3
 Conflicts:     ghostscript < 7.05.4
-Obsoletes:     lpr
 Obsoletes:     LPRng
+Obsoletes:     lpr
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                _ulibdir        %{_prefix}/lib
+
 %description
-CUPS provides a portable printing layer for UNIX®-based operating
+CUPS provides a portable printing layer for UNIX-based operating
 systems. It has been developed by Easy Software Products to promote a
 standard printing solution for all UNIX vendors and users. CUPS
 provides the System V and Berkeley command-line interfaces. CUPS uses
@@ -127,8 +128,8 @@ Summary:    Common Unix Printing System development files
 Summary(pl):   Popularny System Druku dla Uniksa, pliki nag³ówkowe
 Summary(pt_BR):        Sistema Unix de Impressão - ambiente de desenvolvimento
 Group:         Development/Libraries
-Requires:      %{name}-image-lib = %{epoch}:%{version}
-Requires:      %{name}-lib = %{epoch}:%{version}
+Requires:      %{name}-image-lib = %{epoch}:%{version}-%{release}
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
 Obsoletes:     libcups1-devel
 
 %description devel
@@ -147,7 +148,7 @@ Summary:    Common Unix Printing System static libraries
 Summary(pl):   Popularny System Druku dla Uniksa, biblioteki statyczne
 Summary(pt_BR):        Common Unix Printing System - bibliotecas estáticas
 Group:         Development/Libraries
-Requires:      %{name}-devel = %{epoch}:%{version}
+Requires:      %{name}-devel = %{epoch}:%{version}-%{release}
 
 %description static
 Common Unix Printing System static libraries.
@@ -163,7 +164,7 @@ bibliotecas do CUPS.
 Summary:       Perl module for CUPS
 Summary(pl):   Modu³ Perla CUPS
 Group:         Development/Languages/Perl
-Requires:      cups-lib = %{epoch}:%{version}
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
 
 %description -n perl-cups
 Perl module for Common Unix Printing System.
@@ -175,7 +176,7 @@ Modu
 Summary:       PHP module for CUPS
 Summary(pl):   Modu³ PHP CUPS
 Group:         Development/Languages/PHP
-Requires:      cups-lib = %{epoch}:%{version}
+Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
 
 %description -n php-cups
 PHP module for Common Unix Printing System.
@@ -187,7 +188,7 @@ Modu
 Summary:       USB backend for CUPS
 Summary(pl):   Backend USB dla CUPS-a
 Group:         Applications/Printing
-Requires:      cups = %{epoch}:%{version}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 
 %description backend-usb
 This package allow CUPS printing on USB printers.
@@ -199,7 +200,7 @@ Ten pakiet umo
 Summary:       Serial port backend for CUPS
 Summary(pl):   Backend obs³uguj±cy porty szeregowe dla CUPS-a
 Group:         Applications/Printing
-Requires:      cups = %{epoch}:%{version}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 
 %description backend-serial
 This package allow CUPS printing on printers connected by serial
@@ -213,7 +214,7 @@ pod
 Summary:       Parallel port backend for CUPS
 Summary(pl):   Backend obs³uguj±cy porty równoleg³e dla CUPS-a
 Group:         Applications/Printing
-Requires:      cups = %{epoch}:%{version}
+Requires:      %{name} = %{epoch}:%{version}-%{release}
 
 %description backend-parallel
 This package allow CUPS printing on printers connected by parallel
@@ -224,8 +225,7 @@ Ten pakiet umo
 pod³±czonych do portów równoleg³ych.
 
 %prep
-%setup -q -n %{name}-%{version}%{rcver}
-%patch0 -p1
+%setup -q
 %patch1 -p1
 # wtf?
 #%patch2 -p1
@@ -234,20 +234,22 @@ pod
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
-%patch8 -p1
 %patch9 -p1
+%patch10 -p1
+%patch11 -p1
 
 %build
 %{__aclocal}
 %{__autoconf}
 %configure \
-       --with-docdir=%{_libdir}/%{name}/cgi-bin
+       --libdir=%{_ulibdir} \
+       --with-docdir=%{_ulibdir}/%{name}/cgi-bin
 %{__make}
 
 perl -pi -e 's#-I\.\.\/\.\.#-I../.. -I../../cups#g' scripting/php/Makefile
-%{?!_without_php:%{__make} -C scripting/php}
+%{?with_php:%{__make} -C scripting/php}
 
-%if 0%{?!_without_perl:1}
+%if %{with perl}
 cd scripting/perl
 %{__perl} -pi -e 's@-lcups@-L../../cups $1@' Makefile.PL
 %{__perl} Makefile.PL \
@@ -262,38 +264,48 @@ cd ../..
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{{rc.d/init.d,pam.d,logrotate.d},security} \
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/{{rc.d/init.d,pam.d,logrotate.d},security} \
        $RPM_BUILD_ROOT/var/log/{,archiv/}cups
 
 %{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT
+       BUILDROOT=$RPM_BUILD_ROOT \
+       CUPS_USER=$(id -u) \
+       CUPS_GROUP=$(id -g)
+
+if [ "%{_lib}" != "lib" ] ; then
+       install -d $RPM_BUILD_ROOT%{_libdir}
+       mv $RPM_BUILD_ROOT%{_ulibdir}/*.so* $RPM_BUILD_ROOT%{_libdir}
+       mv $RPM_BUILD_ROOT%{_ulibdir}/*.a $RPM_BUILD_ROOT%{_libdir}
+fi
 
-%if 0%{?!_without_php:1}
+%if %{with php}
 %{__make} -C scripting/php install \
        PHPDIR="$RPM_BUILD_ROOT`php-config --extension-dir`"
 %endif
 
-%if 0%{?!_without_perl:1}
+%if %{with perl}
 cd scripting/perl
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 cd ../..
 %endif
 
-install %{SOURCE1}     $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
-install %{SOURCE2}     $RPM_BUILD_ROOT/etc/pam.d/%{name}
-install %{SOURCE3}     $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
+install %{SOURCE1}     $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
+install %{SOURCE2}     $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/%{name}
+install %{SOURCE3}     $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
+
+gzip -9nf $RPM_BUILD_ROOT%{_datadir}/%{name}/model/*.ppd
 
-# for internal http browser:
-cp doc/*.html  $RPM_BUILD_ROOT%{_libdir}/%{name}/cgi-bin
-cp doc/*.css   $RPM_BUILD_ROOT%{_libdir}/%{name}/cgi-bin
-cp doc/images/*        $RPM_BUILD_ROOT%{_libdir}/%{name}/cgi-bin/images
+# for internal HTTP browser:
+cp doc/*.html  $RPM_BUILD_ROOT%{_ulibdir}/%{name}/cgi-bin
+cp doc/*.css   $RPM_BUILD_ROOT%{_ulibdir}/%{name}/cgi-bin
+cp doc/images/*        $RPM_BUILD_ROOT%{_ulibdir}/%{name}/cgi-bin/images
 
 touch $RPM_BUILD_ROOT/var/log/cups/{access_log,error_log,page_log}
-touch $RPM_BUILD_ROOT/etc/security/blacklist.cups
+touch $RPM_BUILD_ROOT%{_sysconfdir}/security/blacklist.cups
 
 # check-files cleanup
-rm -rf $RPM_BUILD_ROOT%{_mandir}/{,fr/}cat?
+rm -rf $RPM_BUILD_ROOT%{_mandir}/{,es/,fr/}cat?
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -335,17 +347,17 @@ fi
 %dir %{_sysconfdir}/%{name}/certs
 %dir %{_sysconfdir}/%{name}/interfaces
 %dir %{_sysconfdir}/%{name}/ppd
-%attr(644,root,root) /etc/logrotate.d/%{name}
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/%{name}
 %attr(4755,lp,root) %{_bindir}/lppasswd
 %attr(755,root,root) %{_bindir}/cupstestppd
 %attr(755,root,root) %{_bindir}/disable
 %attr(755,root,root) %{_bindir}/enable
-%dir %{_libdir}/cups
-%dir %{_libdir}/cups/*
-%attr(755,root,root) %{_libdir}/cups/*/*
-%exclude %{_libdir}/cups/backend/usb
-%exclude %{_libdir}/cups/backend/serial
-%exclude %{_libdir}/cups/backend/parallel
+%dir %{_ulibdir}/cups
+%dir %{_ulibdir}/cups/*
+%attr(755,root,root) %{_ulibdir}/cups/*/*
+%exclude %{_ulibdir}/cups/backend/usb
+%exclude %{_ulibdir}/cups/backend/serial
+%exclude %{_ulibdir}/cups/backend/parallel
 %attr(755,root,root) %{_sbindir}/cupsd
 %{_datadir}/cups
 %{_mandir}/man1/backend.1*
@@ -358,6 +370,11 @@ fi
 %lang(fr) %{_mandir}/fr/man1/filter.1*
 %lang(fr) %{_mandir}/fr/man1/lppasswd.1*
 %lang(fr) %{_mandir}/fr/man[58]/*
+%lang(es) %{_mandir}/es/man1/backend.1*
+%lang(es) %{_mandir}/es/man1/cupstestppd.1*
+%lang(es) %{_mandir}/es/man1/filter.1*
+%lang(es) %{_mandir}/es/man1/lppasswd.1*
+%lang(es) %{_mandir}/es/man[58]/*
 %{_datadir}/locale/C/cups_C
 %lang(be) %{_datadir}/locale/be/cups_be
 %lang(cs) %{_datadir}/locale/cs/cups_cs
@@ -415,6 +432,12 @@ fi
 %lang(fr) %{_mandir}/fr/man1/lpr.1*
 %lang(fr) %{_mandir}/fr/man1/lprm.1*
 %lang(fr) %{_mandir}/fr/man1/lpstat.1*
+%lang(es) %{_mandir}/es/man1/lp.1*
+%lang(es) %{_mandir}/es/man1/lpoptions.1*
+%lang(es) %{_mandir}/es/man1/lpq.1*
+%lang(es) %{_mandir}/es/man1/lpr.1*
+%lang(es) %{_mandir}/es/man1/lprm.1*
+%lang(es) %{_mandir}/es/man1/lpstat.1*
 
 %files image-lib
 %defattr(644,root,root,755)
@@ -425,14 +448,16 @@ fi
 %attr(755,root,root) %{_bindir}/cups-config
 %{_includedir}/cups
 %{_libdir}/lib*.so
+%{_mandir}/man1/cups-config*
 %{_mandir}/man3/*
-%lang(fr) %{_mandir}/fr/man3/*
+%lang(fr) %{_mandir}/fr/man1/cups-config*
+%lang(es) %{_mandir}/es/man1/cups-config*
 
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/*.a
 
-%if 0%{?!_without_perl:1}
+%if %{with perl}
 %files -n perl-cups
 %defattr(644,root,root,755)
 %{perl_vendorarch}/*.pm
@@ -442,7 +467,7 @@ fi
 %attr(755,root,root) %{perl_vendorarch}/auto/CUPS/*.so
 %endif
 
-%if 0%{?!_without_php:1}
+%if %{with php}
 %files -n php-cups
 %defattr(644,root,root,755)
 %attr(755,root,root) %(php-config --extension-dir)/*
@@ -450,12 +475,12 @@ fi
 
 %files backend-usb
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/cups/backend/usb
+%attr(755,root,root) %{_ulibdir}/cups/backend/usb
 
 %files backend-serial
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/cups/backend/serial
+%attr(755,root,root) %{_ulibdir}/cups/backend/serial
 
 %files backend-parallel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/cups/backend/parallel
+%attr(755,root,root) %{_ulibdir}/cups/backend/parallel
This page took 0.113946 seconds and 4 git commands to generate.