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