Blame SPECS/cups-filters.spec

b95efc
# we build CUPS also with relro
b95efc
%global _hardened_build 1
b95efc
b95efc
Summary: OpenPrinting CUPS filters and backends
b95efc
Name:    cups-filters
b95efc
Version: 1.0.35
cfd5fe
Release: 15%{?dist}
b95efc
b95efc
# For a breakdown of the licensing, see COPYING file
b95efc
# GPLv2:   filters: commandto*, imagetoraster, pdftops, rasterto*,
b95efc
#                   imagetopdf, pstopdf, texttopdf
b95efc
#         backends: parallel, serial
b95efc
# GPLv2+:  filters: textonly, texttops, imagetops
b95efc
# GPLv3:   filters: bannertopdf
b95efc
# GPLv3+:  filters: urftopdf
b95efc
# LGPLv2+:   utils: cups-browsed
b95efc
# MIT:     filters: pdftoijs, pdftoopvp, pdftopdf, pdftoraster
b95efc
License: GPLv2 and GPLv2+ and GPLv3 and GPLv3+ and LGPLv2+ and MIT
b95efc
b95efc
Group:   System Environment/Base
b95efc
Url:     http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters
b95efc
Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz
b95efc
Source1: cups-browsed.service
b95efc
b95efc
Patch1:  cups-filters-man.patch
b95efc
Patch2:  cups-filters-lookup.patch
b95efc
Patch3:  cups-filters-page-label.patch
b95efc
Patch4:  cups-filters-filter-costs.patch
b95efc
Patch5:  cups-filters-urftopdf.patch
b95efc
Patch6:  cups-filters-format-mismatch.patch
b95efc
Patch7:  cups-filters-pdf-landscape.patch
b95efc
Patch8:  cups-filters-pdftoopvp.patch
cfd5fe
Patch9:  cups-filters-CVE-2013-6475.patch
b95efc
b95efc
Requires: cups-filters-libs%{?_isa} = %{version}-%{release}
b95efc
b95efc
# Obsolete cups-php (bug #971741)
b95efc
Obsoletes: cups-php < 1:1.6.0-1
b95efc
# Don't Provide it because we don't build the php module
b95efc
#Provides: cups-php = 1:1.6.0-1
b95efc
b95efc
BuildRequires: cups-devel
b95efc
# pdftopdf
b95efc
BuildRequires: qpdf-devel
b95efc
# pdftops
b95efc
BuildRequires: poppler-utils
b95efc
# pdftoijs, pdftoopvp, pdftoraster
b95efc
BuildRequires: poppler-devel poppler-cpp-devel
b95efc
BuildRequires: libjpeg-devel
b95efc
BuildRequires: libpng-devel
b95efc
BuildRequires: libtiff-devel
b95efc
BuildRequires: zlib-devel
b95efc
# libijs
b95efc
BuildRequires: ghostscript-devel
b95efc
BuildRequires: freetype-devel
b95efc
BuildRequires: fontconfig-devel
b95efc
BuildRequires: lcms2-devel
b95efc
# cups-browsed
b95efc
BuildRequires: avahi-devel avahi-glib-devel
b95efc
BuildRequires: systemd
b95efc
b95efc
# Make sure we get postscriptdriver tags.
b95efc
BuildRequires: python-cups
b95efc
b95efc
# autogen.sh
b95efc
BuildRequires: autoconf
b95efc
BuildRequires: automake
b95efc
BuildRequires: libtool
b95efc
b95efc
Requires: cups-filesystem
b95efc
Requires: poppler-utils
cfd5fe
cfd5fe
# texttopdf
cfd5fe
Requires: liberation-mono-fonts
cfd5fe
b95efc
# pstopdf
b95efc
Requires: bc grep sed
b95efc
b95efc
# cups-browsed
b95efc
Requires(post): systemd
b95efc
Requires(preun): systemd
b95efc
Requires(postun): systemd
b95efc
b95efc
%package libs
b95efc
Summary: OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries
b95efc
Group:   System Environment/Libraries
b95efc
# LGPLv2: libcupsfilters
b95efc
# MIT:    libfontembed
b95efc
License: LGPLv2 and MIT
b95efc
b95efc
%package devel
b95efc
Summary: OpenPrinting CUPS filters and backends - development environment
b95efc
Group:   Development/Libraries
b95efc
License: LGPLv2 and MIT
b95efc
Requires: cups-filters-libs%{?_isa} = %{version}-%{release}
b95efc
b95efc
%description
b95efc
Contains backends, filters, and other software that was
b95efc
once part of the core CUPS distribution but is no longer maintained by
b95efc
Apple Inc. In addition it contains additional filters developed
b95efc
independently of Apple, especially filters for the PDF-centric printing
b95efc
workflow introduced by OpenPrinting.
b95efc
b95efc
%description libs
b95efc
This package provides cupsfilters and fontembed libraries.
b95efc
b95efc
%description devel
b95efc
This is the development package for OpenPrinting CUPS filters and backends.
b95efc
b95efc
%prep
b95efc
%setup -q
b95efc
%patch1 -p1 -b .man
b95efc
%patch2 -p1 -b .lookup
b95efc
b95efc
# Added support for page-label (bug #987515).
b95efc
%patch3 -p1 -b .page-label
b95efc
b95efc
# Upstream patch to re-work filter costs (bug #998981).
b95efc
%patch4 -p1 -b .filter-costs
b95efc
b95efc
# Don't ship urftopdf for now (bug #1002947).
b95efc
%patch5 -p1 -b .urftopdf
b95efc
b95efc
# Fixes for some printf-type format mismatches (bug #1003035).
b95efc
%patch6 -p1 -b .format-mismatch
b95efc
b95efc
# Fix PDF landscape printing (bug #1018313).
b95efc
%patch7 -p1 -b .pdf-landscape
b95efc
b95efc
# Don't ship pdftoopvp for now (bug #1027557).
b95efc
%patch8 -p1 -b .pdftoopvp
b95efc
cfd5fe
# Apply CVE-2013-6475 to pdftoopvp even though we don't ship it
cfd5fe
# (bug #1052741).
cfd5fe
%patch9 -p1 -b .CVE-2013-6475
cfd5fe
b95efc
%build
b95efc
# work-around Rpath
b95efc
./autogen.sh
b95efc
b95efc
# --with-pdftops=pdftops - use Poppler instead of Ghostscript (see README)
b95efc
# --with-rcdir=no - don't install SysV init script
b95efc
%configure --disable-static \
b95efc
           --disable-silent-rules \
b95efc
           --with-pdftops=pdftops \
b95efc
           --with-rcdir=no
b95efc
b95efc
make %{?_smp_mflags}
b95efc
b95efc
%install
b95efc
make install DESTDIR=%{buildroot}
b95efc
b95efc
# https://fedoraproject.org/wiki/Packaging_tricks#With_.25doc
b95efc
mkdir __doc
b95efc
mv  %{buildroot}%{_datadir}/doc/cups-filters/* __doc
b95efc
rm -rf %{buildroot}%{_datadir}/doc/cups-filters
b95efc
b95efc
# Don't ship libtool la files.
b95efc
rm -f %{buildroot}%{_libdir}/lib*.la
b95efc
b95efc
# Not sure what is this good for.
b95efc
rm -f %{buildroot}%{_bindir}/ttfread
b95efc
b95efc
# systemd unit file
b95efc
mkdir -p %{buildroot}%{_unitdir}
b95efc
install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
b95efc
b95efc
%post
b95efc
%systemd_post cups-browsed.service
b95efc
b95efc
# Initial installation
b95efc
if [ $1 -eq 1 ] ; then
b95efc
    IN=%{_sysconfdir}/cups/cupsd.conf
b95efc
    OUT=%{_sysconfdir}/cups/cups-browsed.conf
b95efc
    keyword=BrowsePoll
b95efc
b95efc
    # We can remove this after few releases, it's just for the introduction of cups-browsed.
b95efc
    if [ -f "$OUT" ]; then
b95efc
        echo -e "\n# NOTE: This file is not part of CUPS. You need to start & enable cups-browsed service." >> "$OUT"
b95efc
    fi
b95efc
b95efc
    # move BrowsePoll from cupsd.conf to cups-browsed.conf
b95efc
    if [ -f "$IN" ] && grep -iq ^$keyword "$IN"; then
b95efc
        if ! grep -iq ^$keyword "$OUT"; then
b95efc
            (cat >> "$OUT" <
b95efc
b95efc
# Settings automatically moved from cupsd.conf by RPM package:
b95efc
EOF
b95efc
            ) || :
b95efc
            (grep -i ^$keyword "$IN" >> "$OUT") || :
b95efc
            #systemctl enable cups-browsed.service >/dev/null 2>&1 || :
b95efc
        fi
b95efc
        sed -i -e "s,^$keyword,#$keyword directive moved to cups-browsed.conf\n#$keyword,i" "$IN" || :
b95efc
    fi
b95efc
fi
b95efc
b95efc
%preun
b95efc
%systemd_preun cups-browsed.service
b95efc
b95efc
%postun
b95efc
%systemd_postun_with_restart cups-browsed.service 
b95efc
b95efc
%post libs -p /sbin/ldconfig
b95efc
b95efc
%postun libs -p /sbin/ldconfig
b95efc
b95efc
b95efc
%files
b95efc
%doc __doc/README __doc/AUTHORS __doc/NEWS
b95efc
%config(noreplace) %{_sysconfdir}/cups/cups-browsed.conf
b95efc
%attr(0755,root,root) %{_cups_serverbin}/filter/*
b95efc
%attr(0755,root,root) %{_cups_serverbin}/backend/parallel
b95efc
# Serial backend needs to run as root (bug #212577#c4).
b95efc
%attr(0700,root,root) %{_cups_serverbin}/backend/serial
b95efc
%{_datadir}/cups/banners
b95efc
%{_datadir}/cups/charsets
b95efc
%{_datadir}/cups/data/*
b95efc
# this needs to be in the main package because of cupsfilters.drv
b95efc
%{_datadir}/cups/ppdc/pcl.h
b95efc
%{_datadir}/cups/drv/cupsfilters.drv
b95efc
%{_datadir}/cups/mime/cupsfilters.types
b95efc
%{_datadir}/cups/mime/cupsfilters.convs
b95efc
%{_datadir}/ppd/cupsfilters
b95efc
%{_sbindir}/cups-browsed
b95efc
%{_unitdir}/cups-browsed.service
b95efc
%{_mandir}/man8/cups-browsed.8.gz
b95efc
%{_mandir}/man5/cups-browsed.conf.5.gz
b95efc
b95efc
%files libs
b95efc
%doc __doc/COPYING fontembed/README
b95efc
%attr(0755,root,root) %{_libdir}/libcupsfilters.so.*
b95efc
%attr(0755,root,root) %{_libdir}/libfontembed.so.*
b95efc
b95efc
%files devel
b95efc
%{_includedir}/cupsfilters
b95efc
%{_includedir}/fontembed
b95efc
%{_libdir}/pkgconfig/libcupsfilters.pc
b95efc
%{_libdir}/pkgconfig/libfontembed.pc
b95efc
%{_libdir}/libcupsfilters.so
b95efc
%{_libdir}/libfontembed.so
b95efc
b95efc
%changelog
cfd5fe
* Fri Mar 28 2014 Tim Waugh <twaugh@redhat.com> - 1.0.35-15
cfd5fe
- The texttopdf filter requires a TrueType monospaced font
cfd5fe
  (bug #1070729).
cfd5fe
cfd5fe
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.0.35-14
cfd5fe
- Mass rebuild 2014-01-24
cfd5fe
cfd5fe
* Mon Jan 20 2014 Tim Waugh <twaugh@redhat.com> - 1.0.35-13
cfd5fe
- Apply CVE-2013-6475 to pdftoopvp even though we don't ship it
cfd5fe
  (bug #1052741).
cfd5fe
cfd5fe
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.0.35-12
cfd5fe
- Mass rebuild 2013-12-27
cfd5fe
b95efc
* Fri Nov  8 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-11
b95efc
- Don't ship pdftoopvp for now (bug #1027557).
b95efc
b95efc
* Wed Oct 16 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-10
b95efc
- Fix PDF landscape printing (bug #1018313).
b95efc
b95efc
* Tue Oct  1 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-9
b95efc
- Fixes for some printf-type format mismatches (bug #1003035).
b95efc
b95efc
* Fri Aug 30 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-8
b95efc
- Don't ship urftopdf for now (bug #1002947).
b95efc
b95efc
* Wed Aug 21 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-7
b95efc
- Upstream patch to re-work filter costs (bug #998981). No longer need
b95efc
  text filter costs patch as paps gets used by default now if
b95efc
  installed.
b95efc
b95efc
* Tue Jul 30 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-6
b95efc
- Set cost for text filters to 200 so that the paps filter gets
b95efc
  preference for the time being (bug #988909).
b95efc
b95efc
* Wed Jul 24 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-5
b95efc
- Handle page-label when printing n-up as well.
b95efc
b95efc
* Tue Jul 23 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-4
b95efc
- Added support for page-label (bug #987515).
b95efc
b95efc
* Thu Jul 11 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.35-3
b95efc
- Rebuild (qpdf-5.0.0)
b95efc
b95efc
* Mon Jul 01 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.35-2
b95efc
- add cups-browsed(8) and cups-browsed.conf(5)
b95efc
- don't reverse lookup IP address in URI (#975822)
b95efc
b95efc
* Wed Jun 26 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.35-1
b95efc
- 1.0.35
b95efc
b95efc
* Mon Jun 24 2013 Marek Kasik <mkasik@redhat.com> - 1.0.34-9
b95efc
- Rebuild (poppler-0.22.5)
b95efc
b95efc
* Wed Jun 19 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-8
b95efc
- fix the note we add in cups-browsed.conf
b95efc
b95efc
* Wed Jun 12 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-7
b95efc
- Obsolete cups-php (#971741)
b95efc
b95efc
* Wed Jun 05 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-6
b95efc
- one more cups-browsed leak fixed (#959682)
b95efc
b95efc
* Wed Jun 05 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-5
b95efc
- perl is actually not required by pstopdf, because the calling is in dead code
b95efc
b95efc
* Mon Jun 03 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-4
b95efc
- fix resource leaks and other problems found by Coverity & Valgrind (#959682)
b95efc
b95efc
* Wed May 15 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-3
b95efc
- ship ppdc/pcl.h because of cupsfilters.drv
b95efc
b95efc
* Tue May 07 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-2
b95efc
- pstopdf requires bc (#960315)
b95efc
b95efc
* Thu Apr 11 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-1
b95efc
- 1.0.34
b95efc
b95efc
* Fri Apr 05 2013 Fridolin Pokorny <fpokorny@redhat.com> - 1.0.33-1
b95efc
- 1.0.33
b95efc
- removed cups-filters-1.0.32-null-info.patch, accepted by upstream
b95efc
b95efc
* Thu Apr 04 2013 Fridolin Pokorny <fpokorny@redhat.com> - 1.0.32-2
b95efc
- fixed segfault when info is NULL
b95efc
b95efc
* Thu Apr 04 2013 Fridolin Pokorny <fpokorny@redhat.com> - 1.0.32-1
b95efc
- 1.0.32
b95efc
b95efc
* Fri Mar 29 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.31-3
b95efc
- add note to cups-browsed.conf
b95efc
b95efc
* Thu Mar 28 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.31-2
b95efc
- check cupsd.conf existence prior to grepping it (#928816)
b95efc
b95efc
* Fri Mar 22 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.31-1
b95efc
- 1.0.31
b95efc
b95efc
* Tue Mar 19 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.30-4
b95efc
- revert previous change
b95efc
b95efc
* Wed Mar 13 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.30-3
b95efc
- don't ship banners for now (#919489)
b95efc
b95efc
* Tue Mar 12 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.30-2
b95efc
- move BrowsePoll from cupsd.conf to cups-browsed.conf in %%post
b95efc
b95efc
* Fri Mar 08 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.30-1
b95efc
- 1.0.30: CUPS browsing and broadcasting in cups-browsed
b95efc
b95efc
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.29-4
b95efc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
b95efc
b95efc
* Sat Jan 19 2013 Rex Dieter <rdieter@fedoraproject.org> 1.0.29-3
b95efc
- backport upstream buildfix for poppler-0.22.x
b95efc
b95efc
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 1.0.29-2
b95efc
- rebuild due to "jpeg8-ABI" feature drop
b95efc
b95efc
* Thu Jan 03 2013 Jiri Popelka <jpopelka@redhat.com> 1.0.29-1
b95efc
- 1.0.29
b95efc
b95efc
* Wed Jan 02 2013 Jiri Popelka <jpopelka@redhat.com> 1.0.28-1
b95efc
- 1.0.28: cups-browsed daemon and service
b95efc
b95efc
* Thu Nov 29 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.25-1
b95efc
- 1.0.25
b95efc
b95efc
* Fri Sep 07 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.24-1
b95efc
- 1.0.24
b95efc
b95efc
* Wed Aug 22 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.23-1
b95efc
- 1.0.23: old pdftopdf removed
b95efc
b95efc
* Tue Aug 21 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.22-1
b95efc
- 1.0.22: new pdftopdf (uses qpdf instead of poppler)
b95efc
b95efc
* Wed Aug 08 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.20-4
b95efc
- rebuild
b95efc
b95efc
* Thu Aug 02 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.20-3
b95efc
- commented multiple licensing breakdown (#832130)
b95efc
- verbose build output
b95efc
b95efc
* Thu Aug 02 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.20-2
b95efc
- BuildRequires: poppler-cpp-devel (to build against poppler-0.20)
b95efc
b95efc
* Mon Jul 23 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.20-1
b95efc
- 1.0.20
b95efc
b95efc
* Tue Jul 17 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.19-1
b95efc
- 1.0.19
b95efc
b95efc
* Wed May 30 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.18-1
b95efc
- initial spec file