]>
Commit | Line | Data |
---|---|---|
82c91e61 | 1 | # TODO: |
6336a75a | 2 | # - add desktop file for toolbox |
3 | # - check if all GUI tools were separated | |
4 | # - check for all files required by daemon package (or Reqs) | |
5 | # - prepare fax packages for fax utilities | |
6 | # - check if symlinks /usr/lib/sane/libsane-hpaio.so.1 -> ../libsane-hpaio.so.1.0.0 | |
7 | # are "right way" of making them available to sane. | |
8 | # - separate package for hpijs (hplip Req: hpijs, hplip-hpijs Prov: hpijs?) | |
9 | # - hp-checks looks for installer module (unpackaged files?) | |
ccb16d77 SS |
10 | # - installed but unpackaged |
11 | # /usr/lib/python2.5/site-packages/cupsext.la | |
12 | # /usr/lib/python2.5/site-packages/hpmudext.la | |
13 | # /usr/lib/python2.5/site-packages/pcardext.la | |
14 | # /usr/lib/python2.5/site-packages/scanext.la | |
15 | # /usr/share/applications/hplip.desktop | |
1cca41bb | 16 | # - it would be good to kill "python /usr/share/hplip/hpssd.py" during upgrade/uninstall |
14684ffc | 17 | # - hpaio.desc removed in Fedora |
6336a75a | 18 | # |
82c91e61 | 19 | # Conditional build: |
385e8c54 | 20 | %bcond_without cups # without CUPS support |
82c91e61 | 21 | # |
52bf4fe0 | 22 | Summary: Hewlett-Packard Linux Imaging and Printing Project |
7403e3f2 | 23 | Summary(pl.UTF-8): Serwer dla drukarek HP Inkjet |
82c91e61 | 24 | Name: hplip |
87fd7fb4 | 25 | Version: 2.7.10 |
1cca41bb | 26 | Release: 0.3 |
95b8dde5 | 27 | License: BSD, GPL v2 and MIT |
82c91e61 | 28 | Group: Applications/System |
32ec01ce | 29 | Source0: http://dl.sourceforge.net/hplip/%{name}-%{version}.tar.gz |
87fd7fb4 | 30 | # Source0-md5: eafb815ca4b4bb5a2f35a76ee3c2dc72 |
32ec01ce | 31 | URL: http://hplip.sourceforge.net/ |
82c91e61 | 32 | BuildRequires: autoconf |
9846f1df | 33 | BuildRequires: automake |
82c91e61 | 34 | %{?with_cups:BuildRequires: cups-devel} |
cedbfcec | 35 | BuildRequires: libjpeg-devel |
82c91e61 | 36 | BuildRequires: libstdc++-devel |
e5c70de6 | 37 | BuildRequires: libusb-devel |
52bf4fe0 AM |
38 | BuildRequires: net-snmp-devel |
39 | BuildRequires: openssl-devel | |
40 | BuildRequires: python-devel | |
2a260930 | 41 | BuildRequires: python-modules |
6336a75a | 42 | BuildRequires: rpm-pythonprov |
db551280 | 43 | BuildRequires: sane-backends-devel |
6336a75a | 44 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
45 | Requires: python-modules | |
1cca41bb | 46 | Obsoletes: hplip-daemon |
32ec01ce | 47 | Obsoletes: hpijs |
ecc19b7b | 48 | Obsoletes: python-hplip |
9846f1df | 49 | Conflicts: ghostscript <= 7.00-3 |
7a9b84c0 SS |
50 | # used in scan.py |
51 | Suggests: python-ReportLab >= 2.0 | |
82c91e61 | 52 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
53 | ||
52bf4fe0 AM |
54 | %define _ulibdir %{_prefix}/lib |
55 | ||
82c91e61 | 56 | %if %{with cups} |
57 | %define _cupsdir %(cups-config --datadir) | |
58 | %define _cupsppddir %{_cupsdir}/model | |
59 | %endif | |
60 | ||
61 | %description | |
52bf4fe0 AM |
62 | The Hewlett-Packard Linux Imaging and Printing project (HPLIP) |
63 | provides a unified single and multi-function connectivity solution for | |
64 | Linux. The goal of this project is to provide "radically simple" | |
65 | printing, faxing, scanning, photo-card access, and device management | |
66 | to the consumer and small business desktop Linux users. | |
67 | ||
6336a75a | 68 | %package gui-tools |
69 | Summary: HPLIP GUI tools | |
70 | Summary(pl.UTF-8): Narzędzia graficzne HPLIP | |
71 | Group: Applications/System | |
72 | Requires: python-PyQt | |
73 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
74 | ||
75 | %description gui-tools | |
76 | HPLIP GUI tools. | |
77 | ||
78 | %description gui-tools -l pl.UTF-8 | |
79 | Narzędzia graficzne HPLIP. | |
80 | ||
52bf4fe0 AM |
81 | %package libs |
82 | Summary: HPLIP Libraries | |
7403e3f2 | 83 | Summary(pl.UTF-8): Biblioteki HPLIP |
52bf4fe0 AM |
84 | Group: Libraries |
85 | ||
86 | %description libs | |
87 | HPLIP Libraries. | |
88 | ||
0a7e9b17 | 89 | %description libs -l pl.UTF-8 |
52bf4fe0 AM |
90 | Biblioteki HPLIP. |
91 | ||
92 | %package sane | |
93 | Summary: HPLIP SANE Libraries | |
7403e3f2 | 94 | Summary(pl.UTF-8): Biblioteki HPLIP SANE |
52bf4fe0 | 95 | Group: Libraries |
ecc19b7b | 96 | Requires(post): /bin/grep |
db551280 | 97 | Requires(postun): /bin/sed |
6336a75a | 98 | Requires: %{name} = %{epoch}:%{version}-%{release} |
52bf4fe0 AM |
99 | |
100 | %description sane | |
101 | HPLIP SANE Libraries. | |
82c91e61 | 102 | |
0a7e9b17 | 103 | %description sane -l pl.UTF-8 |
52bf4fe0 | 104 | Biblioteki HPLIP SANE. |
82c91e61 | 105 | |
106 | %package ppd | |
107 | Summary: PPD database for Hewlett Packard printers | |
7403e3f2 | 108 | Summary(pl.UTF-8): Baza danych PPD dla drukarek Hewlett Packard |
82c91e61 | 109 | Group: Applications/System |
110 | Requires: cups | |
70d2c4fc | 111 | Obsoletes: hpijs-ppd |
82c91e61 | 112 | |
113 | %description ppd | |
114 | PPD database for Hewlett Packard printers. | |
115 | ||
0a7e9b17 | 116 | %description ppd -l pl.UTF-8 |
82c91e61 | 117 | Baza danych PPD dla drukarek Hewlett Packard. |
118 | ||
52bf4fe0 AM |
119 | %package -n cups-backend-hp |
120 | Summary: HP backend for CUPS | |
7403e3f2 | 121 | Summary(pl.UTF-8): Backend HP dla CUPS-a |
52bf4fe0 | 122 | Group: Applications/Printing |
ecc19b7b | 123 | Requires: %{name} = %{version}-%{release} |
db551280 | 124 | Requires: cups |
52bf4fe0 AM |
125 | |
126 | %description -n cups-backend-hp | |
127 | This package allow CUPS printing on HP printers. | |
128 | ||
0a7e9b17 JR |
129 | %description -n cups-backend-hp -l pl.UTF-8 |
130 | Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach HP. | |
52bf4fe0 | 131 | |
70d2c4fc AF |
132 | %package -n cups-backend-hpfax |
133 | Summary: HP fax backend for CUPS | |
134 | Summary(pl): Backend HP fax dla CUPS-a | |
135 | Group: Applications/Printing | |
136 | Requires: %{name} = %{version}-%{release} | |
137 | Requires: cups | |
138 | ||
139 | %description -n cups-backend-hpfax | |
140 | This package allow CUPS faxing using HP AiO devices. | |
141 | ||
08ab5eb1 JB |
142 | %description -n cups-backend-hpfax -l pl.UTF-8 |
143 | Ten pakiet umożliwia wysyłanie faksów z poziomu CUPS-a poprzez | |
144 | urządzenia HP AiO. | |
145 | ||
82c91e61 | 146 | %prep |
147 | %setup -q | |
ecc19b7b | 148 | sed -i -e's,^#!/usr/bin/env python$,#!/usr/bin/python,' *.py |
82c91e61 | 149 | |
150 | %build | |
52bf4fe0 AM |
151 | install /usr/share/automake/config.* . |
152 | install /usr/share/automake/config.* prnt | |
82c91e61 | 153 | CXXFLAGS="%{rpmcflags} -fno-exceptions -fno-rtti" |
154 | %configure \ | |
81eaa7d4 | 155 | --disable-foomatic-xml-install \ |
4cd1b031 | 156 | --enable-foomatic-ppd-install \ |
82c91e61 | 157 | %{!?with_cups:--disable-cups-install} |
ecc19b7b JK |
158 | %{__make} \ |
159 | hpppddir=/usr/share/cups/model \ | |
160 | hpppddir=%{_cupsppddir} | |
82c91e61 | 161 | |
162 | %install | |
163 | rm -rf $RPM_BUILD_ROOT | |
9846f1df | 164 | |
82c91e61 | 165 | %if %{with cups} |
166 | install -d $RPM_BUILD_ROOT$(cups-config --datadir)/model \ | |
167 | $RPM_BUILD_ROOT$(cups-config --serverbin)/filter | |
168 | %endif | |
169 | ||
170 | %{__make} install \ | |
171 | DESTDIR=$RPM_BUILD_ROOT \ | |
ecc19b7b JK |
172 | rpm_install=yes \ |
173 | hpppddir=%{_cupsppddir} | |
82c91e61 | 174 | |
175 | %if %{with cups} | |
176 | rm -f $RPM_BUILD_ROOT%{_cupsppddir}/foomatic-ppds | |
840d7629 | 177 | #mv $RPM_BUILD_ROOT{%{_datadir}/ppd/HP/*,%{_cupsppddir}} |
82c91e61 | 178 | %endif |
179 | ||
6336a75a | 180 | for tool in align clean check colorcal fab firmware info levels makecopies makeuri print \ |
181 | probe sendfax setup testpage timedate toolbox unload ; do | |
3f49b438 | 182 | ln -sf %{_datadir}/%{name}/$tool.py $RPM_BUILD_ROOT%{_bindir}/hp-$tool |
ecc19b7b JK |
183 | done |
184 | ||
db551280 | 185 | rm -rf $RPM_BUILD_ROOT{%{_bindir}/foomatic-rip,%{_libdir}/*.la,%{_docdir}/hpijs*} \ |
6336a75a | 186 | $RPM_BUILD_ROOT{%{_datadir}/%{name}/hplip{,.sh},%{_sysconfdir}/sane.d/*} \ |
187 | $RPM_BUILD_ROOT/etc/init.d | |
14684ffc | 188 | rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/{installer,install.py,hplip-install} |
ccb16d77 | 189 | rm -f $RPM_BUILD_ROOT%{_libdir}/sane/*.la |
ecc19b7b | 190 | |
82c91e61 | 191 | %clean |
192 | rm -rf $RPM_BUILD_ROOT | |
193 | ||
52bf4fe0 AM |
194 | %post libs -p /sbin/ldconfig |
195 | %postun libs -p /sbin/ldconfig | |
196 | ||
ecc19b7b JK |
197 | %post sane |
198 | /bin/grep -q '^hpaio' /etc/sane.d/dll.conf || echo hpaio >> /etc/sane.d/dll.conf | |
199 | ||
db551280 | 200 | %postun sane |
ecc19b7b JK |
201 | if [ "$1" = "0" ]; then |
202 | /bin/sed -e'/^hpaio/d' -i /etc/sane.d/dll.conf || : | |
203 | fi | |
52bf4fe0 | 204 | |
82c91e61 | 205 | %files |
206 | %defattr(644,root,root,755) | |
9d6cf544 | 207 | %doc doc/* |
ccb16d77 | 208 | %{_sysconfdir}/udev/rules.d/* |
6336a75a | 209 | %attr(755,root,root) %{_bindir}/hpijs |
210 | %attr(755,root,root) %{_bindir}/hp-align | |
211 | %attr(755,root,root) %{_bindir}/hp-clean | |
212 | %attr(755,root,root) %{_bindir}/hp-check | |
213 | %attr(755,root,root) %{_bindir}/hp-colorcal | |
214 | %attr(755,root,root) %{_bindir}/hp-firmware | |
215 | %attr(755,root,root) %{_bindir}/hp-info | |
216 | %attr(755,root,root) %{_bindir}/hp-levels | |
217 | %attr(755,root,root) %{_bindir}/hp-makecopies | |
218 | %attr(755,root,root) %{_bindir}/hp-makeuri | |
219 | %attr(755,root,root) %{_bindir}/hp-print | |
220 | %attr(755,root,root) %{_bindir}/hp-probe | |
221 | %attr(755,root,root) %{_bindir}/hp-sendfax | |
222 | %attr(755,root,root) %{_bindir}/hp-setup | |
223 | %attr(755,root,root) %{_bindir}/hp-testpage | |
224 | %attr(755,root,root) %{_bindir}/hp-timedate | |
225 | %attr(755,root,root) %{_bindir}/hp-unload | |
32ec01ce AF |
226 | %dir %{_datadir}/hplip |
227 | # info about GPL v2 for some files | |
840d7629 | 228 | #%{_datadir}/hplip/COPYING |
32ec01ce AF |
229 | # initscript for hplip helpers |
230 | #%{_datadir}/hplip/hplip | |
231 | #%{_datadir}/hplip/hplip.sh | |
232 | %{_datadir}/hplip/__init__.py | |
a2739875 AF |
233 | %dir %{_datadir}/hplip/copier |
234 | %{_datadir}/hplip/copier/*.py | |
f53e7111 AF |
235 | #%{_datadir}/hplip/*.png |
236 | #%{_datadir}/hplip/*.html | |
840d7629 SS |
237 | %attr(755,root,root) %{_datadir}/hplip/align.py |
238 | %attr(755,root,root) %{_datadir}/hplip/check.py | |
239 | %attr(755,root,root) %{_datadir}/hplip/clean.py | |
240 | %attr(755,root,root) %{_datadir}/hplip/colorcal.py | |
241 | %attr(755,root,root) %{_datadir}/hplip/firmware.py | |
1cca41bb | 242 | %attr(755,root,root) %{_datadir}/hplip/hpssd.py |
840d7629 SS |
243 | %attr(755,root,root) %{_datadir}/hplip/info.py |
244 | %attr(755,root,root) %{_datadir}/hplip/levels.py | |
245 | %attr(755,root,root) %{_datadir}/hplip/makeuri.py | |
246 | %attr(755,root,root) %{_datadir}/hplip/makecopies.py | |
247 | %attr(755,root,root) %{_datadir}/hplip/print.py | |
248 | %attr(755,root,root) %{_datadir}/hplip/probe.py | |
ccb16d77 | 249 | %attr(755,root,root) %{_datadir}/hplip/scan.py |
840d7629 SS |
250 | %attr(755,root,root) %{_datadir}/hplip/sendfax.py |
251 | %attr(755,root,root) %{_datadir}/hplip/setup.py | |
252 | %attr(755,root,root) %{_datadir}/hplip/testpage.py | |
253 | %attr(755,root,root) %{_datadir}/hplip/timedate.py | |
254 | %attr(755,root,root) %{_datadir}/hplip/unload.py | |
32ec01ce AF |
255 | %{_datadir}/hplip/base |
256 | # need look | |
257 | %{_datadir}/hplip/data | |
258 | # fax subpackage ? | |
259 | %{_datadir}/hplip/fax | |
260 | %{_datadir}/hplip/pcard | |
261 | %{_datadir}/hplip/plugins | |
262 | %{_datadir}/hplip/prnt | |
263 | %{_datadir}/hplip/scan | |
264 | %{_datadir}/hplip/ui | |
ecc19b7b | 265 | %attr(755,root,root) %{py_sitedir}/*.so |
8c126803 | 266 | %dir %{_sysconfdir}/hp |
ecc19b7b | 267 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hp/* |
52bf4fe0 | 268 | |
6336a75a | 269 | |
270 | %files gui-tools | |
271 | %defattr(644,root,root,755) | |
272 | %attr(755,root,root) %{_bindir}/hp-fab | |
273 | %attr(755,root,root) %{_bindir}/hp-toolbox | |
840d7629 SS |
274 | %attr(755,root,root) %{_datadir}/hplip/fab.py |
275 | %attr(755,root,root) %{_datadir}/hplip/toolbox.py | |
6336a75a | 276 | |
52bf4fe0 AM |
277 | %files libs |
278 | %defattr(644,root,root,755) | |
279 | %attr(755,root,root) %{_libdir}/libhpip*.so.* | |
ccb16d77 | 280 | %attr(755,root,root) %{_libdir}/libhpmud*.so.* |
52bf4fe0 AM |
281 | |
282 | %files sane | |
283 | %defattr(644,root,root,755) | |
840d7629 | 284 | #%attr(755,root,root) %{_libdir}/libsane*.so.* |
ccb16d77 | 285 | %attr(755,root,root) %{_libdir}/sane/libsane*.so.* |
a2739875 | 286 | %{_datadir}/hplip/hpaio.desc |
52bf4fe0 | 287 | |
82c91e61 | 288 | %if %{with cups} |
289 | %files ppd | |
290 | %defattr(644,root,root,755) | |
291 | %{_cupsppddir}/* | |
52bf4fe0 AM |
292 | |
293 | %files -n cups-backend-hp | |
294 | %defattr(644,root,root,755) | |
295 | %attr(755,root,root) %{_ulibdir}/cups/backend/hp | |
70d2c4fc AF |
296 | |
297 | %files -n cups-backend-hpfax | |
298 | %defattr(644,root,root,755) | |
299 | %attr(755,root,root) %{_ulibdir}/cups/backend/hpfax | |
82c91e61 | 300 | %endif |