]> git.pld-linux.org Git - packages/cups-filters.git/blob - cups-filters.spec
- up to 1.0.43
[packages/cups-filters.git] / cups-filters.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static libraries
4 %bcond_without  perl            # Perl module
5 %bcond_without  php             # PHP extension
6 #
7 Summary:        OpenPrinting CUPS filters and backends
8 Summary(pl.UTF-8):      Filtry i backendy CUPS-a z projektu OpenPrinting
9 Name:           cups-filters
10 Version:        1.0.43
11 Release:        1
12 # For a breakdown of the licensing, see COPYING file
13 # GPLv2:   filters: commandto*, imagetoraster, pdftops, rasterto*,
14 #                   imagetopdf, pstopdf, texttopdf
15 #         backends: parallel, serial
16 # GPLv2+:  filters: gstopxl, textonly, texttops, imagetops
17 # GPLv3:   filters: bannertopdf
18 # GPLv3+:  filters: urftopdf
19 # LGPLv2+:   utils: cups-browsed
20 # MIT:     filters: gstoraster, pdftoijs, pdftoopvp, pdftopdf, pdftoraster
21 License:        GPL v2, GPL v2+, GPL v3, GPL v3+, LGPL v2+, MIT
22 Group:          Applications/Printing
23 Source0:        http://www.openprinting.org/download/cups-filters/%{name}-%{version}.tar.xz
24 # Source0-md5:  50f760c4cb7be37544c1174a12b1900e
25 Patch0:         %{name}-dbus.patch
26 Patch1:         %{name}-php.patch
27 URL:            http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters
28 BuildRequires:  autoconf >= 2.65
29 BuildRequires:  automake >= 1:1.11
30 BuildRequires:  avahi-devel
31 BuildRequires:  avahi-glib-devel
32 BuildRequires:  cups-devel >= 1:1.6.0
33 BuildRequires:  dbus-devel
34 BuildRequires:  fontconfig-devel >= 2.0.0
35 BuildRequires:  freetype-devel >= 2
36 # /usr/bin/gs, for features detection
37 BuildRequires:  ghostscript
38 BuildRequires:  ghostscript-ijs-devel
39 BuildRequires:  glib2-devel >= 1:2.30.2
40 BuildRequires:  lcms2-devel >= 2
41 BuildRequires:  libjpeg-devel
42 BuildRequires:  libpng-devel
43 BuildRequires:  libstdc++-devel
44 BuildRequires:  libtiff-devel
45 BuildRequires:  libtool
46 %{?with_perl:BuildRequires:     perl-devel}
47 %{?with_php:BuildRequires:      php-devel >= 5}
48 BuildRequires:  pkgconfig >= 1:0.20
49 # just for cpp/poppler-version.h
50 BuildRequires:  poppler-cpp-devel >= 0.18
51 BuildRequires:  poppler-devel >= 0.18
52 # /usr/bin/pdftops, for features detection
53 BuildRequires:  poppler-progs >= 0.18
54 BuildRequires:  rpmbuild(macros) >= 1.671
55 BuildRequires:  qpdf-devel >= 3.0.2
56 BuildRequires:  zlib-devel
57 # DejaVuSans.ttf (testing font for test scripts)
58 #BuildRequires: fonts-TTF-DejaVu
59 Requires:       %{name}-libs = %{version}-%{release}
60 Requires:       cups >= 1:1.6.0
61 Requires:       fontconfig >= 2.0.0
62 Suggests:       fonts-TTF-freefont
63 Requires:       ghostscript
64 Requires:       poppler-progs >= 0.18
65 Requires:       qpdf-libs >= 3.0.2
66 # pstopdf
67 Requires:       bc
68 Requires:       grep
69 Requires:       sed
70 Provides:       cups-filter-foomatic
71 Provides:       ghostscript-cups = 9.08
72 Obsoletes:      cups-filter-foomatic
73 Obsoletes:      foomatic-filters
74 Obsoletes:      ghostscript-cups < 9.08
75 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76
77 %define         _cups_serverbin         %(/usr/bin/cups-config --serverbin)
78
79 %description
80 Contains backends, filters, and other software that was once part of
81 the core CUPS distribution but is no longer maintained by Apple Inc.
82 In addition it contains additional filters developed independently of
83 Apple, especially filters for the PDF-centric printing workflow
84 introduced by OpenPrinting.
85
86 %description -l pl.UTF-8
87 Ten pakiet zawiera backendy, filtry i inne oprogramowanie, będące
88 kiedyś częścią CUPS-a, ale nie utrzymywane już przez firmę Apple Inc.
89 Dodatkowo pakiet zawiera dodatkowe filtry stworzone niezależnie od
90 Apple'a, w szczególności filtry dla PDF-ocentrycznego obiegu
91 drukowania wprowadzonego przez OpenPrinting.
92
93 %package libs
94 Summary:        OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries
95 Summary(pl.UTF-8):      Filtry i backendy CUPS-a z projektu OpenPrinting - biblioteki cupsfilters i fontembed
96 # LGPLv2: libcupsfilters
97 # MIT:    libfontembed
98 License:        LGPL v2, MIT
99 Group:          Libraries
100 Requires:       cups-lib >= 1:1.6.0
101
102 %description libs
103 This package provides cupsfilters and fontembed libraries.
104
105 %description libs -l pl.UTF-8
106 Ten pakiet udostępnia biblioteki cupsfilters i fontembed.
107
108 %package devel
109 Summary:        OpenPrinting CUPS filters and backends - development environment
110 Summary(pl.UTF-8):      Filtry i backendy CUPS-a z projektu OpenPrinting - środowisko programistyczne
111 License:        LGPL v2, MIT
112 Group:          Development/Libraries
113 Requires:       %{name}-libs = %{version}-%{release}
114 Requires:       cups-devel >= 1:1.6.0
115 Requires:       libjpeg-devel
116 Requires:       libpng-devel
117 Requires:       libtiff-devel
118
119 %description devel
120 This is the development package for OpenPrinting CUPS filters and
121 backends.
122
123 %description devel -l pl.UTF-8
124 To jest pakiet programistyczny dla filtrów i backendów CUPS-a z
125 projektu OpenPrinting.
126
127 %package static
128 Summary:        OpenPrinting CUPS filters and backends - static cupsfilters and fontembed libraries
129 Summary(pl.UTF-8):      Filtry i backendy CUPS-a z projektu OpenPrinting - statyczne biblioteki cupsfilters i fontembed
130 License:        LGPL v2, MIT
131 Group:          Development/Libraries
132 Requires:       %{name}-devel = %{version}-%{release}
133
134 %description static
135 This package provides static cupsfilters and fontembed libraries.
136
137 %description static -l pl.UTF-8
138 Ten pakiet udostępnia statyczne biblioteki cupsfilters i fontembed.
139
140 %package -n cups-browsed
141 Summary:        A daemon for browsing the Bonjour broadcasts of shared, remote CUPS printers
142 Summary(pl.UTF-8):      Demon do przeglądania broadcastów Bonjour współdzielonych, zdalnych drukarek CUPS
143 Group:          Applications/Printing
144 Requires(post,preun):   /sbin/chkconfig
145 Requires(post,preun,postun):    systemd-units
146 Requires:       glib2 >= 1:2.30.2
147 Requires:       systemd-units >= 38
148
149 %description -n cups-browsed
150 A daemon for browsing the Bonjour broadcasts of shared,
151 remote CUPS printers.
152
153 %description -n cups-browsed -l pl.UTF-8
154 Demon do przeglądania broadcastów Bonjour współdzielonych, zdalnych
155 drukarek CUPS.
156
157 %package -n cups-backend-parallel
158 Summary:        Parallel port backend for CUPS
159 Summary(pl.UTF-8):      Backend CUPS-a obsługujący porty równoległe
160 # must be larger than cups.spec before 1.6.0
161 Epoch:          2
162 License:        GPL v2 + OpenSSL exception
163 Group:          Applications/Printing
164 Requires:       cups >= 1:1.6.0
165
166 %description -n cups-backend-parallel
167 This package allow CUPS printing on printers connected by parallel
168 ports.
169
170 %description -n cups-backend-parallel -l pl.UTF-8
171 Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach
172 podłączonych do portów równoległych.
173
174 %package -n cups-backend-serial
175 Summary:        Serial port backend for CUPS
176 Summary(pl.UTF-8):      Backend CUPS-a obsługujący porty szeregowe
177 # must be larger than cups.spec before 1.6.0
178 Epoch:          2
179 License:        GPL v2 + OpenSSL exception
180 Group:          Applications/Printing
181 Requires:       cups >= 1:1.6.0
182
183 %description -n cups-backend-serial
184 This package allow CUPS printing on printers connected by serial
185 ports.
186
187 %description -n cups-backend-serial -l pl.UTF-8
188 Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach
189 podłączonych do portów szeregowych.
190
191 %package -n perl-cups
192 Summary:        Perl module for CUPS
193 Summary(pl.UTF-8):      Moduł Perla CUPS
194 # must be larger than cups.spec before 1.6.0
195 Epoch:          2
196 License:        GPL v2 + OpenSSL exception
197 Group:          Development/Languages/Perl
198 Requires:       cups-lib >= 1:1.6.0
199
200 %description -n perl-cups
201 Perl module for Common Unix Printing System.
202
203 %description -n perl-cups -l pl.UTF-8
204 Moduł Perla do ogólnego systemu druku dla Uniksa.
205
206 %package -n php-cups
207 Summary:        PHP module for CUPS
208 Summary(pl.UTF-8):      Moduł PHP CUPS
209 # must be larger than cups.spec before 1.6.0
210 Epoch:          2
211 License:        GPL v2 + OpenSSL exception
212 Group:          Development/Languages/PHP
213 Requires:       cups-lib >= 1:1.6.0
214 %{?requires_php_extension}
215 Requires:       /etc/php/conf.d
216 Requires:       php(core) >= 5.0.0
217
218 %description -n php-cups
219 PHP module for Common Unix Printing System.
220
221 %description -n php-cups -l pl.UTF-8
222 Moduł PHP do ogólnego systemu druku dla Uniksa.
223
224 # CREATE ANY NEW PACKAGES BEFORE cups-backend-* (EPOCH)
225
226 %prep
227 %setup -q
228 %patch0 -p1
229 %patch1 -p1
230
231 %build
232 %{__aclocal}
233 %{__autoconf}
234 %{__automake}
235
236 %configure \
237         --enable-dbus \
238         --disable-silent-rules \
239         %{!?with_static_libs:--disable-static} \
240         --with-acroread-path=/usr/bin/acroread \
241         --with-gs-path=/usr/bin/gs \
242         %{?with_php:--with-php} \
243         --with-pdftocairo-path=/usr/bin/pdftocairo \
244         --with-pdftops=hybrid \
245         --with-pdftops-path=/usr/bin/pdftops \
246         --with-rcdir=/etc/rc.d/init.d \
247         --with-rclevels= \
248         --with-test-font-path=/usr/share/fonts/TTF/DejaVuSans.ttf
249
250 %{__make}
251
252 %if %{with perl}
253 cd scripting/perl
254 %{__perl} Makefile.PL \
255         INSTALLDIRS=vendor \
256         OPTIMIZE="%{rpmcflags}"
257
258 %{__make}
259 cd ../..
260 %endif
261
262 %install
263 rm -rf $RPM_BUILD_ROOT
264 install -d $RPM_BUILD_ROOT%{systemdunitdir}
265
266 %{__make} install \
267         DESTDIR=$RPM_BUILD_ROOT
268
269 %if %{with php}
270 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
271 cat > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/phpcups.ini << 'EOF'
272 ; Enable phpcups extension module
273 extension=libphpcups.so
274 EOF
275 %endif
276
277 %if %{with perl}
278 %{__make} -C scripting/perl install \
279         DESTDIR=$RPM_BUILD_ROOT
280 %endif
281
282 install -p utils/cups-browsed.service $RPM_BUILD_ROOT%{systemdunitdir}
283
284 # obsoleted by pkg-config
285 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
286 # dlopened module
287 %{__rm} $RPM_BUILD_ROOT%{_libdir}/php/libphpcups.la
288 # packaged as %doc
289 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/cups-filters
290 # Not sure what is this good for.
291 %{__rm} $RPM_BUILD_ROOT%{_bindir}/ttfread
292
293 %clean
294 rm -rf $RPM_BUILD_ROOT
295
296 %post   libs -p /sbin/ldconfig
297 %postun libs -p /sbin/ldconfig
298
299 %post -n cups-browsed
300 if [ $1 -eq 1 ] ; then
301         # We can remove this after few releases, it's just for the introduction of cups-browsed.
302         if [ -f %{_sysconfdir}/cups/cups-browsed.conf ]; then
303                 echo -e "\n# NOTE: This file is not part of CUPS. You need to start & enable cups-browsed service." >>%{_sysconfdir}/cups/cups-browsed.conf
304         fi
305
306         # move BrowsePoll from cupsd.conf to cups-browsed.conf
307         if [ -f %{_sysconfdir}/cups/cupsd.conf ] && grep -iq "^BrowsePoll" %{_sysconfdir}/cups/cupsd.conf; then
308                 if ! grep -iq "^BrowsePoll" %{_sysconfdir}/cups/cups-browsed.conf; then
309                         echo "# Settings automatically moved from cupsd.conf by RPM package:" >>%{_sysconfdir}/cups/cups-browsed.conf
310                         grep -i "^BrowsePoll" %{_sysconfdir}/cups/cupsd.conf >> %{_sysconfdir}/cups/cups-browsed.conf || :
311                 fi
312                 sed -i -e "s,^BrowsePoll,#BrowsePoll directive moved to cups-browsed.conf\n#BrowsePoll,i" %{_sysconfdir}/cups/cupsd.conf || :
313         fi
314 fi
315 /sbin/chkconfig --add cups-browsed
316 %service cups-browsed restart
317 %systemd_post cups-browsed.service
318
319 %preun -n cups-browsed
320 if [ "$1" = "0" ]; then
321         %service cups-browsed stop
322         /sbin/chkconfig --del cups-browsed
323 fi
324 %systemd_preun cups-browsed.service
325
326 %postun -n cups-browsed
327 %systemd_reload
328
329 %files
330 %defattr(644,root,root,755)
331 %doc AUTHORS COPYING NEWS README
332 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fonts/conf.d/99pdftoopvp.conf
333 %attr(755,root,root) %{_cups_serverbin}/filter/bannertopdf
334 %attr(755,root,root) %{_cups_serverbin}/filter/commandtoescpx
335 %attr(755,root,root) %{_cups_serverbin}/filter/commandtopclx
336 %attr(755,root,root) %{_cups_serverbin}/filter/foomatic-rip
337 %attr(755,root,root) %{_cups_serverbin}/filter/gstopxl
338 %attr(755,root,root) %{_cups_serverbin}/filter/gstoraster
339 %attr(755,root,root) %{_cups_serverbin}/filter/imagetopdf
340 %attr(755,root,root) %{_cups_serverbin}/filter/imagetops
341 %attr(755,root,root) %{_cups_serverbin}/filter/imagetoraster
342 %attr(755,root,root) %{_cups_serverbin}/filter/pdftoijs
343 %attr(755,root,root) %{_cups_serverbin}/filter/pdftoippprinter
344 %attr(755,root,root) %{_cups_serverbin}/filter/pdftoopvp
345 %attr(755,root,root) %{_cups_serverbin}/filter/pdftopdf
346 %attr(755,root,root) %{_cups_serverbin}/filter/pdftops
347 %attr(755,root,root) %{_cups_serverbin}/filter/pdftoraster
348 %attr(755,root,root) %{_cups_serverbin}/filter/pstopdf
349 %attr(755,root,root) %{_cups_serverbin}/filter/rastertoescpx
350 %attr(755,root,root) %{_cups_serverbin}/filter/rastertopclx
351 %attr(755,root,root) %{_cups_serverbin}/filter/textonly
352 %attr(755,root,root) %{_cups_serverbin}/filter/texttopdf
353 %attr(755,root,root) %{_cups_serverbin}/filter/texttops
354 %attr(755,root,root) %{_cups_serverbin}/filter/urftopdf
355 %{_datadir}/cups/banners
356 %{_datadir}/cups/charsets
357 %{_datadir}/cups/data/default.pdf
358 %{_datadir}/cups/data/default-testpage.pdf
359 %{_datadir}/cups/data/testprint
360 %{_datadir}/cups/drv/cupsfilters.drv
361 %{_datadir}/cups/mime/cupsfilters.types
362 %{_datadir}/cups/mime/cupsfilters.convs
363 # definitions for drivers; pcl.h is used by cupsfilters.drv
364 %{_datadir}/cups/ppdc/escp.h
365 %{_datadir}/cups/ppdc/pcl.h
366 %{_datadir}/ppd/cupsfilters
367 %{_mandir}/man1/foomatic-rip.1*
368
369 %files libs
370 %defattr(644,root,root,755)
371 %doc fontembed/README
372 %attr(755,root,root) %{_libdir}/libcupsfilters.so.*.*.*
373 %attr(755,root,root) %ghost %{_libdir}/libcupsfilters.so.1
374 %attr(755,root,root) %{_libdir}/libfontembed.so.*.*.*
375 %attr(755,root,root) %ghost %{_libdir}/libfontembed.so.1
376
377 %files devel
378 %defattr(644,root,root,755)
379 %attr(755,root,root) %{_libdir}/libcupsfilters.so
380 %attr(755,root,root) %{_libdir}/libfontembed.so
381 %{_includedir}/cupsfilters
382 %{_includedir}/fontembed
383 %{_pkgconfigdir}/libcupsfilters.pc
384 %{_pkgconfigdir}/libfontembed.pc
385
386 %files static
387 %defattr(644,root,root,755)
388 %{_libdir}/libcupsfilters.a
389 %{_libdir}/libfontembed.a
390
391 %files -n cups-browsed
392 %defattr(644,root,root,755)
393 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cups/cups-browsed.conf
394 %attr(755,root,root) %{_sbindir}/cups-browsed
395 %attr(754,root,root) /etc/rc.d/init.d/cups-browsed
396 %{systemdunitdir}/cups-browsed.service
397 %{_mandir}/man5/cups-browsed.conf.5*
398 %{_mandir}/man8/cups-browsed.8*
399
400 %files -n cups-backend-parallel
401 %defattr(644,root,root,755)
402 %attr(755,root,root) %{_cups_serverbin}/backend/parallel
403
404 %files -n cups-backend-serial
405 %defattr(644,root,root,755)
406 %attr(755,root,root) %{_cups_serverbin}/backend/serial
407
408 %if %{with perl}
409 %files -n perl-cups
410 %defattr(644,root,root,755)
411 %doc scripting/perl/README
412 %{perl_vendorarch}/CUPS.pm
413 %dir %{perl_vendorarch}/auto/CUPS
414 %{perl_vendorarch}/auto/CUPS/CUPS.bs
415 %{perl_vendorarch}/auto/CUPS/autosplit.ix
416 %attr(755,root,root) %{perl_vendorarch}/auto/CUPS/CUPS.so
417 %{_mandir}/man3/CUPS.3pm*
418 %endif
419
420 %if %{with php}
421 %files -n php-cups
422 %defattr(644,root,root,755)
423 %doc scripting/php/README
424 %attr(755,root,root) %{php_extensiondir}/libphpcups.so
425 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/phpcups.ini
426 %endif
This page took 0.08338 seconds and 3 git commands to generate.