# - remove obsolete /etc/cups/certs (trigger?)
#
# Conditional build:
-%bcond_without php # don't build PHP extension
-%bcond_without perl # don't build Perl extension
+%bcond_with gnutls # use GNU TLS for SSL/TLS support (instead of OpenSSL)
+%bcond_without php # don't build PHP extension
+%bcond_without perl # don't build Perl extension
+%bcond_without static_libs # don't build static library
#
%include /usr/lib/rpm/macros.perl
%define pdir CUPS
Summary(pt_BR): Sistema Unix de Impressão
Name: cups
Version: 1.2.1
-Release: 1
+Release: 4
Epoch: 1
License: GPL/LGPL
Group: Applications/Printing
Patch2: %{name}-options.patch
Patch3: %{name}-man_pages_linking.patch
Patch4: %{name}-nostrip.patch
+Patch5: %{name}-templates_pl.patch
+Patch6: %{name}-str1723.patch
+Patch7: %{name}-str1740.patch
URL: http://www.cups.org/
BuildRequires: acl-devel
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: dbus-devel
+%{?with_gnutls:BuildRequires: gnutls-devel}
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libstdc++-devel
BuildRequires: libtiff-devel
BuildRequires: openldap-devel
BuildRequires: openslp-devel
-BuildRequires: openssl-devel
+%{!?with_gnutls:BuildRequires: openssl-devel}
BuildRequires: pam-devel
%{?with_php:BuildRequires: php-devel >= 4:5.0.0}
BuildRequires: pkgconfig
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
%build
%{__aclocal} -I config-scripts
%configure \
--libdir=%{_ulibdir} \
--enable-shared \
- --enable-static \
+ %{?with_static_libs:--enable-static} \
--enable-ssl \
- --enable-openssl \
- --disable-gnutls \
+ --%{?with_gnutls:dis}%{!?with_gnutls:en}able-openssl \
+ --%{!?with_gnutls:dis}%{?with_gnutls:en}able-gnutls \
--disable-cdsassl \
--enable-dbus \
%{?debug:--enable-debug} \
- --with-docdir=%{_ulibdir}/%{name}/cgi-bin
+ --with-docdir=%{_ulibdir}/%{name}/cgi-bin \
+ %{?with_php:--with-php}
+
%{__make}
%{__perl} -pi -e 's#-I\.\.\/\.\.#-I../.. -I../../cups#g' scripting/php/Makefile
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}
+ mv $RPM_BUILD_ROOT%{_ulibdir}/*.a $RPM_BUILD_ROOT%{_libdir}
fi
%if %{with php}
touch $RPM_BUILD_ROOT/var/cache/cups/help.index
touch $RPM_BUILD_ROOT/var/cache/cups/{job,remote}.cache
+touch $RPM_BUILD_ROOT/var/cache/cups/ppds.dat
install -d $RPM_BUILD_ROOT/etc/cups/ssl
# post-strip can't work on readonly files
%dir %attr(511,lp,sys) /var/run/cups/certs
%dir %attr(710,root,lp) /var/spool/cups
%dir %attr(1770,root,lp) /var/spool/cups/tmp
-%attr(640,root,lp) %ghost /var/cache/cups/help.index
+%attr(600,lp,lp) %ghost /var/cache/cups/help.index
%attr(640,root,lp) %ghost /var/cache/cups/job.cache
+%attr(600,lp,lp) %ghost /var/cache/cups/ppds.dat
%attr(640,root,lp) %ghost /var/cache/cups/remote.cache
%attr(750,root,logs) %dir /var/log/archiv/cups
%attr(750,root,logs) %dir /var/log/cups
#%lang(fr) %{_mandir}/fr/man1/cups-config*
#%lang(es) %{_mandir}/es/man1/cups-config*
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/*.a
+%endif
%if %{with perl}
%files -n perl-cups