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