b91c6c3
# we build CUPS also with relro
b91c6c3
%global _hardened_build 1
b91c6c3
b91c6c3
Summary: OpenPrinting CUPS filters and backends
b91c6c3
Name:    cups-filters
5edcd87
Version: 1.0.36
Jaromír Končický ee08a4b
Release: 5%{?dist}
b91c6c3
b91c6c3
# For a breakdown of the licensing, see COPYING file
b91c6c3
# GPLv2:   filters: commandto*, imagetoraster, pdftops, rasterto*,
b91c6c3
#                   imagetopdf, pstopdf, texttopdf
b91c6c3
#         backends: parallel, serial
c61f61e
# GPLv2+:  filters: gstopxl, textonly, texttops, imagetops
b91c6c3
# GPLv3:   filters: bannertopdf
8b72b84
# GPLv3+:  filters: urftopdf
8f8fc52
# LGPLv2+:   utils: cups-browsed
c61f61e
# MIT:     filters: gstoraster, pdftoijs, pdftoopvp, pdftopdf, pdftoraster
8f8fc52
License: GPLv2 and GPLv2+ and GPLv3 and GPLv3+ and LGPLv2+ and MIT
b91c6c3
b91c6c3
Group:   System Environment/Base
cb5ccc5
Url:     http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters
8f8fc52
Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz
8f8fc52
Source1: cups-browsed.service
b91c6c3
6d976f6
Patch1:  cups-filters-filter-costs.patch
5b47cad
b91c6c3
Requires: cups-filters-libs%{?_isa} = %{version}-%{release}
b91c6c3
e260ffb
# Obsolete cups-php (bug #971741)
e260ffb
Obsoletes: cups-php < 1:1.6.0-1
e260ffb
# Don't Provide it because we don't build the php module
e260ffb
#Provides: cups-php = 1:1.6.0-1
e260ffb
b91c6c3
BuildRequires: cups-devel
16e6482
# pdftopdf
060dfd6
BuildRequires: qpdf-devel
16e6482
# pdftops
16e6482
BuildRequires: poppler-utils
16e6482
# pdftoijs, pdftoopvp, pdftoraster
16e6482
BuildRequires: poppler-devel poppler-cpp-devel
b91c6c3
BuildRequires: libjpeg-devel
b91c6c3
BuildRequires: libpng-devel
b91c6c3
BuildRequires: libtiff-devel
b91c6c3
BuildRequires: zlib-devel
b91c6c3
# libijs
b91c6c3
BuildRequires: ghostscript-devel
b91c6c3
BuildRequires: freetype-devel
b91c6c3
BuildRequires: fontconfig-devel
b91c6c3
BuildRequires: lcms2-devel
8f8fc52
# cups-browsed
16c7d32
BuildRequires: avahi-devel avahi-glib-devel
8f8fc52
BuildRequires: systemd
b91c6c3
b91c6c3
# Make sure we get postscriptdriver tags.
b91c6c3
BuildRequires: python-cups
b91c6c3
Jaromír Končický ee08a4b
# Testing font for test scripts.
Jaromír Končický ee08a4b
BuildRequires: dejavu-sans-fonts
Jaromír Končický ee08a4b
060dfd6
# autogen.sh
b91c6c3
BuildRequires: autoconf
b91c6c3
BuildRequires: automake
b91c6c3
BuildRequires: libtool
b91c6c3
b91c6c3
Requires: cups-filesystem
b91c6c3
Requires: poppler-utils
8334a6c
# pstopdf
e2e72b0
Requires: bc grep sed
b91c6c3
8f8fc52
# cups-browsed
8f8fc52
Requires(post): systemd
8f8fc52
Requires(preun): systemd
8f8fc52
Requires(postun): systemd
8f8fc52
c61f61e
# Ghostscript CUPS filters live here since Ghostscript 9.08.
c61f61e
Provides: ghostscript-cups = 9.08
c61f61e
Obsoletes: ghostscript-cups < 9.08
c61f61e
b91c6c3
%package libs
b91c6c3
Summary: OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries
b91c6c3
Group:   System Environment/Libraries
b91c6c3
# LGPLv2: libcupsfilters
b91c6c3
# MIT:    libfontembed
b91c6c3
License: LGPLv2 and MIT
b91c6c3
b91c6c3
%package devel
b91c6c3
Summary: OpenPrinting CUPS filters and backends - development environment
b91c6c3
Group:   Development/Libraries
b91c6c3
License: LGPLv2 and MIT
b91c6c3
Requires: cups-filters-libs%{?_isa} = %{version}-%{release}
b91c6c3
b91c6c3
%description
b91c6c3
Contains backends, filters, and other software that was
b91c6c3
once part of the core CUPS distribution but is no longer maintained by
b91c6c3
Apple Inc. In addition it contains additional filters developed
b91c6c3
independently of Apple, especially filters for the PDF-centric printing
b91c6c3
workflow introduced by OpenPrinting.
b91c6c3
b91c6c3
%description libs
b91c6c3
This package provides cupsfilters and fontembed libraries.
b91c6c3
b91c6c3
%description devel
b91c6c3
This is the development package for OpenPrinting CUPS filters and backends.
b91c6c3
b91c6c3
%prep
b91c6c3
%setup -q
f090744
6d976f6
# Upstream patch to re-work filter costs (bug #998977).
6d976f6
%patch1 -p1 -b .filter-costs
c61f61e
b91c6c3
%build
060dfd6
# work-around Rpath
b91c6c3
./autogen.sh
b91c6c3
b91c6c3
# --with-pdftops=pdftops - use Poppler instead of Ghostscript (see README)
8f8fc52
# --with-rcdir=no - don't install SysV init script
b91c6c3
%configure --disable-static \
b91c6c3
           --disable-silent-rules \
8f8fc52
           --with-pdftops=pdftops \
8f8fc52
           --with-rcdir=no
b91c6c3
b91c6c3
make %{?_smp_mflags}
b91c6c3
b91c6c3
%install
b91c6c3
make install DESTDIR=%{buildroot}
b91c6c3
b91c6c3
# https://fedoraproject.org/wiki/Packaging_tricks#With_.25doc
b91c6c3
mkdir __doc
b91c6c3
mv  %{buildroot}%{_datadir}/doc/cups-filters/* __doc
b91c6c3
rm -rf %{buildroot}%{_datadir}/doc/cups-filters
b91c6c3
b91c6c3
# Don't ship libtool la files.
b91c6c3
rm -f %{buildroot}%{_libdir}/lib*.la
b91c6c3
b91c6c3
# Not sure what is this good for.
b91c6c3
rm -f %{buildroot}%{_bindir}/ttfread
b91c6c3
8f8fc52
# systemd unit file
8f8fc52
mkdir -p %{buildroot}%{_unitdir}
8f8fc52
install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
8f8fc52
Jaromír Končický 36a0f6c
%check
Jaromír Končický 36a0f6c
make check
Jaromír Končický 36a0f6c
8f8fc52
%post
8f8fc52
%systemd_post cups-browsed.service
8f8fc52
09fdb61
# Initial installation
09fdb61
if [ $1 -eq 1 ] ; then
09fdb61
    IN=%{_sysconfdir}/cups/cupsd.conf
09fdb61
    OUT=%{_sysconfdir}/cups/cups-browsed.conf
09fdb61
    keyword=BrowsePoll
09fdb61
5d19066
    # We can remove this after few releases, it's just for the introduction of cups-browsed.
5d19066
    if [ -f "$OUT" ]; then
3f344f2
        echo -e "\n# NOTE: This file is not part of CUPS. You need to start & enable cups-browsed service." >> "$OUT"
5d19066
    fi
5d19066
5d19066
    # move BrowsePoll from cupsd.conf to cups-browsed.conf
285a043
    if [ -f "$IN" ] && grep -iq ^$keyword "$IN"; then
09fdb61
        if ! grep -iq ^$keyword "$OUT"; then
09fdb61
            (cat >> "$OUT" <
09fdb61
09fdb61
# Settings automatically moved from cupsd.conf by RPM package:
09fdb61
EOF
09fdb61
            ) || :
09fdb61
            (grep -i ^$keyword "$IN" >> "$OUT") || :
09fdb61
            #systemctl enable cups-browsed.service >/dev/null 2>&1 || :
09fdb61
        fi
09fdb61
        sed -i -e "s,^$keyword,#$keyword directive moved to cups-browsed.conf\n#$keyword,i" "$IN" || :
09fdb61
    fi
09fdb61
fi
09fdb61
8f8fc52
%preun
8f8fc52
%systemd_preun cups-browsed.service
8f8fc52
8f8fc52
%postun
8f8fc52
%systemd_postun_with_restart cups-browsed.service 
8f8fc52
b91c6c3
%post libs -p /sbin/ldconfig
b91c6c3
b91c6c3
%postun libs -p /sbin/ldconfig
b91c6c3
8f8fc52
b91c6c3
%files
b91c6c3
%doc __doc/README __doc/AUTHORS __doc/NEWS
16c7d32
%config(noreplace) %{_sysconfdir}/cups/cups-browsed.conf
b91c6c3
%config(noreplace) %{_sysconfdir}/fonts/conf.d/99pdftoopvp.conf
b91c6c3
%attr(0755,root,root) %{_cups_serverbin}/filter/*
b91c6c3
%attr(0755,root,root) %{_cups_serverbin}/backend/parallel
dc9ba04
# Serial backend needs to run as root (bug #212577#c4).
b91c6c3
%attr(0700,root,root) %{_cups_serverbin}/backend/serial
6eadbb2
%{_datadir}/cups/banners
b91c6c3
%{_datadir}/cups/charsets
b91c6c3
%{_datadir}/cups/data/*
aec37c9
# this needs to be in the main package because of cupsfilters.drv
aec37c9
%{_datadir}/cups/ppdc/pcl.h
b91c6c3
%{_datadir}/cups/drv/cupsfilters.drv
b91c6c3
%{_datadir}/cups/mime/cupsfilters.types
b91c6c3
%{_datadir}/cups/mime/cupsfilters.convs
b91c6c3
%{_datadir}/ppd/cupsfilters
8f8fc52
%{_sbindir}/cups-browsed
8f8fc52
%{_unitdir}/cups-browsed.service
5b47cad
%{_mandir}/man8/cups-browsed.8.gz
5b47cad
%{_mandir}/man5/cups-browsed.conf.5.gz
b91c6c3
b91c6c3
%files libs
b91c6c3
%doc __doc/COPYING fontembed/README
5edcd87
%{_libdir}/libcupsfilters.so.*
5edcd87
%{_libdir}/libfontembed.so.*
b91c6c3
b91c6c3
%files devel
b91c6c3
%{_includedir}/cupsfilters
b91c6c3
%{_includedir}/fontembed
5edcd87
%{_datadir}/cups/ppdc/escp.h
b91c6c3
%{_libdir}/pkgconfig/libcupsfilters.pc
b91c6c3
%{_libdir}/pkgconfig/libfontembed.pc
b91c6c3
%{_libdir}/libcupsfilters.so
b91c6c3
%{_libdir}/libfontembed.so
b91c6c3
b91c6c3
%changelog
Jaromír Končický ee08a4b
* Tue Aug 27 2013 Jaromír Končický <jkoncick@redhat.com> - 1.0.36-5
Jaromír Končický ee08a4b
- Added build dependency - font required for running tests
Jaromír Končický ee08a4b
Jaromír Končický 36a0f6c
* Tue Aug 27 2013 Jaromír Končický <jkoncick@redhat.com> - 1.0.36-4
Jaromír Končický 36a0f6c
- Added checking phase (make check)
Jaromír Končický 36a0f6c
6d976f6
* Wed Aug 21 2013 Tim Waugh <twaugh@redhat.com> - 1.0.36-3
6d976f6
- Upstream patch to re-work filter costs (bug #998977). No longer need
6d976f6
  text filter costs patch as paps gets used by default now if
6d976f6
  installed.
6d976f6
8f07d3b
* Mon Aug 19 2013 Marek Kasik <mkasik@redhat.com> - 1.0.36-2
8f07d3b
- Rebuild (poppler-0.24.0)
8f07d3b
5edcd87
* Tue Aug 13 2013 Tim Waugh <twaugh@redhat.com> - 1.0.36-1
5edcd87
- 1.0.36.
5edcd87
c61f61e
* Tue Aug 13 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-7
c61f61e
- Upstream patch to move in filters from ghostscript.
c61f61e
bd57f8f
* Tue Jul 30 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-6
bd57f8f
- Set cost for text filters to 200 so that the paps filter gets
bd57f8f
  preference for the time being (bug #988909).
bd57f8f
bc596f5
* Wed Jul 24 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-5
bc596f5
- Handle page-label when printing n-up as well.
bc596f5
f090744
* Tue Jul 23 2013 Tim Waugh <twaugh@redhat.com> - 1.0.35-4
f090744
- Added support for page-label (bug #987515).
f090744
beff8cc
* Thu Jul 11 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.35-3
beff8cc
- Rebuild (qpdf-5.0.0)
beff8cc
5b47cad
* Mon Jul 01 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.35-2
5b47cad
- add cups-browsed(8) and cups-browsed.conf(5)
d297362
- don't reverse lookup IP address in URI (#975822)
5b47cad
cb5ccc5
* Wed Jun 26 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.35-1
cb5ccc5
- 1.0.35
cb5ccc5
8b810de
* Mon Jun 24 2013 Marek Kasik <mkasik@redhat.com> - 1.0.34-9
8b810de
- Rebuild (poppler-0.22.5)
8b810de
3f344f2
* Wed Jun 19 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-8
3f344f2
- fix the note we add in cups-browsed.conf
3f344f2
e260ffb
* Wed Jun 12 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-7
e260ffb
- Obsolete cups-php (#971741)
e260ffb
49631a2
* Wed Jun 05 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-6
49631a2
- one more cups-browsed leak fixed (#959682)
49631a2
e2e72b0
* Wed Jun 05 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-5
e2e72b0
- perl is actually not required by pstopdf, because the calling is in dead code
e2e72b0
245ec3a
* Mon Jun 03 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-4
245ec3a
- fix resource leaks and other problems found by Coverity & Valgrind (#959682)
245ec3a
aec37c9
* Wed May 15 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-3
aec37c9
- ship ppdc/pcl.h because of cupsfilters.drv
aec37c9
8334a6c
* Tue May 07 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-2
8334a6c
- pstopdf requires bc (#960315)
8334a6c
0d940b8
* Thu Apr 11 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.34-1
0d940b8
- 1.0.34
0d940b8
8334a6c
* Fri Apr 05 2013 Fridolin Pokorny <fpokorny@redhat.com> - 1.0.33-1
052b9ed
- 1.0.33
052b9ed
- removed cups-filters-1.0.32-null-info.patch, accepted by upstream
052b9ed
27aed7a
* Thu Apr 04 2013 Fridolin Pokorny <fpokorny@redhat.com> - 1.0.32-2
27aed7a
- fixed segfault when info is NULL
27aed7a
99db87d
* Thu Apr 04 2013 Fridolin Pokorny <fpokorny@redhat.com> - 1.0.32-1
99db87d
- 1.0.32
99db87d
5d19066
* Fri Mar 29 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.31-3
5d19066
- add note to cups-browsed.conf
5d19066
285a043
* Thu Mar 28 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.31-2
285a043
- check cupsd.conf existence prior to grepping it (#928816)
285a043
f4a5fb7
* Fri Mar 22 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.31-1
f4a5fb7
- 1.0.31
f4a5fb7
6eadbb2
* Tue Mar 19 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.30-4
6eadbb2
- revert previous change
6eadbb2
e955a6c
* Wed Mar 13 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.30-3
e955a6c
- don't ship banners for now (#919489)
e955a6c
09fdb61
* Tue Mar 12 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.30-2
09fdb61
- move BrowsePoll from cupsd.conf to cups-browsed.conf in %%post
09fdb61
16c7d32
* Fri Mar 08 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.30-1
16c7d32
- 1.0.30: CUPS browsing and broadcasting in cups-browsed
16c7d32
12f499f
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.29-4
12f499f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
12f499f
Rex Dieter 9261356
* Sat Jan 19 2013 Rex Dieter <rdieter@fedoraproject.org> 1.0.29-3
Rex Dieter 9261356
- backport upstream buildfix for poppler-0.22.x
Rex Dieter 9261356
Adam Tkac c9807df
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 1.0.29-2
Adam Tkac c9807df
- rebuild due to "jpeg8-ABI" feature drop
Adam Tkac c9807df
961ee94
* Thu Jan 03 2013 Jiri Popelka <jpopelka@redhat.com> 1.0.29-1
961ee94
- 1.0.29
961ee94
8f8fc52
* Wed Jan 02 2013 Jiri Popelka <jpopelka@redhat.com> 1.0.28-1
8f8fc52
- 1.0.28: cups-browsed daemon and service
8f8fc52
8b72b84
* Thu Nov 29 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.25-1
8b72b84
- 1.0.25
8b72b84
682426e
* Fri Sep 07 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.24-1
682426e
- 1.0.24
682426e
16e6482
* Wed Aug 22 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.23-1
16e6482
- 1.0.23: old pdftopdf removed
16e6482
060dfd6
* Tue Aug 21 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.22-1
060dfd6
- 1.0.22: new pdftopdf (uses qpdf instead of poppler)
060dfd6
dc9ba04
* Wed Aug 08 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.20-4
dc9ba04
- rebuild
dc9ba04
b91c6c3
* Thu Aug 02 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.20-3
b91c6c3
- commented multiple licensing breakdown (#832130)
b91c6c3
- verbose build output
b91c6c3
b91c6c3
* Thu Aug 02 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.20-2
b91c6c3
- BuildRequires: poppler-cpp-devel (to build against poppler-0.20)
b91c6c3
b91c6c3
* Mon Jul 23 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.20-1
b91c6c3
- 1.0.20
b91c6c3
b91c6c3
* Tue Jul 17 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.19-1
b91c6c3
- 1.0.19
b91c6c3
b91c6c3
* Wed May 30 2012 Jiri Popelka <jpopelka@redhat.com> 1.0.18-1
b91c6c3
- initial spec file