]>
Commit | Line | Data |
---|---|---|
75b06fcb ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without dbus # build dbus | |
4 | %bcond_without fax # build fax, depends on dbus | |
5 | ||
6 | %if %{without dbus} | |
7 | %undefine with_fax | |
8 | %endif | |
9 | ||
ef3c86b9 JB |
10 | Summary: Hewlett-Packard Linux Imaging and Printing suite - printing and scanning using HP devices |
11 | Summary(pl.UTF-8): Narzędzia Hewlett-Packard Linux Imaging and Printing - drukowanie i skanowanie przy użyciu urządzeń HP | |
82c91e61 | 12 | Name: hplip |
a22c5210 JR |
13 | Version: 3.11.7 |
14 | Release: 0.1 | |
ef3c86b9 | 15 | License: BSD (hpijs), MIT (low-level scanning and printing code), GPL v2 (the rest) |
82c91e61 | 16 | Group: Applications/System |
ef3c86b9 | 17 | Source0: http://downloads.sourceforge.net/hplip/%{name}-%{version}.tar.gz |
a22c5210 | 18 | # Source0-md5: 5cb89a00b0c680d8bf9bf4b4f1f863b1 |
d7ec48cf | 19 | Patch0: %{name}-desktop.patch |
90e31170 | 20 | Patch1: unresolved.patch |
032c25ec | 21 | URL: http://hplipopensource.com/ |
82c91e61 | 22 | BuildRequires: autoconf |
9846f1df | 23 | BuildRequires: automake |
82aef552 | 24 | BuildRequires: cups-devel |
75b06fcb | 25 | %{?with_dbus:BuildRequires: dbus-devel >= 1.0.0} |
cedbfcec | 26 | BuildRequires: libjpeg-devel |
82c91e61 | 27 | BuildRequires: libstdc++-devel |
7526f02a | 28 | BuildRequires: libtiff-devel |
9a437c7d | 29 | BuildRequires: libtool |
ef3c86b9 | 30 | BuildRequires: libusb-compat-devel >= 0.1 |
52bf4fe0 AM |
31 | BuildRequires: net-snmp-devel |
32 | BuildRequires: openssl-devel | |
9a437c7d | 33 | BuildRequires: pkgconfig |
ef3c86b9 JB |
34 | BuildRequires: python-devel >= 2.2 |
35 | BuildRequires: python-modules >= 2.2 | |
6336a75a | 36 | BuildRequires: rpm-pythonprov |
db551280 | 37 | BuildRequires: sane-backends-devel |
9a437c7d | 38 | BuildRequires: sed >= 4.0 |
ef3c86b9 | 39 | Requires: %{name}-libs = %{version}-%{release} |
6336a75a | 40 | Requires: python-modules |
be5b6a34 | 41 | Obsoletes: hal-hplip |
32ec01ce | 42 | Obsoletes: hpijs |
9a437c7d | 43 | Obsoletes: hplip-daemon |
ecc19b7b | 44 | Obsoletes: python-hplip |
9846f1df | 45 | Conflicts: ghostscript <= 7.00-3 |
7a9b84c0 SS |
46 | # used in scan.py |
47 | Suggests: python-ReportLab >= 2.0 | |
82c91e61 | 48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
49 | ||
52bf4fe0 AM |
50 | %define _ulibdir %{_prefix}/lib |
51 | ||
75b06fcb | 52 | %define cups_datadir %(cups-config --datadir 2>/dev/null || echo ERROR) |
ef3c86b9 | 53 | %define cups_mimedir %{cups_datadir}/mime |
75b06fcb ER |
54 | %define cups_ppddir %{cups_datadir}/model |
55 | %define cups_serverdir %(cups-config --serverbin 2>/dev/null || echo ERROR) | |
ef3c86b9 JB |
56 | %define cups_backenddir %{cups_serverdir}/backend |
57 | %define cups_filterdir %{cups_serverdir}/filter | |
82c91e61 | 58 | |
59 | %description | |
52bf4fe0 AM |
60 | The Hewlett-Packard Linux Imaging and Printing project (HPLIP) |
61 | provides a unified single and multi-function connectivity solution for | |
62 | Linux. The goal of this project is to provide "radically simple" | |
63 | printing, faxing, scanning, photo-card access, and device management | |
64 | to the consumer and small business desktop Linux users. | |
65 | ||
ef3c86b9 JB |
66 | %description -l pl.UTF-8 |
67 | Projekt Hewlett-Packard Linux Imaging and Printing (HPLIP) udostępnia | |
68 | jednolite, wielofunkcyjne rozwiązanie dla Linuksa. Celem tego projektu | |
69 | jest zapewnienie "radykalnie prostego" drukowania, faksowania, | |
70 | skanowania, dostępu do kart fotograficznych oraz zarządzania | |
71 | urządzeniami końcowym użytkownikom Linuksa. | |
72 | ||
6336a75a | 73 | %package gui-tools |
74 | Summary: HPLIP GUI tools | |
ef3c86b9 | 75 | Summary(pl.UTF-8): Narzędzia HPLIP z graficznym interfejsem użytkownika |
6336a75a | 76 | Group: Applications/System |
ef3c86b9 | 77 | Requires: %{name} = %{version}-%{release} |
9a437c7d | 78 | Requires: python-PyQt4 |
6336a75a | 79 | |
80 | %description gui-tools | |
81 | HPLIP GUI tools. | |
82 | ||
83 | %description gui-tools -l pl.UTF-8 | |
ef3c86b9 | 84 | Narzędzia HPLIP z graficznym interfejsem użytkownika. |
6336a75a | 85 | |
52bf4fe0 AM |
86 | %package libs |
87 | Summary: HPLIP Libraries | |
7403e3f2 | 88 | Summary(pl.UTF-8): Biblioteki HPLIP |
52bf4fe0 AM |
89 | Group: Libraries |
90 | ||
91 | %description libs | |
92 | HPLIP Libraries. | |
93 | ||
0a7e9b17 | 94 | %description libs -l pl.UTF-8 |
52bf4fe0 AM |
95 | Biblioteki HPLIP. |
96 | ||
97 | %package sane | |
ef3c86b9 JB |
98 | Summary: HPLIP driver for SANE (scanner access) |
99 | Summary(pl.UTF-8): Sterownik HPLIP dla SANE (dostęp do skanera) | |
52bf4fe0 | 100 | Group: Libraries |
ecc19b7b | 101 | Requires(post): /bin/grep |
db551280 | 102 | Requires(postun): /bin/sed |
ef3c86b9 | 103 | Requires: %{name} = %{version}-%{release} |
52bf4fe0 AM |
104 | |
105 | %description sane | |
ef3c86b9 | 106 | HPLIP driver for SANE (provides scanner access). |
82c91e61 | 107 | |
0a7e9b17 | 108 | %description sane -l pl.UTF-8 |
ef3c86b9 | 109 | Sterownik HPLIP dla SANE (umożliwia dostęp do skanera). |
82c91e61 | 110 | |
111 | %package ppd | |
112 | Summary: PPD database for Hewlett Packard printers | |
7403e3f2 | 113 | Summary(pl.UTF-8): Baza danych PPD dla drukarek Hewlett Packard |
82c91e61 | 114 | Group: Applications/System |
115 | Requires: cups | |
032c25ec | 116 | Requires: cups-filter-foomatic |
70d2c4fc | 117 | Obsoletes: hpijs-ppd |
82c91e61 | 118 | |
119 | %description ppd | |
120 | PPD database for Hewlett Packard printers. | |
121 | ||
0a7e9b17 | 122 | %description ppd -l pl.UTF-8 |
82c91e61 | 123 | Baza danych PPD dla drukarek Hewlett Packard. |
124 | ||
52bf4fe0 AM |
125 | %package -n cups-backend-hp |
126 | Summary: HP backend for CUPS | |
7403e3f2 | 127 | Summary(pl.UTF-8): Backend HP dla CUPS-a |
52bf4fe0 | 128 | Group: Applications/Printing |
ecc19b7b | 129 | Requires: %{name} = %{version}-%{release} |
db551280 | 130 | Requires: cups |
52bf4fe0 AM |
131 | |
132 | %description -n cups-backend-hp | |
ef3c86b9 | 133 | This package allows CUPS printing on HP printers. |
52bf4fe0 | 134 | |
0a7e9b17 JR |
135 | %description -n cups-backend-hp -l pl.UTF-8 |
136 | Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach HP. | |
52bf4fe0 | 137 | |
70d2c4fc AF |
138 | %package -n cups-backend-hpfax |
139 | Summary: HP fax backend for CUPS | |
85a47db5 | 140 | Summary(pl.UTF-8): Backend HP fax dla CUPS-a |
70d2c4fc AF |
141 | Group: Applications/Printing |
142 | Requires: %{name} = %{version}-%{release} | |
143 | Requires: cups | |
144 | ||
145 | %description -n cups-backend-hpfax | |
146 | This package allow CUPS faxing using HP AiO devices. | |
147 | ||
08ab5eb1 JB |
148 | %description -n cups-backend-hpfax -l pl.UTF-8 |
149 | Ten pakiet umożliwia wysyłanie faksów z poziomu CUPS-a poprzez | |
150 | urządzenia HP AiO. | |
151 | ||
82c91e61 | 152 | %prep |
153 | %setup -q | |
ac6d2378 | 154 | %undos Makefile.am |
d7ec48cf | 155 | %patch0 -p1 |
90e31170 | 156 | %patch1 -p1 |
ef3c86b9 | 157 | |
9a437c7d | 158 | %{__sed} -i -e's,^#!/usr/bin/env python$,#!/usr/bin/python,' *.py |
ef3c86b9 | 159 | %{__sed} -i -e 's#test -d /usr/share/polkit-1#true#' configure.in |
82c91e61 | 160 | |
161 | %build | |
90e31170 AF |
162 | %{__libtoolize} |
163 | %{__aclocal} | |
164 | %{__autoconf} | |
165 | %{__automake} | |
82c91e61 | 166 | CXXFLAGS="%{rpmcflags} -fno-exceptions -fno-rtti" |
167 | %configure \ | |
75b06fcb ER |
168 | %{!?with_dbus:--disable-dbus-build} \ |
169 | %{!?with_fax:--disable-fax-build} \ | |
bae2b1ac AF |
170 | --enable-cups-drv-install \ |
171 | --enable-cups-ppd-install \ | |
bae2b1ac | 172 | --enable-foomatic-drv-install \ |
ef3c86b9 | 173 | --enable-foomatic-ppd-install \ |
032c25ec | 174 | --enable-foomatic-rip-hplip-install \ |
ef3c86b9 JB |
175 | --enable-hpcups-install \ |
176 | --enable-hpijs-install \ | |
2b8087e6 PZ |
177 | --enable-policykit \ |
178 | --enable-pp-build \ | |
7dc4c10e | 179 | --enable-udev-acl-rules \ |
ef3c86b9 JB |
180 | --with-cupsbackenddir=%{cups_backenddir} \ |
181 | --with-cupsfilterdir=%{cups_filterdir} \ | |
182 | --with-hpppddir=%{cups_ppddir} \ | |
183 | --with-mimedir=%{_datadir}/cups/mime | |
7dc4c10e | 184 | %{__make} |
82c91e61 | 185 | |
186 | %install | |
187 | rm -rf $RPM_BUILD_ROOT | |
9846f1df | 188 | |
82c91e61 | 189 | %{__make} install \ |
ef3c86b9 | 190 | DESTDIR=$RPM_BUILD_ROOT |
82c91e61 | 191 | |
a69590f2 SS |
192 | for tool in align clean colorcal fab firmware info levels makecopies makeuri print \ |
193 | probe scan sendfax setup testpage timedate toolbox unload ; do | |
3f49b438 | 194 | ln -sf %{_datadir}/%{name}/$tool.py $RPM_BUILD_ROOT%{_bindir}/hp-$tool |
ecc19b7b JK |
195 | done |
196 | ||
ef3c86b9 JB |
197 | # useless (nothing is going to link to installed libraries/modules) |
198 | %{__rm} $RPM_BUILD_ROOT{%{_libdir}/*.{so,la},%{_libdir}/sane/*.{so,la},%{py_sitedir}/*.la} | |
199 | # handled by post script | |
200 | %{__rm} $RPM_BUILD_ROOT/etc/sane.d/dll.conf | |
ecc19b7b | 201 | |
75b06fcb ER |
202 | %if %{without fax} |
203 | rm $RPM_BUILD_ROOT%{cups_filterdir}/pstotiff | |
204 | %endif | |
205 | ||
be5b6a34 JR |
206 | # use udev, hal's dead |
207 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/hal | |
208 | ||
82c91e61 | 209 | %clean |
567746ed | 210 | rm -rf $RPM_BUILD_ROOT |
82c91e61 | 211 | |
9c5b35ac JB |
212 | %post libs -p /sbin/ldconfig |
213 | %postun libs -p /sbin/ldconfig | |
52bf4fe0 | 214 | |
ecc19b7b JK |
215 | %post sane |
216 | /bin/grep -q '^hpaio' /etc/sane.d/dll.conf || echo hpaio >> /etc/sane.d/dll.conf | |
217 | ||
db551280 | 218 | %postun sane |
ecc19b7b JK |
219 | if [ "$1" = "0" ]; then |
220 | /bin/sed -e'/^hpaio/d' -i /etc/sane.d/dll.conf || : | |
221 | fi | |
52bf4fe0 | 222 | |
82c91e61 | 223 | %files |
224 | %defattr(644,root,root,755) | |
9d6cf544 | 225 | %doc doc/* |
f0cb2a76 | 226 | %attr(755,root,root) %{_bindir}/hpijs |
6336a75a | 227 | %attr(755,root,root) %{_bindir}/hp-align |
d5438369 | 228 | %attr(755,root,root) %{_bindir}/hp-check |
6336a75a | 229 | %attr(755,root,root) %{_bindir}/hp-clean |
6336a75a | 230 | %attr(755,root,root) %{_bindir}/hp-colorcal |
231 | %attr(755,root,root) %{_bindir}/hp-firmware | |
232 | %attr(755,root,root) %{_bindir}/hp-info | |
233 | %attr(755,root,root) %{_bindir}/hp-levels | |
234 | %attr(755,root,root) %{_bindir}/hp-makecopies | |
235 | %attr(755,root,root) %{_bindir}/hp-makeuri | |
567746ed | 236 | %attr(755,root,root) %{_bindir}/hp-mkuri |
032c25ec | 237 | %attr(755,root,root) %{_bindir}/hp-pkservice |
567746ed | 238 | %attr(755,root,root) %{_bindir}/hp-plugin |
6336a75a | 239 | %attr(755,root,root) %{_bindir}/hp-probe |
032c25ec | 240 | %attr(755,root,root) %{_bindir}/hp-query |
a69590f2 | 241 | %attr(755,root,root) %{_bindir}/hp-scan |
6336a75a | 242 | %attr(755,root,root) %{_bindir}/hp-sendfax |
243 | %attr(755,root,root) %{_bindir}/hp-setup | |
244 | %attr(755,root,root) %{_bindir}/hp-testpage | |
245 | %attr(755,root,root) %{_bindir}/hp-timedate | |
246 | %attr(755,root,root) %{_bindir}/hp-unload | |
32ec01ce | 247 | %dir %{_datadir}/hplip |
32ec01ce | 248 | %{_datadir}/hplip/__init__.py |
a2739875 AF |
249 | %dir %{_datadir}/hplip/copier |
250 | %{_datadir}/hplip/copier/*.py | |
840d7629 | 251 | %attr(755,root,root) %{_datadir}/hplip/align.py |
d5438369 | 252 | %attr(755,root,root) %{_datadir}/hplip/check.py |
840d7629 SS |
253 | %attr(755,root,root) %{_datadir}/hplip/clean.py |
254 | %attr(755,root,root) %{_datadir}/hplip/colorcal.py | |
255 | %attr(755,root,root) %{_datadir}/hplip/firmware.py | |
032c25ec | 256 | %attr(755,root,root) %{_datadir}/hplip/hpdio.py |
1cca41bb | 257 | %attr(755,root,root) %{_datadir}/hplip/hpssd.py |
840d7629 SS |
258 | %attr(755,root,root) %{_datadir}/hplip/info.py |
259 | %attr(755,root,root) %{_datadir}/hplip/levels.py | |
840d7629 | 260 | %attr(755,root,root) %{_datadir}/hplip/makecopies.py |
032c25ec AF |
261 | %attr(755,root,root) %{_datadir}/hplip/makeuri.py |
262 | %attr(755,root,root) %{_datadir}/hplip/pkservice.py | |
567746ed | 263 | %attr(755,root,root) %{_datadir}/hplip/plugin.py |
840d7629 | 264 | %attr(755,root,root) %{_datadir}/hplip/probe.py |
032c25ec | 265 | %attr(755,root,root) %{_datadir}/hplip/query.py |
ccb16d77 | 266 | %attr(755,root,root) %{_datadir}/hplip/scan.py |
840d7629 SS |
267 | %attr(755,root,root) %{_datadir}/hplip/sendfax.py |
268 | %attr(755,root,root) %{_datadir}/hplip/setup.py | |
269 | %attr(755,root,root) %{_datadir}/hplip/testpage.py | |
270 | %attr(755,root,root) %{_datadir}/hplip/timedate.py | |
271 | %attr(755,root,root) %{_datadir}/hplip/unload.py | |
32ec01ce | 272 | %{_datadir}/hplip/base |
d8254f98 SS |
273 | %dir %{_datadir}/hplip/data |
274 | %{_datadir}/hplip/data/ldl | |
275 | %{_datadir}/hplip/data/localization | |
276 | %{_datadir}/hplip/data/models | |
277 | %{_datadir}/hplip/data/pcl | |
278 | %{_datadir}/hplip/data/ps | |
32ec01ce | 279 | # fax subpackage ? |
75b06fcb | 280 | %if %{with fax} |
32ec01ce | 281 | %{_datadir}/hplip/fax |
75b06fcb | 282 | %endif |
591ac00e | 283 | %{_datadir}/hplip/installer |
32ec01ce | 284 | %{_datadir}/hplip/pcard |
32ec01ce AF |
285 | %{_datadir}/hplip/prnt |
286 | %{_datadir}/hplip/scan | |
82aef552 SS |
287 | %attr(755,root,root) %{py_sitedir}/cupsext.so |
288 | %attr(755,root,root) %{py_sitedir}/hpmudext.so | |
289 | %attr(755,root,root) %{py_sitedir}/pcardext.so | |
290 | %attr(755,root,root) %{py_sitedir}/scanext.so | |
8c126803 | 291 | %dir %{_sysconfdir}/hp |
ef3c86b9 JB |
292 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hp/hplip.conf |
293 | /etc/udev/rules.d/40-hplip.rules | |
294 | /etc/udev/rules.d/56-hpmud_support.rules | |
295 | /etc/dbus-1/system.d/com.hp.hplip.conf | |
296 | %{_datadir}/dbus-1/system-services/com.hp.hplip.service | |
297 | %{_datadir}/polkit-1/actions/com.hp.hplip.policy | |
52bf4fe0 | 298 | |
6336a75a | 299 | %files gui-tools |
300 | %defattr(644,root,root,755) | |
032c25ec | 301 | %attr(755,root,root) %{_bindir}/hp-devicesettings |
6336a75a | 302 | %attr(755,root,root) %{_bindir}/hp-fab |
032c25ec AF |
303 | %attr(755,root,root) %{_bindir}/hp-faxsetup |
304 | %attr(755,root,root) %{_bindir}/hp-linefeedcal | |
305 | %attr(755,root,root) %{_bindir}/hp-pqdiag | |
d8254f98 | 306 | %attr(755,root,root) %{_bindir}/hp-print |
032c25ec | 307 | %attr(755,root,root) %{_bindir}/hp-printsettings |
d5438369 | 308 | %attr(755,root,root) %{_bindir}/hp-systray |
032c25ec AF |
309 | %attr(755,root,root) %{_bindir}/hp-toolbox |
310 | %attr(755,root,root) %{_bindir}/hp-wificonfig | |
311 | %attr(755,root,root) %{_datadir}/hplip/devicesettings.py | |
312 | %attr(755,root,root) %{_datadir}/hplip/wificonfig.py | |
840d7629 | 313 | %attr(755,root,root) %{_datadir}/hplip/fab.py |
032c25ec AF |
314 | %attr(755,root,root) %{_datadir}/hplip/faxsetup.py |
315 | %attr(755,root,root) %{_datadir}/hplip/linefeedcal.py | |
316 | %attr(755,root,root) %{_datadir}/hplip/pqdiag.py | |
d8254f98 | 317 | %attr(755,root,root) %{_datadir}/hplip/print.py |
032c25ec | 318 | %attr(755,root,root) %{_datadir}/hplip/printsettings.py |
d5438369 | 319 | %attr(755,root,root) %{_datadir}/hplip/systray.py |
032c25ec AF |
320 | %attr(755,root,root) %{_datadir}/hplip/toolbox.py |
321 | #%{_datadir}/hplip/plugins | |
322 | %{_datadir}/hplip/ui4 | |
d8254f98 | 323 | %{_datadir}/hplip/data/images |
ef3c86b9 | 324 | %{_sysconfdir}/xdg/autostart/hplip-systray.desktop |
d5438369 | 325 | %{_desktopdir}/hplip.desktop |
ef3c86b9 JB |
326 | %dir /var/lib/hp |
327 | %verify(not md5 mtime size) /var/lib/hp/hplip.state | |
6336a75a | 328 | |
52bf4fe0 AM |
329 | %files libs |
330 | %defattr(644,root,root,755) | |
ef3c86b9 JB |
331 | %attr(755,root,root) %{_libdir}/libhpip.so.*.*.* |
332 | %attr(755,root,root) %ghost %{_libdir}/libhpip.so.0 | |
333 | %attr(755,root,root) %{_libdir}/libhpmud.so.*.*.* | |
334 | %attr(755,root,root) %ghost %{_libdir}/libhpmud.so.0 | |
52bf4fe0 AM |
335 | |
336 | %files sane | |
337 | %defattr(644,root,root,755) | |
ef3c86b9 JB |
338 | %doc scan/sane/hpaio.desc |
339 | %attr(755,root,root) %{_libdir}/sane/libsane-hpaio.so.*.*.* | |
340 | %attr(755,root,root) %{_libdir}/sane/libsane-hpaio.so.1 | |
52bf4fe0 | 341 | |
82c91e61 | 342 | %files ppd |
343 | %defattr(644,root,root,755) | |
75b06fcb | 344 | %if %{with fax} |
ef3c86b9 | 345 | %{cups_ppddir}/HP-Fax*.ppd.gz |
75b06fcb | 346 | %endif |
ef3c86b9 JB |
347 | %{cups_ppddir}/apollo-*.ppd.gz |
348 | %{cups_ppddir}/hp-*.ppd.gz | |
52bf4fe0 AM |
349 | |
350 | %files -n cups-backend-hp | |
351 | %defattr(644,root,root,755) | |
ef3c86b9 JB |
352 | %attr(755,root,root) %{cups_backenddir}/hp |
353 | %attr(755,root,root) %{cups_filterdir}/foomatic-rip-hplip | |
354 | %attr(755,root,root) %{cups_filterdir}/hpcups | |
355 | %attr(755,root,root) %{cups_filterdir}/hplipjs | |
356 | %attr(755,root,root) %{cups_filterdir}/hpcac | |
357 | %attr(755,root,root) %{cups_filterdir}/hpps | |
358 | %{cups_datadir}/drv/hp | |
d5438369 | 359 | |
75b06fcb | 360 | %if %{with fax} |
70d2c4fc AF |
361 | %files -n cups-backend-hpfax |
362 | %defattr(644,root,root,755) | |
ef3c86b9 JB |
363 | %attr(755,root,root) %{cups_backenddir}/hpfax |
364 | %attr(755,root,root) %{cups_filterdir}/hpcupsfax | |
365 | %attr(755,root,root) %{cups_filterdir}/pstotiff | |
366 | %{cups_mimedir}/pstotiff.types | |
367 | %{cups_mimedir}/pstotiff.convs | |
75b06fcb | 368 | %endif |