]> git.pld-linux.org Git - packages/cups-filters.git/blob - cups-filters.spec
- FreeMono (and so fonts-TTF-freefont) is required by texttopdf
[packages/cups-filters.git] / cups-filters.spec
1 Summary:        OpenPrinting CUPS filters and backends
2 Name:           cups-filters
3 Version:        1.0.41
4 Release:        8
5 # For a breakdown of the licensing, see COPYING file
6 # GPLv2:   filters: commandto*, imagetoraster, pdftops, rasterto*,
7 #                   imagetopdf, pstopdf, texttopdf
8 #         backends: parallel, serial
9 # GPLv2+:  filters: gstopxl, textonly, texttops, imagetops
10 # GPLv3:   filters: bannertopdf
11 # GPLv3+:  filters: urftopdf
12 # LGPLv2+:   utils: cups-browsed
13 # MIT:     filters: gstoraster, pdftoijs, pdftoopvp, pdftopdf, pdftoraster
14 License:        GPLv2 and GPLv2+ and GPLv3 and GPLv3+ and LGPLv2+ and MIT
15 Group:          Applications/Printing
16 Source0:        http://www.openprinting.org/download/cups-filters/%{name}-%{version}.tar.xz
17 # Source0-md5:  fe5a9a07b9a64b35975154068cbedef9
18 Patch1:         %{name}-pdf-landscape.patch
19 Patch2:         %{name}-dbus.patch
20 URL:            http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters
21 BuildRequires:  autoconf
22 BuildRequires:  automake
23 BuildRequires:  avahi-devel
24 BuildRequires:  avahi-glib-devel
25 BuildRequires:  cups-devel >= 1:1.6.0
26 BuildRequires:  dbus-devel
27 BuildRequires:  fontconfig-devel
28 BuildRequires:  freetype-devel
29 BuildRequires:  ghostscript-ijs-devel
30 BuildRequires:  lcms2-devel
31 BuildRequires:  libjpeg-devel
32 BuildRequires:  libpng-devel
33 BuildRequires:  libtiff-devel
34 BuildRequires:  libtool
35 BuildRequires:  pkgconfig
36 BuildRequires:  poppler-cpp-devel
37 BuildRequires:  poppler-devel
38 BuildRequires:  poppler-progs
39 BuildRequires:  python-pycups
40 BuildRequires:  rpmbuild(macros) >= 1.671
41 BuildRequires:  qpdf-devel
42 BuildRequires:  systemd
43 BuildRequires:  zlib-devel
44 # Testing font for test scripts.
45 #BuildRequires: dejavu-sans-fonts
46 Requires:       cups-filters-libs = %{version}-%{release}
47 Requires:       fonts-TTF-freefont
48 Requires:       poppler-progs
49 # pstopdf
50 Requires:       bc
51 Requires:       grep
52 Requires:       sed
53 Provides:       ghostscript-cups = 9.08
54 Obsoletes:      ghostscript-cups < 9.08
55 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
57 %define         _cups_serverbin         %(/usr/bin/cups-config --serverbin)
58
59 %package libs
60 Summary:        OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries
61 Group:          Libraries
62 # LGPLv2: libcupsfilters
63 # MIT:    libfontembed
64 License:        LGPLv2 and MIT
65
66 %package devel
67 Summary:        OpenPrinting CUPS filters and backends - development environment
68 License:        LGPLv2 and MIT
69 Group:          Development/Libraries
70 Requires:       cups-filters-libs = %{version}-%{release}
71
72 %description
73 Contains backends, filters, and other software that was once part of
74 the core CUPS distribution but is no longer maintained by Apple Inc.
75 In addition it contains additional filters developed independently of
76 Apple, especially filters for the PDF-centric printing workflow
77 introduced by OpenPrinting.
78
79 %description libs
80 This package provides cupsfilters and fontembed libraries.
81
82 %description devel
83 This is the development package for OpenPrinting CUPS filters and
84 backends.
85
86 %package -n cups-browsed
87 Summary:        A daemon for browsing the Bonjour broadcasts of shared, remote CUPS printers
88 Group:          Applications/Printing
89 Requires(post,preun,postun):    systemd-units
90 Requires:       cups-filters-libs = %{version}-%{release}
91 Requires:       systemd-units >= 38
92
93 %description -n cups-browsed
94 A daemon for browsing the Bonjour broadcasts of shared,
95 remote CUPS printers.
96
97 %package -n cups-backend-serial
98 Summary:        Serial port backend for CUPS
99 Summary(pl.UTF-8):      Backend obsługujący porty szeregowe dla CUPS-a
100 # must be larger than cups.spec
101 Epoch:          2
102 License:        GPL v2 + openssl exception
103 Group:          Applications/Printing
104 Requires:       %{name} = %{version}-%{release}
105
106 %description -n cups-backend-serial
107 This package allow CUPS printing on printers connected by serial
108 ports.
109
110 %description -n cups-backend-serial -l pl.UTF-8
111 Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach
112 podłączonych do portów szeregowych.
113
114 %package -n cups-backend-parallel
115 Summary:        Parallel port backend for CUPS
116 Summary(pl.UTF-8):      Backend obsługujący porty równoległe dla CUPS-a
117 # must be larger than cups.spec
118 Epoch:          2
119 License:        GPL v2 + openssl exception
120 Group:          Applications/Printing
121 Requires:       %{name} = %{version}-%{release}
122
123 %description -n cups-backend-parallel
124 This package allow CUPS printing on printers connected by parallel
125 ports.
126
127 %description -n cups-backend-parallel -l pl.UTF-8
128 Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach
129 podłączonych do portów równoległych.
130
131 # CREATE ANY NEW PACKAGES BEFORE cups-backend-* (EPOCH)
132
133 %prep
134 %setup -q
135 %patch1 -p1
136 %patch2 -p1
137
138 %build
139 %{__aclocal}
140 %{__autoconf}
141 %{__automake}
142
143 %configure \
144         --disable-static \
145         --disable-silent-rules \
146         --with-pdftops=hybrid \
147         --enable-dbus \
148         --with-rcdir=no
149
150 %{__make}
151
152 %install
153 rm -rf $RPM_BUILD_ROOT
154 install -d $RPM_BUILD_ROOT%{systemdunitdir}
155
156 %{__make} install \
157         DESTDIR=$RPM_BUILD_ROOT
158
159 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
160
161 # Not sure what is this good for.
162 %{__rm} $RPM_BUILD_ROOT%{_bindir}/ttfread
163
164 install -p utils/cups-browsed.service $RPM_BUILD_ROOT%{systemdunitdir}
165
166 %clean
167 rm -rf $RPM_BUILD_ROOT
168
169 %post -n cups-browsed
170 if [ $1 -eq 1 ] ; then
171         # We can remove this after few releases, it's just for the introduction of cups-browsed.
172         if [ -f %{_sysconfdir}/cups/cups-browsed.conf ]; then
173                 echo -e "\n# NOTE: This file is not part of CUPS. You need to start & enable cups-browsed service." >>%{_sysconfdir}/cups/cups-browsed.conf
174         fi
175
176         # move BrowsePoll from cupsd.conf to cups-browsed.conf
177         if [ -f %{_sysconfdir}/cups/cupsd.conf ] && grep -iq "^BrowsePoll" %{_sysconfdir}/cups/cupsd.conf; then
178                 if ! grep -iq "^BrowsePoll" %{_sysconfdir}/cups/cups-browsed.conf; then
179                         echo "# Settings automatically moved from cupsd.conf by RPM package:" >>%{_sysconfdir}/cups/cups-browsed.conf
180                         grep -i "^BrowsePoll" %{_sysconfdir}/cups/cupsd.conf >> %{_sysconfdir}/cups/cups-browsed.conf || :
181                 fi
182                 sed -i -e "s,^BrowsePoll,#BrowsePoll directive moved to cups-browsed.conf\n#BrowsePoll,i" %{_sysconfdir}/cups/cupsd.conf || :
183         fi
184 fi
185 %systemd_post cups-browsed.service
186
187 %preun -n cups-browsed
188 %systemd_preun cups-browsed.service
189
190 %postun -n cups-browsed
191 %systemd_reload
192
193 %post libs -p /sbin/ldconfig
194 %postun libs -p /sbin/ldconfig
195
196 %files
197 %defattr(644,root,root,755)
198 %doc README AUTHORS NEWS
199 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fonts/conf.d/99pdftoopvp.conf
200 %attr(755,root,root) %{_cups_serverbin}/filter/*
201 %{_datadir}/cups/banners
202 %{_datadir}/cups/charsets
203 %{_datadir}/cups/data/*.pdf
204 %{_datadir}/cups/data/testprint
205 # this needs to be in the main package because of cupsfilters.drv
206 %{_datadir}/cups/ppdc/pcl.h
207 %{_datadir}/cups/drv/cupsfilters.drv
208 %{_datadir}/cups/mime/cupsfilters.types
209 %{_datadir}/cups/mime/cupsfilters.convs
210 %{_datadir}/ppd/cupsfilters
211
212 %files libs
213 %defattr(644,root,root,755)
214 %doc fontembed/README
215 %attr(755,root,root) %{_libdir}/libcupsfilters.so.*.*.*
216 %attr(755,root,root) %ghost %{_libdir}/libcupsfilters.so.1
217 %attr(755,root,root) %{_libdir}/libfontembed.so.*.*.*
218 %attr(755,root,root) %ghost %{_libdir}/libfontembed.so.1
219
220 %files devel
221 %defattr(644,root,root,755)
222 %{_includedir}/cupsfilters
223 %{_includedir}/fontembed
224 %{_datadir}/cups/ppdc/escp.h
225 %{_pkgconfigdir}/libcupsfilters.pc
226 %{_pkgconfigdir}/libfontembed.pc
227 %attr(755,root,root) %{_libdir}/libcupsfilters.so
228 %attr(755,root,root) %{_libdir}/libfontembed.so
229
230 %files -n cups-browsed
231 %defattr(644,root,root,755)
232 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cups/cups-browsed.conf
233 %attr(755,root,root) %{_sbindir}/cups-browsed
234 %{systemdunitdir}/cups-browsed.service
235 %{_mandir}/man8/cups-browsed.8*
236 %{_mandir}/man5/cups-browsed.conf.5*
237
238 %files -n cups-backend-serial
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_cups_serverbin}/backend/serial
241
242 %files -n cups-backend-parallel
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{_cups_serverbin}/backend/parallel
This page took 0.049755 seconds and 4 git commands to generate.