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