]> git.pld-linux.org Git - packages/hplip.git/blob - hplip.spec
- removed Source1 - looks like not used since very long time
[packages/hplip.git] / hplip.spec
1 # TODO:
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?)
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
16 #       - it would be good to kill "python /usr/share/hplip/hpssd.py" during upgrade/uninstall
17 #       - hpaio.desc removed in Fedora
18 #
19 # Conditional build:
20 %bcond_without  cups    # without CUPS support
21 #
22 Summary:        Hewlett-Packard Linux Imaging and Printing Project
23 Summary(pl.UTF-8):      Serwer dla drukarek HP Inkjet
24 Name:           hplip
25 Version:        2.7.10
26 Release:        0.3
27 License:        BSD, GPL v2 and MIT
28 Group:          Applications/System
29 Source0:        http://dl.sourceforge.net/hplip/%{name}-%{version}.tar.gz
30 # Source0-md5:  eafb815ca4b4bb5a2f35a76ee3c2dc72
31 URL:            http://hplip.sourceforge.net/
32 BuildRequires:  autoconf
33 BuildRequires:  automake
34 %{?with_cups:BuildRequires:     cups-devel}
35 BuildRequires:  libjpeg-devel
36 BuildRequires:  libstdc++-devel
37 BuildRequires:  libusb-devel
38 BuildRequires:  net-snmp-devel
39 BuildRequires:  openssl-devel
40 BuildRequires:  python-devel
41 BuildRequires:  python-modules
42 BuildRequires:  rpm-pythonprov
43 BuildRequires:  sane-backends-devel
44 Requires:       %{name}-libs = %{epoch}:%{version}-%{release}
45 Requires:       python-modules
46 Obsoletes:      hplip-daemon
47 Obsoletes:      hpijs
48 Obsoletes:      python-hplip
49 Conflicts:      ghostscript <= 7.00-3
50 # used in scan.py
51 Suggests:       python-ReportLab >= 2.0
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %define         _ulibdir        %{_prefix}/lib
55
56 %if %{with cups}
57 %define         _cupsdir        %(cups-config --datadir)
58 %define         _cupsppddir     %{_cupsdir}/model
59 %endif
60
61 %description
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
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
81 %package libs
82 Summary:        HPLIP Libraries
83 Summary(pl.UTF-8):      Biblioteki HPLIP
84 Group:          Libraries
85
86 %description libs
87 HPLIP Libraries.
88
89 %description libs -l pl.UTF-8
90 Biblioteki HPLIP.
91
92 %package sane
93 Summary:        HPLIP SANE Libraries
94 Summary(pl.UTF-8):      Biblioteki HPLIP SANE
95 Group:          Libraries
96 Requires(post): /bin/grep
97 Requires(postun):       /bin/sed
98 Requires:       %{name} = %{epoch}:%{version}-%{release}
99
100 %description sane
101 HPLIP SANE Libraries.
102
103 %description sane -l pl.UTF-8
104 Biblioteki HPLIP SANE.
105
106 %package ppd
107 Summary:        PPD database for Hewlett Packard printers
108 Summary(pl.UTF-8):      Baza danych PPD dla drukarek Hewlett Packard
109 Group:          Applications/System
110 Requires:       cups
111 Obsoletes:      hpijs-ppd
112
113 %description ppd
114 PPD database for Hewlett Packard printers.
115
116 %description ppd -l pl.UTF-8
117 Baza danych PPD dla drukarek Hewlett Packard.
118
119 %package -n cups-backend-hp
120 Summary:        HP backend for CUPS
121 Summary(pl.UTF-8):      Backend HP dla CUPS-a
122 Group:          Applications/Printing
123 Requires:       %{name} = %{version}-%{release}
124 Requires:       cups
125
126 %description -n cups-backend-hp
127 This package allow CUPS printing on HP printers.
128
129 %description -n cups-backend-hp -l pl.UTF-8
130 Ten pakiet umożliwia drukowanie z poziomu CUPS-a na drukarkach HP.
131
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
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
146 %prep
147 %setup -q
148 sed -i -e's,^#!/usr/bin/env python$,#!/usr/bin/python,' *.py
149
150 %build
151 install /usr/share/automake/config.* .
152 install /usr/share/automake/config.* prnt
153 CXXFLAGS="%{rpmcflags} -fno-exceptions -fno-rtti"
154 %configure \
155         --disable-foomatic-xml-install \
156         --enable-foomatic-ppd-install \
157         %{!?with_cups:--disable-cups-install}
158 %{__make} \
159         hpppddir=/usr/share/cups/model \
160         hpppddir=%{_cupsppddir}
161
162 %install
163 rm -rf $RPM_BUILD_ROOT
164
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 \
172         rpm_install=yes \
173         hpppddir=%{_cupsppddir}
174
175 %if %{with cups}
176 rm -f $RPM_BUILD_ROOT%{_cupsppddir}/foomatic-ppds
177 #mv $RPM_BUILD_ROOT{%{_datadir}/ppd/HP/*,%{_cupsppddir}}
178 %endif
179
180 for tool in align clean check colorcal fab firmware info levels makecopies makeuri print \
181                 probe sendfax setup testpage timedate toolbox unload ; do
182         ln -sf %{_datadir}/%{name}/$tool.py $RPM_BUILD_ROOT%{_bindir}/hp-$tool
183 done
184
185 rm -rf $RPM_BUILD_ROOT{%{_bindir}/foomatic-rip,%{_libdir}/*.la,%{_docdir}/hpijs*} \
186         $RPM_BUILD_ROOT{%{_datadir}/%{name}/hplip{,.sh},%{_sysconfdir}/sane.d/*} \
187         $RPM_BUILD_ROOT/etc/init.d
188 rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/{installer,install.py,hplip-install}
189 rm -f $RPM_BUILD_ROOT%{_libdir}/sane/*.la
190
191 %clean
192 rm -rf $RPM_BUILD_ROOT
193
194 %post libs -p /sbin/ldconfig
195 %postun libs -p /sbin/ldconfig
196
197 %post sane
198 /bin/grep -q '^hpaio' /etc/sane.d/dll.conf || echo hpaio >> /etc/sane.d/dll.conf
199
200 %postun sane
201 if [ "$1" = "0" ]; then
202         /bin/sed -e'/^hpaio/d' -i /etc/sane.d/dll.conf || :
203 fi
204
205 %files
206 %defattr(644,root,root,755)
207 %doc doc/*
208 %{_sysconfdir}/udev/rules.d/*
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
226 %dir %{_datadir}/hplip
227 # info about GPL v2 for some files
228 #%{_datadir}/hplip/COPYING
229 # initscript for hplip helpers
230 #%{_datadir}/hplip/hplip
231 #%{_datadir}/hplip/hplip.sh
232 %{_datadir}/hplip/__init__.py
233 %dir %{_datadir}/hplip/copier
234 %{_datadir}/hplip/copier/*.py
235 #%{_datadir}/hplip/*.png
236 #%{_datadir}/hplip/*.html
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
242 %attr(755,root,root) %{_datadir}/hplip/hpssd.py
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
249 %attr(755,root,root) %{_datadir}/hplip/scan.py
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
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
265 %attr(755,root,root) %{py_sitedir}/*.so
266 %dir %{_sysconfdir}/hp
267 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hp/*
268
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
274 %attr(755,root,root) %{_datadir}/hplip/fab.py
275 %attr(755,root,root) %{_datadir}/hplip/toolbox.py
276
277 %files libs
278 %defattr(644,root,root,755)
279 %attr(755,root,root) %{_libdir}/libhpip*.so.*
280 %attr(755,root,root) %{_libdir}/libhpmud*.so.*
281
282 %files sane
283 %defattr(644,root,root,755)
284 #%attr(755,root,root) %{_libdir}/libsane*.so.*
285 %attr(755,root,root) %{_libdir}/sane/libsane*.so.*
286 %{_datadir}/hplip/hpaio.desc
287
288 %if %{with cups}
289 %files ppd
290 %defattr(644,root,root,755)
291 %{_cupsppddir}/*
292
293 %files -n cups-backend-hp
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{_ulibdir}/cups/backend/hp
296
297 %files -n cups-backend-hpfax
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_ulibdir}/cups/backend/hpfax
300 %endif
This page took 0.061847 seconds and 3 git commands to generate.