%bcond_without gnutls # use GNU TLS for SSL/TLS support
%bcond_with dnssd # DNS Service Discovery support via dns_sd API (obsoleted by Avahi patch)
%bcond_without avahi # DNS Service Discovery support via Avahi
-%bcond_without gssapi # do not include GSSAPI support
-%bcond_without python # don't build Python support in web interface
-%bcond_without static_libs # don't build static library
+%bcond_without gssapi # GSSAPI support
+%bcond_with lspp # audit and SELinux label support (lspp patch)
+%bcond_with tcp_wrappers # tcp_wrappers/libwrap support
+%bcond_without python # Python support in web interface
+%bcond_without static_libs # static library
Summary(pl.UTF-8): Ogólny system druku dla Uniksa
Summary(pt_BR.UTF-8): Sistema Unix de Impressão
Name: cups
-Version: 2.0.2
-Release: 3
+Version: 2.2.7
+Release: 2
Epoch: 1
License: LGPL v2 (libraries), GPL v2 (the rest)
Group: Applications/Printing
-Source0: http://www.cups.org/software/%{version}/%{name}-%{version}-source.tar.bz2
-# Source0-md5: 6e0ea72dbafcf5baaa1cf4178e71096d
+Source0: https://github.com/apple/cups/releases/download/v%{version}/%{name}-%{version}-source.tar.gz
+# Source0-md5: ac703bcde223dab6d205a5fff193f716
Source1: %{name}.init
Source2: %{name}.pamd
Source3: %{name}.logrotate
# avahi patches from fedora
Patch100: %{name}-avahi-address.patch
Patch101: %{name}-avahi-no-threaded.patch
+Patch102: cups-banners.patch
+Patch103: cups-pid.patch
+Patch104: cups-eggcups.patch
+Patch105: cups-driverd-timeout.patch
+Patch106: cups-logrotate.patch
+Patch107: cups-res_init.patch
+Patch108: cups-filter-debug.patch
+Patch109: cups-hp-deviceid-oid.patch
+Patch110: cups-dnssd-deviceid.patch
+Patch111: cups-ricoh-deviceid-oid.patch
+
+Patch113: cups-dymo-deviceid.patch
+Patch114: cups-freebind.patch
+Patch115: cups-ipp-multifile.patch
+Patch116: cups-web-devices-timeout.patch
+Patch117: cups-lspp.patch
+Patch118: cups-bug-5289.patch
URL: http://www.cups.org/
BuildRequires: acl-devel
+%{?with_lspp:BuildRequires: audit-libs-devel}
BuildRequires: autoconf >= 2.60
BuildRequires: automake
%{?with_dnssd:BuildRequires: avahi-compat-libdns_sd-devel}
BuildRequires: glibc-headers
%{?with_gnutls:BuildRequires: gnutls-devel}
%{?with_gssapi:BuildRequires: heimdal-devel}
-BuildRequires: libjpeg-devel
BuildRequires: libpaper-devel
-BuildRequires: libpng-devel
+%{?with_lspp:BuildRequires: libselinux-devel}
BuildRequires: libstdc++-devel
-BuildRequires: libtiff-devel
BuildRequires: libusb-devel >= 1.0
+%{?with_tcp_wrappers:BuildRequires: libwrap-devel}
BuildRequires: pam-devel
BuildRequires: pkgconfig
BuildRequires: rpmbuild(macros) >= 1.641
Requires: %{name}-image-lib = %{epoch}:%{version}-%{release}
Requires: %{name}-lib = %{epoch}:%{version}-%{release}
# for libcups
-%{?with_gnutls:Requires: gnutls-devel}
-%{?with_gssapi:Requires: heimdal-devel}
+%{?with_gnutls:Requires: gnutls-devel}
+%{?with_gssapi:Requires: heimdal-devel}
Requires: zlib-devel
# for libcupsimage
Requires: libjpeg-devel
%patch101 -p1
%endif
+%patch102 -p1
+%patch103 -p1
+%patch104 -p1
+%patch105 -p1
+%patch106 -p1
+%patch107 -p1
+%patch108 -p1
+%patch109 -p1
+%patch110 -p1
+%patch111 -p1
+
+%patch113 -p1
+%patch114 -p1
+%patch115 -p1
+%patch116 -p1
+%patch117 -p1
+%patch118 -p1
+
%build
%{__aclocal} -I config-scripts
%{__autoconf}
--enable-gssapi%{!?with_gssapi:=no} \
--enable-libpaper \
--enable-libusb \
+ %{?with_lspp:--enable-lspp} \
--enable-shared \
--enable-ssl \
%{?with_static_libs:--enable-static} \
+ %{?with_tcp_wrappers:--enable-tcp-wrappers} \
--with-cups-group=lp \
--with-cups-user=lp \
--with-system-groups=sys \
%{?with_dnssd:--with-dnssd-includes=x} \
--with-optim=-Wno-format-y2k \
%{?with_python:--with-python=%{_bindir}/python} \
- --with-systemdsystemunitdir=%{systemdunitdir}
+ --with-systemd=%{systemdunitdir}
%{__make} %{?debug:OPTIONS="-DDEBUG"}
ln -s %{_ulibdir}/cups/backend/dnssd $RPM_BUILD_ROOT%{_ulibdir}/cups/backend/mdns
%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 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/cups/mailto.conf
+cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+cp -pf %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/%{name}
+cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
+cp -p %{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 %{SOURCE7} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
+cp -p %{SOURCE6} $RPM_BUILD_ROOT/etc/modprobe.d/cups.conf
+cp -p %{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
ln -s accept $RPM_BUILD_ROOT%{_sbindir}/enable
ln -s accept $RPM_BUILD_ROOT%{_sbindir}/disable
-# shipped in cups-filters
-%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/cups/banners/*
-%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/cups/data/testprint
-
%clean
rm -rf $RPM_BUILD_ROOT
%attr(600,root,lp) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/snmp.conf
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.cups
%dir %attr(700,root,lp) %{_sysconfdir}/%{name}/ssl
-%dir %{_sysconfdir}/%{name}/interfaces
%dir %attr(755,root,lp) %{_sysconfdir}/%{name}/ppd
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
%attr(755,root,root) %{_bindir}/cupstestppd
%{_ulibdir}/cups/cgi-bin/*.html
%{_ulibdir}/cups/cgi-bin/*.png
%{_ulibdir}/cups/cgi-bin/*.txt
+%lang(de) %{_ulibdir}/cups/cgi-bin/de
%lang(es) %{_ulibdir}/cups/cgi-bin/es
%lang(ja) %{_ulibdir}/cups/cgi-bin/ja
+%lang(pt_BR) %{_ulibdir}/cups/cgi-bin/pt_BR
+%lang(ru) %{_ulibdir}/cups/cgi-bin/ru
%dir %{_ulibdir}/cups/daemon
%attr(755,root,root) %{_ulibdir}/cups/daemon/cups-deviced
%dir %{_datadir}/cups/templates
%{_datadir}/cups/templates/*.tmpl
+%lang(de) %{_datadir}/cups/templates/de
%lang(es) %{_datadir}/cups/templates/es
+%lang(fr) %{_datadir}/cups/templates/fr
%lang(ja) %{_datadir}/cups/templates/ja
+%lang(pt_BR) %{_datadir}/cups/templates/pt_BR
+%lang(ru) %{_datadir}/cups/templates/ru
%{_mandir}/man1/cups.1*
%{_mandir}/man1/cupstestppd.1*
%{_mandir}/man1/cupstestdsc.1*
%{_mandir}/man5/cups-files.conf.5*
%{_mandir}/man5/cups-snmp.conf.5*
%{_mandir}/man5/cupsd.conf.5*
+%{_mandir}/man5/cupsd-logs.5*
%{_mandir}/man5/ipptoolfile.5*
%{_mandir}/man5/mailto.conf.5*
%{_mandir}/man5/mime.convs.5*
%{_mandir}/man8/cupsctl.8*
%{_mandir}/man8/cupsd.8*
%{_mandir}/man8/cupsd-helper.8*
-%{_mandir}/man8/cupsd-logs.8*
%{_mandir}/man8/cupsfilter.8*
%dir %attr(775,root,lp) /var/cache/cups
%attr(755,root,root) %{_libdir}/libcupsmime.so.*
%attr(755,root,root) %{_libdir}/libcupsppdc.so.*
%dir %{_datadir}/cups
-%lang(ca) %{_datadir}/locale/ca/cups_ca.po
-%lang(cs) %{_datadir}/locale/cs/cups_cs.po
-%lang(es) %{_datadir}/locale/es/cups_es.po
-%lang(fr) %{_datadir}/locale/fr/cups_fr.po
-%lang(it) %{_datadir}/locale/it/cups_it.po
-%lang(ja) %{_datadir}/locale/ja/cups_ja.po
-%lang(ru) %{_datadir}/locale/ru/cups_ru.po
+%lang(ca) %{_localedir}/ca/cups_ca.po
+%lang(cs) %{_localedir}/cs/cups_cs.po
+%lang(de) %{_localedir}/de/cups_de.po
+%lang(es) %{_localedir}/es/cups_es.po
+%lang(fr) %{_localedir}/fr/cups_fr.po
+%lang(it) %{_localedir}/it/cups_it.po
+%lang(ja) %{_localedir}/ja/cups_ja.po
+%lang(pt_BR) %{_localedir}/pt_BR/cups_pt_BR.po
+%lang(ru) %{_localedir}/ru/cups_ru.po
+%lang(zh_CN) %{_localedir}/zh_CN/cups_zh_CN.po
%files clients
%defattr(644,root,root,755)