]> git.pld-linux.org Git - packages/cups.git/blobdiff - cups.spec
- release 3 (by relup.sh)
[packages/cups.git] / cups.spec
index c68b3625b4d4216b13a6554f736d89d5d3f7750b..215f86f8268960d3b905e3792bf5f2859a157038 100644 (file)
--- a/cups.spec
+++ b/cups.spec
@@ -1,7 +1,8 @@
 #
 # Conditional build:
 %bcond_with    gnutls          # use GNU TLS for SSL/TLS support (instead of OpenSSL)
-%bcond_without dnssd
+%bcond_with    dnssd           # DNS Service Discovery support (obsoleted by Avahi patch)
+%bcond_without avahi           # DNS Service Discovery support via Avahi
 %bcond_without ldap            # do not include LDAP support
 %bcond_without gssapi          # do not include GSSAPI support
 %bcond_without php             # don't build PHP extension/support in web interface
 %bcond_without python          # don't build Python support in web interface
 %bcond_without slp             # do not include SLP support
 %bcond_without static_libs     # don't build static library
-#
-%include       /usr/lib/rpm/macros.perl
-%define                pdir CUPS
 
+%define                pdir CUPS
+%include       /usr/lib/rpm/macros.perl
 Summary(pl.UTF-8):     Ogólny system druku dla Uniksa
 Summary(pt_BR.UTF-8):  Sistema Unix de Impressão
 Name:          cups
-Version:       1.4.4
-Release:       2
+Version:       1.5.4
+Release:       3
 Epoch:         1
 License:       LGPL v2 (libraries), GPL v2 (the rest) + openssl exception
 Group:         Applications/Printing
 Source0:       http://ftp.easysw.com/pub/cups/%{version}/%{name}-%{version}-source.tar.bz2
-# Source0-md5: 8776403ad60fea9e85eab9c04d88560d
+# Source0-md5: de3006e5cf1ee78a9c6145ce62c4e982
 Source1:       %{name}.init
 Source2:       %{name}.pamd
 Source3:       %{name}.logrotate
 Source4:       %{name}.mailto.conf
 Source5:       %{name}-lpd.inetd
 Source6:       %{name}-modprobe.conf
+Source7:       %{name}.tmpfiles
 # svn diff http://svn.easysw.com/public/cups/tags/release-1.4.3/ http://svn.easysw.com/public/cups/branches/branch-1.4/ > cups-branch.diff
 # + drop config-scripts/cups-common.m4 change
 Patch0:                %{name}-config.patch
@@ -42,11 +43,22 @@ Patch9:             %{name}-verbose-compilation.patch
 Patch10:       %{name}-peercred.patch
 Patch11:       %{name}-usb.patch
 Patch12:       %{name}-desktop.patch
+Patch13:       %{name}-systemd-socket.patch
+Patch14:       add-ipp-backend-of-cups-1.4.patch
+Patch15:       reactivate_recommended_driver.patch
+Patch16:       read-embedded-options-from-incoming-postscript-and-add-to-ipp-attrs.patch
+# avahi patches from fedora
+Patch100:      %{name}-avahi-1-config.patch
+Patch101:      %{name}-avahi-2-backend.patch
+Patch102:      %{name}-avahi-3-timeouts.patch
+Patch103:      %{name}-avahi-4-poll.patch
+Patch104:      %{name}-avahi-5-services.patch
 URL:           http://www.cups.org/
 BuildRequires: acl-devel
-BuildRequires: autoconf
+BuildRequires: autoconf >= 2.60
 BuildRequires: automake
-%{?with_dnssd:BuildRequires:   avahi-compat-libdns_sd-devel}
+%{?with_dnssd:BuildRequires:    avahi-compat-libdns_sd-devel}
+%{?with_avahi:BuildRequires: avahi-devel}
 BuildRequires: dbus-devel
 BuildRequires: glibc-headers
 %{?with_gnutls:BuildRequires:  gnutls-devel}
@@ -56,8 +68,7 @@ BuildRequires:        libpaper-devel
 BuildRequires: libpng-devel
 BuildRequires: libstdc++-devel
 BuildRequires: libtiff-devel
-BuildRequires: libusb-compat-devel
-BuildRequires: libusb-devel
+BuildRequires: libusb-devel >= 1.0
 %{?with_ldap:BuildRequires:    openldap-devel}
 %{?with_slp:BuildRequires:     openslp-devel}
 %{!?with_gnutls:BuildRequires: openssl-devel}
@@ -65,13 +76,16 @@ BuildRequires:      pam-devel
 %{?with_php:BuildRequires:     php-devel >= 4:5.0.0}
 BuildRequires: pkgconfig
 BuildRequires: rpm-perlprov
-BuildRequires: rpmbuild(macros) >= 1.344
+BuildRequires: rpmbuild(macros) >= 1.641
+BuildRequires: systemd-devel
 Requires(post,preun):  /sbin/chkconfig
+Requires(post,preun,postun):   systemd-units >= 38
 Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
 Requires:      openssl-tools
 Requires:      pam >= 0.77.3
 Requires:      perl-modules
 Requires:      rc-scripts
+Requires:      systemd-units >= 38
 Suggests:      ImageMagick-coder-pdf
 Suggests:      cups-filter-pstoraster
 Suggests:      ghostscript-cups
@@ -231,7 +245,7 @@ Group:              Development/Languages/PHP
 Requires:      %{name}-lib = %{epoch}:%{version}-%{release}
 %{?requires_php_extension}
 Requires:      /etc/php/conf.d
-Requires:      php-common >= 4:5.0.0
+Requires:      php(core) >= 5.0.0
 
 %description -n php-cups
 PHP module for Common Unix Printing System.
@@ -303,12 +317,26 @@ Wsparcie dla LPD w serwerze wydruków CUPS.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
-%patch6 -p1
+# why it hasn't been merged for so long (and why no other distro uses it)
+#%patch6 -p1
 %patch7 -p1
 %patch9 -p1
 %patch10 -p1
-%patch11 -p1
+# why it hasn't been merged for so long (and why no other distro uses it)
+#%patch11 -p1
 %patch12 -p1
+%patch13 -p1
+%patch14 -p1
+%patch15 -p1
+%patch16 -p1
+
+%if %{with avahi}
+%patch100 -p1
+%patch101 -p1
+%patch102 -p1
+%patch103 -p1
+%patch104 -p1
+%endif
 
 %build
 %{__aclocal} -I config-scripts
@@ -326,6 +354,7 @@ Wsparcie dla LPD w serwerze wydruków CUPS.
        --enable-shared \
        --enable-ssl \
        %{?debug:--enable-debug} \
+       --%{!?with_avahi:dis}%{?with_avahi:en}able-avahi \
        --%{!?with_dnssd:dis}%{?with_dnssd:en}able-dnssd \
        --%{!?with_ldap:dis}%{?with_ldap:en}able-ldap \
        --%{!?with_gssapi:dis}%{?with_gssapi:en}able-gssapi \
@@ -346,9 +375,10 @@ Wsparcie dla LPD w serwerze wydruków CUPS.
        %{?with_dnssd:--with-dnssd-includes=x} \
        %{?with_perl:--with-perl=%{_bindir}/perl} \
        %{?with_php:--with-php=%{_bindir}/php} \
-       %{?with_python:--with-python=%{_bindir}/python}
+       %{?with_python:--with-python=%{_bindir}/python} \
+       --with-systemdsystemunitdir=%{systemdunitdir}
 
-%{__make}
+%{__make} %{?debug:OPTIONS="-DDEBUG"}
 
 %{__perl} -pi -e 's#-I\.\.\/\.\.#-I../.. -I../../cups#g' scripting/php/Makefile
 %{?with_php:%{__make} -C scripting/php PHPCONFIG=%{_bindir}/php-config}
@@ -370,7 +400,8 @@ cd ../..
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,pam.d,logrotate.d,modprobe.d,security,sysconfig/rc-inetd} \
        $RPM_BUILD_ROOT/var/run/cups \
-       $RPM_BUILD_ROOT/var/log/{,archive/}cups
+       $RPM_BUILD_ROOT/var/log/{,archive/}cups \
+       $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}}
 
 %{__make} install \
        BUILDROOT=$RPM_BUILD_ROOT \
@@ -385,6 +416,10 @@ if [ "%{_lib}" != "lib" ] ; then
 %endif
 fi
 
+%if %{with avahi}
+ln -s %{_ulibdir}/cups/backend/dnssd $RPM_BUILD_ROOT%{_ulibdir}/cups/backend/mdns
+%endif
+
 %if %{with php}
 %{__make} -C scripting/php install \
        PHPDIR=$RPM_BUILD_ROOT%{php_extensiondir}
@@ -400,12 +435,13 @@ EOF
        DESTDIR=$RPM_BUILD_ROOT
 %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/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 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/cups/mailto.conf
 sed -e 's|__ULIBDIR__|%{_ulibdir}|g' %{SOURCE5} > $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/cups-lpd
-install %{SOURCE6}     $RPM_BUILD_ROOT/etc/modprobe.d/cups.conf
+install %{SOURCE6} $RPM_BUILD_ROOT/etc/modprobe.d/cups.conf
+install %{SOURCE7} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
 
 touch $RPM_BUILD_ROOT/var/log/cups/{access_log,error_log,page_log}
 touch $RPM_BUILD_ROOT/etc/security/blacklist.cups
@@ -443,12 +479,20 @@ rm -rf $RPM_BUILD_ROOT
 /sbin/chkconfig --add cups
 %service cups restart "cups daemon"
 /sbin/rmmod usblp > /dev/null 2>&1 || :
+%systemd_post cups.service cups.socket cups.path
 
 %preun
 if [ "$1" = "0" ]; then
        %service cups stop
        /sbin/chkconfig --del cups
 fi
+%systemd_preun cups.service cups.socket cups.path
+
+%postun
+%systemd_reload
+
+%triggerpostun -- cups < 1.5.2-1
+%systemd_trigger cups.service cups.socket cups.path
 
 %post  lib -p /sbin/ldconfig
 %postun        lib -p /sbin/ldconfig
@@ -478,6 +522,10 @@ fi
 %attr(754,root,root) /etc/rc.d/init.d/cups
 /etc/dbus-1/system.d/cups.conf
 /etc/modprobe.d/cups.conf
+%{systemdunitdir}/cups.service
+%{systemdunitdir}/cups.socket
+%{systemdunitdir}/cups.path
+%{systemdtmpfilesdir}/%{name}.conf
 %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/classes.conf
 %attr(640,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/cupsd.conf
 %attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/printers.conf
@@ -507,18 +555,29 @@ fi
 %lang(de) %{_ulibdir}/cups/cgi-bin/de
 %lang(es) %{_ulibdir}/cups/cgi-bin/es
 %lang(eu) %{_ulibdir}/cups/cgi-bin/eu
+%lang(fr) %{_ulibdir}/cups/cgi-bin/fr
+%lang(hu) %{_ulibdir}/cups/cgi-bin/hu
 %lang(id) %{_ulibdir}/cups/cgi-bin/id
 %lang(it) %{_ulibdir}/cups/cgi-bin/it
 %lang(ja) %{_ulibdir}/cups/cgi-bin/ja
 %lang(pl) %{_ulibdir}/cups/cgi-bin/pl
 %lang(ru) %{_ulibdir}/cups/cgi-bin/ru
 
-%exclude %{_ulibdir}/cups/backend/usb
-%exclude %{_ulibdir}/cups/backend/serial
-%exclude %{_ulibdir}/cups/backend/parallel
-%attr(755,root,root) %{_ulibdir}/cups/backend/*
+%if %{with avahi}
+%attr(755,root,root) %{_ulibdir}/cups/backend/dnssd
+%attr(755,root,root) %{_ulibdir}/cups/backend/mdns
+%endif
+%attr(755,root,root) %{_ulibdir}/cups/backend/http
+%attr(755,root,root) %{_ulibdir}/cups/backend/https
+%attr(755,root,root) %{_ulibdir}/cups/backend/ipp
+%attr(755,root,root) %{_ulibdir}/cups/backend/ipp14
+%attr(755,root,root) %{_ulibdir}/cups/backend/ipps
+%attr(755,root,root) %{_ulibdir}/cups/backend/lpd
+%attr(755,root,root) %{_ulibdir}/cups/backend/snmp
+%attr(755,root,root) %{_ulibdir}/cups/backend/socket
 %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-deviced
 %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-driverd
+%attr(755,root,root) %{_ulibdir}/cups/daemon/cups-exec
 %attr(755,root,root) %{_ulibdir}/cups/daemon/cups-polld
 %attr(755,root,root) %{_ulibdir}/cups/filter/*
 %attr(755,root,root) %{_ulibdir}/cups/monitor/*
@@ -549,6 +608,8 @@ fi
 %lang(de) %{_datadir}/cups/templates/de
 %lang(es) %{_datadir}/cups/templates/es
 %lang(eu) %{_datadir}/cups/templates/eu
+%lang(fr) %{_datadir}/cups/templates/fr
+%lang(hu) %{_datadir}/cups/templates/hu
 %lang(id) %{_datadir}/cups/templates/id
 %lang(it) %{_datadir}/cups/templates/it
 %lang(ja) %{_datadir}/cups/templates/ja
@@ -559,7 +620,6 @@ fi
 %{_mandir}/man1/lppasswd.1*
 %{_mandir}/man1/ppd*.1*
 %{_mandir}/man7/backend.7*
-%{_mandir}/man7/drv.7*
 %{_mandir}/man7/filter.7*
 %{_mandir}/man7/notifier.7*
 %{_mandir}/man5/*
@@ -599,13 +659,13 @@ fi
 %attr(755,root,root) %{_libdir}/libcupsmime.so.*
 %attr(755,root,root) %{_libdir}/libcupsppdc.so.*
 %dir %{_datadir}/cups
-%{_datadir}/cups/charmaps
 %lang(da) %{_datadir}/locale/da/cups_da.po
 %lang(de) %{_datadir}/locale/de/cups_de.po
 %lang(es) %{_datadir}/locale/es/cups_es.po
 %lang(eu) %{_datadir}/locale/eu/cups_eu.po
 %lang(fi) %{_datadir}/locale/fi/cups_fi.po
 %lang(fr) %{_datadir}/locale/fr/cups_fr.po
+%lang(hu) %{_datadir}/locale/hu/cups_hu.po
 %lang(id) %{_datadir}/locale/id/cups_id.po
 %lang(it) %{_datadir}/locale/it/cups_it.po
 %lang(ko) %{_datadir}/locale/ko/cups_ko.po
@@ -624,6 +684,7 @@ fi
 %defattr(644,root,root,755)
 %attr(644,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/client.conf
 %attr(755,root,root) %{_bindir}/cancel
+%attr(755,root,root) %{_bindir}/ipptool
 %attr(755,root,root) %{_bindir}/lp
 %attr(755,root,root) %{_bindir}/lpoptions
 %attr(755,root,root) %{_bindir}/lpq
@@ -643,9 +704,11 @@ fi
 %attr(755,root,root) %{_sbindir}/lpinfo
 %attr(755,root,root) %{_sbindir}/lpmove
 %attr(755,root,root) %{_sbindir}/reject
+%{_datadir}/cups/ipptool
 %{_desktopdir}/cups.desktop
 %{_iconsdir}/hicolor/*/apps/cups.png
 %{_mandir}/man1/cancel.1*
+%{_mandir}/man1/ipptool.1*
 %{_mandir}/man1/lp.1*
 %{_mandir}/man1/lpoptions.1*
 %{_mandir}/man1/lpq.1*
This page took 0.716685 seconds and 4 git commands to generate.