]> git.pld-linux.org Git - packages/cups.git/blobdiff - cups.spec
- fixed previous change
[packages/cups.git] / cups.spec
index f156c74c0409fc94758c134673d3312fa27ccd22..88272b61d4a5a541bb5fcd632090cbb5e085ff43 100644 (file)
--- a/cups.spec
+++ b/cups.spec
@@ -1,12 +1,23 @@
+#
+# Conditional build:
+# _without_php don't build php extension
+# _without_perl        don't build perl extension
+#
+# TODO:
+# - register php module
+# - build/install java ext ?
+# - perl BRs
+%include       /usr/lib/rpm/macros.perl
 Summary:       Common Unix Printing System
-Summary(pl):   Popularny System Druku dla Unixa
+Summary(pl):   Popularny System Druku dla Uniksa
 Summary(pt_BR):        Sistema Unix de Impressão
 Name:          cups
-Version:       1.1.14
-Release:       19
+Version:       1.1.19
+Release:       2
 Epoch:         1
 License:       GPL/LGPL
-Group:         Applications/System
+Group:         Applications/Printing
+# Source0-md5: 04cbeed9a8acfe23624f1cb6be9c3eac
 Source0:       ftp://ftp.easysw.com/pub/%{name}/%{version}/%{name}-%{version}-source.tar.bz2
 Source1:       %{name}.init
 Source2:       %{name}.pamd
@@ -16,19 +27,22 @@ Patch1:             %{name}-config.patch
 Patch2:                %{name}-tmpdir.patch
 Patch3:                %{name}-lp-lpr.patch
 Patch4:                %{name}-options.patch
-Patch5:                %{name}-pstoraster-gcc-2.96.patch
-Patch6:                %{name}-ENCRYPTIONtxt.patch
+Patch5:                %{name}-ENCRYPTIONtxt.patch
+Patch6:                %{name}-man_pages_linking.patch
+Patch7:                %{name}-nolibs.patch
 URL:           http://www.cups.org/
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: libjpeg-devel
 BuildRequires: libpng-devel
 BuildRequires: libtiff-devel
-BuildRequires: openssl-devel >= 0.9.6b
+BuildRequires: openssl-devel >= 0.9.7
 BuildRequires: pam-devel
+%{?!_without_php:BuildRequires:        php-devel}
 BuildRequires: pkgconfig
-Prereq:                %{name}-libs = %{version}
-Prereq:                /sbin/chkconfig
+PreReq:                %{name}-libs = %{epoch}:%{version}
+Requires(post,preun):  /sbin/chkconfig
+Conflicts:     ghostscript < 7.05.4
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Obsoletes:     lpr
 Obsoletes:     LPRng
@@ -58,7 +72,7 @@ port
 Summary:       Common Unix Printing System Libraries
 Summary(pl):   Biblioteki dla CUPS
 Summary(pt_BR):        Sistema Unix de Impressão - bibliotecas para uso em clientes cups
-Group:         Development/Libraries
+Group:         Libraries
 Provides:      %{name}-libs = %{epoch}:%{version}-%{release}
 Obsoletes:     %{name}-libs
 Obsoletes:     libcups1
@@ -89,7 +103,7 @@ Aplikacje klienckie dla CUPS.
 Summary:       Common Unix Printing System Libraries - images manipulation
 Summary(pl):   Biblioteki dla CUPS - obs³uga formatów graficznych
 Summary(pt_BR):        Sistema Unix de Impressão - bibliotecas para uso em clientes cups
-Group:         Development/Libraries
+Group:         Libraries
 Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
 Obsoletes:     libcups1
 
@@ -104,18 +118,18 @@ Bibliotecas CUPS requeridas pelos clientes CUPS.
 
 %package devel
 Summary:       Common Unix Printing System development files
-Summary(pl):   Popularny System Druku dla Unixa, pliki nag³ówkowe
+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}-lib = %{version}
-Requires:      %{name}-image-lib = %{version}
+Requires:      %{name}-lib = %{epoch}:%{version}
+Requires:      %{name}-image-lib = %{epoch}:%{version}
 Obsoletes:     libcups1-devel
 
 %description devel
 Common Unix Printing System development files.
 
 %description devel -l pl
-Popularny System Druku dla Unixa, pliki nag³ówkowe.
+Popularny System Druku dla Uniksa, pliki nag³ówkowe.
 
 %description devel -l pt_BR
 Este pacote é um adicional que contem um ambiente de desenvolvimento
@@ -124,49 +138,97 @@ CUPS.
 
 %package static
 Summary:       Common Unix Printing System static libraries
-Summary(pl):   Popularny System Druku dla Unixa, biblioteki statyczne
+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 = %{version}
+Requires:      %{name}-devel = %{epoch}:%{version}
 
 %description static
 Common Unix Printing System static libraries.
 
 %description static -l pl
-Popularny System Druku dla Unixa, biblioteki statyczne.
+Popularny System Druku dla Uniksa, biblioteki statyczne.
 
 %description static -l pt_BR
 Bibliotecas estáticas para desenvolvimento de programas que usam as
 bibliotecas do CUPS.
 
+%package -n perl-cups
+Summary:       Perl module for CUPS
+Summary(pl):   Modu³ Perla CUPS
+Group:         Development/Languages/Perl
+Requires:      cups-lib = %{epoch}:%{version}
+
+%description -n perl-cups
+Perl module for Common Unix Printing System.
+
+%description -n perl-cups -l pl
+Modu³ Perla do Popularnego Systemu Druku dla Uniksa.
+
+%package -n php-cups
+Summary:       PHP module for CUPS
+Summary(pl):   Modu³ PHP CUPS
+Group:         Development/Languages/PHP
+Requires:      cups-lib = %{epoch}:%{version}
+
+%description -n php-cups
+PHP module for Common Unix Printing System.
+
+%description -n php-cups -l pl
+Modu³ PHP do Popularnego Systemu Druku dla Uniksa.
+
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
+# wtf?
+#%patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 
 %build
-aclocal
+%{__aclocal}
 %{__autoconf}
-if [ -f %{_pkgconfigdir}/libpng12.pc ] ; then
-       CFLAGS="%{rpmcflags} `pkg-config libpng12 --cflags`"
-       CPPFLAGS="`pkg-config libpng12 --cflags`"
-fi
-%configure CPPFLAGS="$CPPFLAGS" \
+%configure \
        --with-docdir=%{_libdir}/%{name}/cgi-bin
 %{__make}
 
+%{?!_without_php:%{__make} -C scripting/php}
+
+%if 0%{?!_without_perl:1}
+cd scripting/perl
+%{__perl} -pi -e 's@-lcups@-L../../cups $1@' Makefile.PL
+%{__perl} Makefile.PL \
+       INSTALLDIRS=vendor \
+       OPTIMIZE="%{rpmcflags} -I../.."
+# avoid rpaths generated by MakeMaker
+perl -pi -e 's@LD_RUN_PATH="\$\(LD_RUN_PATH\)" @@' Makefile
+
+%{__make}
+cd ../..
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,logrotate.d} \
+install -d $RPM_BUILD_ROOT/etc/{{rc.d/init.d,pam.d,logrotate.d},security} \
        $RPM_BUILD_ROOT/var/log/{,archiv/}cups
 
 %{__make} DESTDIR=$RPM_BUILD_ROOT install
 
+%if 0%{?!_without_php:1}
+%{__make} -C scripting/php install \
+       PHPDIR="$RPM_BUILD_ROOT`php-config --extension-dir`"
+%endif
+
+%if 0%{?!_without_perl:1}
+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}
@@ -177,6 +239,10 @@ cp doc/*.css       $RPM_BUILD_ROOT/%{_libdir}/%{name}/cgi-bin/
 cp doc/images/*        $RPM_BUILD_ROOT/%{_libdir}/%{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
+
+# check-files cleanup
+rm -rf $RPM_BUILD_ROOT%{_mandir}/{,fr/}cat?
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -184,9 +250,9 @@ rm -rf $RPM_BUILD_ROOT
 %post
 /sbin/chkconfig --add cups
 if [ -f /var/lock/subsys/cupsd ]; then
-        /etc/rc.d/init.d/cups restart 1>&2
+       /etc/rc.d/init.d/cups restart 1>&2
 else
-        echo "Run \"/etc/rc.d/init.d/cups start\" to start cups daemon."
+       echo "Run \"/etc/rc.d/init.d/cups start\" to start cups daemon."
 fi
 
 %preun
@@ -214,35 +280,44 @@ fi
 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/printers.conf
 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/*.convs
 %attr(640,root,lp) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}/*.types
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.cups
 %dir %{_sysconfdir}/%{name}/certs
 %dir %{_sysconfdir}/%{name}/interfaces
 %dir %{_sysconfdir}/%{name}/ppd
-%attr(644,root,root) %{_sysconfdir}/logrotate.d/%{name}
+%attr(644,root,root) /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/*/*
+%attr(755,root,root) %{_libdir}/cups/*/*
 %attr(755,root,root) %{_sbindir}/*
 %{_datadir}/cups
-%{_mandir}/man1/backend.1.gz
-%{_mandir}/man1/filter.1.gz
-%{_mandir}/man1/lppasswd.1.gz
+%{_mandir}/man1/backend.1*
+%{_mandir}/man1/cupstestppd.1*
+%{_mandir}/man1/filter.1*
+%{_mandir}/man1/lppasswd.1*
 %{_mandir}/man[58]/*
+%lang(fr) %{_mandir}/fr/man1/backend.1*
+%lang(fr) %{_mandir}/fr/man1/cupstestppd.1*
+%lang(fr) %{_mandir}/fr/man1/filter.1*
+%lang(fr) %{_mandir}/fr/man1/lppasswd.1*
+%lang(fr) %{_mandir}/fr/man[58]/*
 %{_datadir}/locale/C/cups_C
 %lang(be) %{_datadir}/locale/be/cups_be
 %lang(cs) %{_datadir}/locale/cs/cups_cs
 %lang(de) %{_datadir}/locale/de/cups_de
 %{_datadir}/locale/en/cups_en
+%lang(en_US)%{_datadir}/locale/en_US/cups_en_US
 %lang(es) %{_datadir}/locale/es/cups_es
 %lang(fr) %{_datadir}/locale/fr/cups_fr
 %lang(he) %{_datadir}/locale/he/cups_he
 %lang(it) %{_datadir}/locale/it/cups_it
-%lang(ru) %{_datadir}/locale/ru_RU.*/cups_ru_RU.*
+%lang(ru) %{_datadir}/locale/ru_RU/cups_ru_RU
 %lang(sv) %{_datadir}/locale/sv/cups_sv
 %lang(uk) %{_datadir}/locale/uk/cups_uk
-%lang(uk) %{_datadir}/locale/uk_UA.*/cups_uk_UA.*
+%lang(uk) %{_datadir}/locale/uk_UA/cups_uk_UA
 %lang(zh_CN) %{_datadir}/locale/zh_CN/cups_zh_CN
 /var/spool/cups
 %attr(750,root,root) %dir /var/log/archiv/cups
@@ -265,12 +340,20 @@ fi
 %attr(755,root,root) %{_bindir}/lpr
 %attr(755,root,root) %{_bindir}/lprm
 %attr(755,root,root) %{_bindir}/lpstat
-%{_mandir}/man1/lp.1.gz
-%{_mandir}/man1/lpoptions.1.gz
-%{_mandir}/man1/lpq.1.gz
-%{_mandir}/man1/lpr.1.gz
-%{_mandir}/man1/lprm.1.gz
-%{_mandir}/man1/lpstat.1.gz
+%{_mandir}/man1/cancel.1*
+%{_mandir}/man1/lp.1*
+%{_mandir}/man1/lpoptions.1*
+%{_mandir}/man1/lpq.1*
+%{_mandir}/man1/lpr.1*
+%{_mandir}/man1/lprm.1*
+%{_mandir}/man1/lpstat.1*
+%lang(fr) %{_mandir}/fr/man1/cancel.1*
+%lang(fr) %{_mandir}/fr/man1/lp.1*
+%lang(fr) %{_mandir}/fr/man1/lpoptions.1*
+%lang(fr) %{_mandir}/fr/man1/lpq.1*
+%lang(fr) %{_mandir}/fr/man1/lpr.1*
+%lang(fr) %{_mandir}/fr/man1/lprm.1*
+%lang(fr) %{_mandir}/fr/man1/lpstat.1*
 
 %files image-lib
 %defattr(644,root,root,755)
@@ -282,7 +365,24 @@ fi
 %{_includedir}/cups
 %{_libdir}/lib*.so
 %{_mandir}/man3/*
+%lang(fr) %{_mandir}/fr/man3/*
 
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/*.a
+
+%if 0%{?!_without_perl:1}
+%files -n perl-cups
+%defattr(644,root,root,755)
+%{perl_vendorarch}/*.pm
+%dir %{perl_vendorarch}/auto/CUPS
+%{perl_vendorarch}/auto/CUPS/*.bs
+%{perl_vendorarch}/auto/CUPS/autosplit.ix
+%attr(755,root,root) %{perl_vendorarch}/auto/CUPS/*.so
+%endif
+
+%if 0%{?!_without_php:1}
+%files -n php-cups
+%defattr(644,root,root,755)
+%attr(755,root,root) %(php-config --extension-dir)/*
+%endif
This page took 0.07051 seconds and 4 git commands to generate.