]>
Commit | Line | Data |
---|---|---|
82c91e61 | 1 | # TODO: |
32ec01ce | 2 | # - add desktop file for toolbox |
ecc19b7b JK |
3 | # - GUI tools require python-qt, they should be separated to a subpackage |
4 | # (the rest of package works without Qt) | |
82c91e61 | 5 | # |
6 | # Conditional build: | |
385e8c54 | 7 | %bcond_without cups # without CUPS support |
82c91e61 | 8 | # |
52bf4fe0 | 9 | Summary: Hewlett-Packard Linux Imaging and Printing Project |
0a7e9b17 | 10 | Summary(pl.UTF-8): Serwer dla drukarek HP Inkjet |
82c91e61 | 11 | Name: hplip |
cedbfcec | 12 | Version: 1.6.9 |
8c126803 | 13 | Release: 2 |
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 |
cedbfcec | 17 | # Source0-md5: 38d57f58b48b5b0729d1de507776e7d1 |
9846f1df | 18 | Source1: %{name}.init |
cedbfcec | 19 | Source2: %{name}-DJ670C.xml |
32ec01ce | 20 | URL: http://hplip.sourceforge.net/ |
82c91e61 | 21 | BuildRequires: autoconf |
9846f1df | 22 | BuildRequires: automake |
82c91e61 | 23 | %{?with_cups:BuildRequires: cups-devel} |
cedbfcec | 24 | BuildRequires: libjpeg-devel |
82c91e61 | 25 | BuildRequires: libstdc++-devel |
e5c70de6 | 26 | BuildRequires: libusb-devel |
52bf4fe0 AM |
27 | BuildRequires: net-snmp-devel |
28 | BuildRequires: openssl-devel | |
29 | BuildRequires: python-devel | |
2a260930 | 30 | BuildRequires: python-modules |
db551280 | 31 | BuildRequires: sane-backends-devel |
ecc19b7b | 32 | Requires: %{name}-libs = %{version}-%{release} |
32ec01ce | 33 | Obsoletes: hpijs |
ecc19b7b | 34 | Obsoletes: python-hplip |
9846f1df | 35 | Conflicts: ghostscript <= 7.00-3 |
82c91e61 | 36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
52bf4fe0 AM |
38 | %define _ulibdir %{_prefix}/lib |
39 | ||
82c91e61 | 40 | %if %{with cups} |
41 | %define _cupsdir %(cups-config --datadir) | |
42 | %define _cupsppddir %{_cupsdir}/model | |
43 | %endif | |
44 | ||
45 | %description | |
52bf4fe0 AM |
46 | The Hewlett-Packard Linux Imaging and Printing project (HPLIP) |
47 | provides a unified single and multi-function connectivity solution for | |
48 | Linux. The goal of this project is to provide "radically simple" | |
49 | printing, faxing, scanning, photo-card access, and device management | |
50 | to the consumer and small business desktop Linux users. | |
51 | ||
52 | %package libs | |
53 | Summary: HPLIP Libraries | |
0a7e9b17 | 54 | Summary(pl.UTF-8): Biblioteki HPLIP |
52bf4fe0 AM |
55 | Group: Libraries |
56 | ||
57 | %description libs | |
58 | HPLIP Libraries. | |
59 | ||
0a7e9b17 | 60 | %description libs -l pl.UTF-8 |
52bf4fe0 AM |
61 | Biblioteki HPLIP. |
62 | ||
63 | %package sane | |
64 | Summary: HPLIP SANE Libraries | |
0a7e9b17 | 65 | Summary(pl.UTF-8): Biblioteki HPLIP SANE |
52bf4fe0 | 66 | Group: Libraries |
ecc19b7b | 67 | Requires(post): /bin/grep |
db551280 ER |
68 | Requires(postun): /bin/sed |
69 | Requires: %{name} = %{version}-%{release} | |
52bf4fe0 AM |
70 | |
71 | %description sane | |
72 | HPLIP SANE Libraries. | |
82c91e61 | 73 | |
0a7e9b17 | 74 | %description sane -l pl.UTF-8 |
52bf4fe0 | 75 | Biblioteki HPLIP SANE. |
82c91e61 | 76 | |
77 | %package ppd | |
78 | Summary: PPD database for Hewlett Packard printers | |
0a7e9b17 | 79 | Summary(pl.UTF-8): Baza danych PPD dla drukarek Hewlett Packard |
82c91e61 | 80 | Group: Applications/System |
81 | Requires: cups | |
82 | ||
83 | %description ppd | |
84 | PPD database for Hewlett Packard printers. | |
85 | ||
0a7e9b17 | 86 | %description ppd -l pl.UTF-8 |
82c91e61 | 87 | Baza danych PPD dla drukarek Hewlett Packard. |
88 | ||
52bf4fe0 AM |
89 | %package -n cups-backend-hp |
90 | Summary: HP backend for CUPS | |
0a7e9b17 | 91 | Summary(pl.UTF-8): Backend HP dla CUPS-a |
52bf4fe0 | 92 | Group: Applications/Printing |
ecc19b7b | 93 | Requires: %{name} = %{version}-%{release} |
db551280 | 94 | Requires: cups |
52bf4fe0 AM |
95 | |
96 | %description -n cups-backend-hp | |
97 | This package allow CUPS printing on HP printers. | |
98 | ||
0a7e9b17 JR |
99 | %description -n cups-backend-hp -l pl.UTF-8 |
100 | Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach HP. | |
52bf4fe0 | 101 | |
82c91e61 | 102 | %prep |
103 | %setup -q | |
ecc19b7b | 104 | sed -i -e's,^#!/usr/bin/env python$,#!/usr/bin/python,' *.py |
82c91e61 | 105 | |
106 | %build | |
cedbfcec | 107 | install %{SOURCE2} data/xml |
52bf4fe0 AM |
108 | install /usr/share/automake/config.* . |
109 | install /usr/share/automake/config.* prnt | |
82c91e61 | 110 | CXXFLAGS="%{rpmcflags} -fno-exceptions -fno-rtti" |
111 | %configure \ | |
112 | --enable-foomatic-install \ | |
113 | %{!?with_cups:--disable-cups-install} | |
ecc19b7b JK |
114 | %{__make} \ |
115 | hpppddir=/usr/share/cups/model \ | |
116 | hpppddir=%{_cupsppddir} | |
82c91e61 | 117 | |
118 | %install | |
119 | rm -rf $RPM_BUILD_ROOT | |
ecc19b7b | 120 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/hp} |
9846f1df | 121 | |
82c91e61 | 122 | %if %{with cups} |
123 | install -d $RPM_BUILD_ROOT$(cups-config --datadir)/model \ | |
124 | $RPM_BUILD_ROOT$(cups-config --serverbin)/filter | |
125 | %endif | |
126 | ||
127 | %{__make} install \ | |
128 | DESTDIR=$RPM_BUILD_ROOT \ | |
ecc19b7b JK |
129 | rpm_install=yes \ |
130 | hpppddir=%{_cupsppddir} | |
82c91e61 | 131 | |
132 | %if %{with cups} | |
133 | rm -f $RPM_BUILD_ROOT%{_cupsppddir}/foomatic-ppds | |
134 | mv $RPM_BUILD_ROOT{%{_datadir}/ppd/HP/*,%{_cupsppddir}} | |
135 | %endif | |
136 | ||
db551280 ER |
137 | ln -sf %{_datadir}/%{name}/hpssd.py $RPM_BUILD_ROOT%{_sbindir}/hpssd |
138 | ln -sf %{_datadir}/%{name}/setup $RPM_BUILD_ROOT%{_sbindir}/hp-setup | |
ecc19b7b JK |
139 | |
140 | for tool in align clean colorcal fab info levels makeuri photo print \ | |
141 | sendfax testpage toolbox unload ; do | |
db551280 | 142 | ln -sf %{_datadir}/%{name}/$tool $RPM_BUILD_ROOT%{_bindir}/hp-$tool |
ecc19b7b JK |
143 | done |
144 | ||
9846f1df AF |
145 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/hplip |
146 | ||
ecc19b7b | 147 | mv $RPM_BUILD_ROOT{%{_datadir}/%{name}/%{name}.conf,%{_sysconfdir}/hp} |
db551280 ER |
148 | rm -rf $RPM_BUILD_ROOT{%{_bindir}/foomatic-rip,%{_libdir}/*.la,%{_docdir}/hpijs*} \ |
149 | $RPM_BUILD_ROOT{%{_datadir}/%{name}/hplip{,.sh},%{_sysconfdir}/sane.d/*} | |
ecc19b7b | 150 | |
82c91e61 | 151 | %clean |
152 | rm -rf $RPM_BUILD_ROOT | |
153 | ||
52bf4fe0 AM |
154 | %post libs -p /sbin/ldconfig |
155 | %postun libs -p /sbin/ldconfig | |
156 | ||
ecc19b7b JK |
157 | %post sane |
158 | /bin/grep -q '^hpaio' /etc/sane.d/dll.conf || echo hpaio >> /etc/sane.d/dll.conf | |
159 | ||
db551280 | 160 | %postun sane |
ecc19b7b JK |
161 | if [ "$1" = "0" ]; then |
162 | /bin/sed -e'/^hpaio/d' -i /etc/sane.d/dll.conf || : | |
163 | fi | |
52bf4fe0 | 164 | |
82c91e61 | 165 | %files |
166 | %defattr(644,root,root,755) | |
9d6cf544 | 167 | %doc doc/* |
c2ed819e | 168 | %attr(755,root,root) %{_bindir}/hp* |
52bf4fe0 | 169 | %attr(755,root,root) %{_sbindir}/hp* |
9846f1df | 170 | %attr(754,root,root) /etc/rc.d/init.d/hplip |
32ec01ce AF |
171 | %dir %{_datadir}/hplip |
172 | # info about GPL v2 for some files | |
173 | %{_datadir}/hplip/COPYING | |
174 | # initscript for hplip helpers | |
175 | #%{_datadir}/hplip/hplip | |
176 | #%{_datadir}/hplip/hplip.sh | |
177 | %{_datadir}/hplip/__init__.py | |
a2739875 AF |
178 | %dir %{_datadir}/hplip/copier |
179 | %{_datadir}/hplip/copier/*.py | |
f53e7111 AF |
180 | #%{_datadir}/hplip/*.png |
181 | #%{_datadir}/hplip/*.html | |
32ec01ce AF |
182 | %attr(755,root,root) %{_datadir}/hplip/align |
183 | %attr(755,root,root) %{_datadir}/hplip/check | |
184 | %attr(755,root,root) %{_datadir}/hplip/clean | |
185 | %attr(755,root,root) %{_datadir}/hplip/colorcal | |
186 | %attr(755,root,root) %{_datadir}/hplip/fab | |
187 | %attr(755,root,root) %{_datadir}/hplip/hpssd.py | |
188 | %attr(755,root,root) %{_datadir}/hplip/info | |
189 | %attr(755,root,root) %{_datadir}/hplip/levels | |
190 | %attr(755,root,root) %{_datadir}/hplip/makeuri | |
a2739875 | 191 | %attr(755,root,root) %{_datadir}/hplip/makecopies |
32ec01ce AF |
192 | %attr(755,root,root) %{_datadir}/hplip/print |
193 | %attr(755,root,root) %{_datadir}/hplip/sendfax | |
194 | %attr(755,root,root) %{_datadir}/hplip/setup | |
195 | %attr(755,root,root) %{_datadir}/hplip/testpage | |
196 | %attr(755,root,root) %{_datadir}/hplip/toolbox | |
197 | %attr(755,root,root) %{_datadir}/hplip/unload | |
198 | %{_datadir}/hplip/base | |
199 | # need look | |
200 | %{_datadir}/hplip/data | |
201 | # fax subpackage ? | |
202 | %{_datadir}/hplip/fax | |
203 | %{_datadir}/hplip/pcard | |
204 | %{_datadir}/hplip/plugins | |
205 | %{_datadir}/hplip/prnt | |
206 | %{_datadir}/hplip/scan | |
207 | %{_datadir}/hplip/ui | |
ecc19b7b | 208 | %attr(755,root,root) %{py_sitedir}/*.so |
8c126803 | 209 | %dir %{_sysconfdir}/hp |
ecc19b7b | 210 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hp/* |
52bf4fe0 AM |
211 | |
212 | %files libs | |
213 | %defattr(644,root,root,755) | |
214 | %attr(755,root,root) %{_libdir}/libhpip*.so.* | |
215 | ||
216 | %files sane | |
217 | %defattr(644,root,root,755) | |
218 | %attr(755,root,root) %{_libdir}/libsane*.so.* | |
a2739875 | 219 | %{_datadir}/hplip/hpaio.desc |
52bf4fe0 | 220 | |
82c91e61 | 221 | %if %{with cups} |
222 | %files ppd | |
223 | %defattr(644,root,root,755) | |
224 | %{_cupsppddir}/* | |
52bf4fe0 AM |
225 | |
226 | %files -n cups-backend-hp | |
227 | %defattr(644,root,root,755) | |
228 | %attr(755,root,root) %{_ulibdir}/cups/backend/hp | |
82c91e61 | 229 | %endif |