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