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