/[packages]/updates/1/hplip/current/SPECS/hplip.spec
ViewVC logotype

Annotation of /updates/1/hplip/current/SPECS/hplip.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 399969 - (hide annotations) (download)
Fri Feb 22 17:21:27 2013 UTC (8 years, 6 months ago) by luigiwalser
File size: 26906 byte(s)
rediff patch from redhat to fix CVE-2013-0200
1 spuhler 49621 # Define if you want to build the sane backend (default)
2     %define sane_backend 1
3     %{?_with_sane: %global sane_backend 1}
4     %{?_without_sane: %global sane_backend 0}
5    
6     %define hpip_major 0
7     %define hpip_libname %mklibname hpip %{hpip_major}
8    
9     %define sane_hpaio_major 1
10     %define sane_hpaio_libname %mklibname sane-hpaio %{sane_hpaio_major}
11    
12     # Suppress automatically generated Requires for devel packages
13     %define _requires_exceptions devel\(.*\)
14    
15     #define extraversion -RC1
16     %define extraversion %nil
17    
18 luigiwalser 399969 %define subrel 3
19 doktor5000 142616
20 spuhler 49621 Summary: HP printer/all-in-one driver infrastructure
21     Name: hplip
22 doktor5000 137692 Version: 3.11.7
23     Release: %mkrel 1
24 spuhler 49621 License: GPLv2+ and MIT
25     Group: System/Printing
26 cjw 85144 Source: http://heanet.dl.sourceforge.net/sourceforge/hplip/%{name}-%{version}%{extraversion}.tar.gz
27     Source1: hpcups-update-ppds.sh
28 doktor5000 137692 Source2: copy-deviceids.py
29 spuhler 49621
30 doktor5000 137692
31     # (doktor5000) fix linking with python and libsane
32     # taken from mandriva
33     Patch1: hplip-3.11.3-mdv-link.patch
34    
35 spuhler 49621 # Fedora patches
36     Patch101: hplip-pstotiff-is-rubbish.patch
37     Patch102: hplip-strstr-const.patch
38     Patch103: hplip-ui-optional.patch
39     Patch104: hplip-no-asm.patch
40     Patch105: hplip-deviceIDs-drv.patch
41     Patch106: hplip-mucks-with-spooldir.patch
42     Patch107: hplip-udev-rules.patch
43     Patch108: hplip-retry-open.patch
44 doktor5000 137692 Patch109: hplip-snmp-quirks.patch
45 spuhler 49621 Patch110: hplip-discovery-method.patch
46 doktor5000 137692 Patch111: hplip-hpijs-marker-supply.patch
47 spuhler 49621 Patch112: hplip-clear-old-state-reasons.patch
48 doktor5000 147998 Patch113: hplip-hpcups-crash.patch
49 spuhler 49621 Patch114: hplip-hpcups-sigpipe.patch
50 doktor5000 137692 Patch115: hplip-fax-ppd.patch
51 spuhler 49621 Patch116: hplip-bad-low-ink-warning.patch
52     Patch117: hplip-deviceIDs-ppd.patch
53     Patch118: hplip-skip-blank-lines.patch
54     Patch119: hplip-dbglog-newline.patch
55     Patch120: hplip-no-system-tray.patch
56 doktor5000 137692 Patch122: hplip-ppd-ImageableArea.patch
57 doktor5000 147998 Patch123: hplip-sane-crash.patch
58 doktor5000 137692 Patch125: hplip-raw_deviceID-traceback.patch
59     Patch126: hplip-UnicodeDecodeError.patch
60     Patch127: hplip-emit-SIGNAL.patch
61     Patch128: hplip-fab-root-crash.patch
62     Patch129: hplip-addprinter.patch
63     Patch130: hplip-dbus-exception.patch
64     Patch131: hplip-hpaio-segfault.patch
65     Patch132: hplip-newline.patch
66     Patch133: hplip-dbus-threads.patch
67     Patch134: hplip-notification-exception.patch
68 spuhler 49621 Patch135: hplip-CVE-2010-4267.patch
69 doktor5000 137692 Patch136: hplip-wifisetup.patch
70     Patch137: hplip-CVE-2011-2722.patch
71 luigiwalser 399969 Patch138: hplip-CVE-2013-0200.patch
72 spuhler 49621
73     # Debian/Ubuntu patches
74 doktor5000 147998 # taken from http://patch-tracker.debian.org/package/hplip/3.11.7-1
75 doktor5000 137692 Patch201: 01_rss.dpatch
76     Patch202: 10_shebang_fixes.dpatch
77     Patch203: 14_charsign_fixes.dpatch
78     Patch204: 85_rebuild_python_ui.dpatch
79     Patch205: 87_move_documentation.dpatch
80     Patch206: hplip-photosmart_b9100_support.patch
81     Patch207: hplip-pjl-duplex-binding.patch
82     Patch208: mga-kde4-kdesudo-support.dpatch
83     Patch209: hp-check-groups.dpatch
84     Patch210: hp-check_debian.dpatch
85     Patch211: hp-setup-prompt-for-custom-PPD.dpatch
86     # (doktor5000) rediff original debian patch for hplip 3.11.7
87     Patch212: mga-udev-rules-use-attrs-not-sysfs-and-hp-mkuri-call-fix.patch
88     Patch213: hp-mkuri-take-into-account-already-installed-plugin-also-for-exit-value.dpatch
89     Patch214: ubuntu-hp-mkuri-notification-text.dpatch
90     Patch215: simple-scan-as-default.dpatch
91     Patch216: make-commafy-correctly-work-with-python-2.dpatch
92     # (doktor5000) rediff original debian patch for hplip 3.11.7
93     Patch217: mga-remove-duplicate-entry-for-cp1700-in-drv-files.patch
94     #already applied
95     Patch218: black-stripes-on-pcl5c-printouts.dpatch
96     Patch219: try_libhpmud.so.0.dpatch
97     Patch220: add-lidil-two-cartridge-modes.dpatch
98     Patch221: add_missing_newline_for_error_log.dpatch
99     Patch222: large-sizes-borderless-on-photosmart-pro-b-series.dpatch
100     Patch223: more-user-friendly-choice-names-for-installed-cartridges.dpatch
101 spuhler 49621
102     Url: http://hplip.sourceforge.net/
103     %if %{sane_backend}
104     BuildRequires: libsane-devel, xsane
105     %endif
106     %py_requires -d
107     BuildRequires: python-sip >= 4.1.1
108     BuildRequires: net-snmp-devel
109     BuildRequires: libusb-devel >= 0.1.8
110     BuildRequires: imagemagick
111     BuildRequires: autoconf
112     BuildRequires: libcups-devel
113     BuildRequires: libjpeg-devel
114     BuildRequires: python-devel
115     BuildRequires: desktop-file-utils
116     BuildRequires: libdbus-devel
117     BuildRequires: udev-devel
118     BuildRequires: polkit
119     BuildRequires: gphoto2-devel
120     BuildRequires: libv4l-devel
121     Requires: cups
122     # For dynamic ppd generation.
123     Requires: cupsddk-drivers >= 1.2.3-2mdv
124     Requires: foomatic-filters
125     Requires: hplip-model-data hplip-hpijs
126     Requires: hplip-hpijs-ppds
127     Requires: python-sip >= 4.1.1
128     # Needed for communicating with ethernet-connected printers
129     Requires: net-snmp-mibs
130     # Needed to generate fax cover pages
131     Requires: python-reportlab
132     # Needed since 2.8.4 for IPC
133     Requires: python-dbus
134     Requires: polkit-agent
135     Requires: usermode-consoleonly
136     Requires: python-gobject
137     # Required by hp-scan for command line scanning
138 cjw 95747 Requires: python-imaging
139     Requires: sane-backends-hpaio
140 doktor5000 137692 # Needed to avoid misleading errors about network connectivity (RH bug #705843)
141     Requires: wget
142 cjw 95747 # Some HP ppds are in foomatic-db and foomatic-db-hpijs (mdv bug #47415)
143 spuhler 49621 Suggests: foomatic-db-hpijs
144    
145     # foomatic-db-hpijs drivers are provided by hp and by this package now
146     # NOTE: remove the foomatic-db-hpijs deps sometime in 2010-10-?? ?
147     Provides: foomatic-db-hpijs = %{version}-%{release}
148     Obsoletes: foomatic-db-hpijs
149    
150 spuhler 49623
151 spuhler 49621 %description
152     This is the HP driver package to supply Linux support for most
153     Hewlett-Packard DeskJet, LaserJet, PSC, OfficeJet, and PhotoSmart
154     printers and all-in-one peripherals (also known as Multi-Function
155     Peripherals or MFPs), which can print, scan, copy, fax, and/or access
156     flash memory cards.
157    
158     It is work in progress, but printing, scanning, memory card access,
159     ink/toner/battery/consumable level checking, and inkjet printer
160     maintenance are supported on most models, when either connected to the
161     USB or LAN (built-in interfaces or selected HP JetDirect models) on a
162     Linux workstation with CUPS printing system.
163    
164     For status and consumable checking and also for inkjet maintenance
165     there is the graphical tool "hp-toolbox" available (Menu:
166     "System"/"Monitoring"/"HP Printer Toolbox").
167    
168     %package -n %{hpip_libname}
169     Summary: Dynamic library for the "hplip" HP printer/all-in-one drivers
170     Group: System/Printing
171    
172     %description -n %{hpip_libname}
173     Library needed for the "hplip" HP printer/all-in-one drivers
174    
175     %package -n %{hpip_libname}-devel
176     Summary: Headers and links to compile against the "%{hpip_libname}" ("hplip") library
177     Group: Development/C
178     Requires: %{hpip_libname} >= %{version}-%{release}
179     Provides: libhpip-devel = %{version}-%{release}
180    
181     %description -n %{hpip_libname}-devel
182     This package contains all files which one needs to compile programs using
183     the "%{hpip_libname}" library.
184    
185     %if %{sane_backend}
186     %package -n %{sane_hpaio_libname}
187     Summary: SANE driver for scanners in HP's multi-function devices (from HPLIP)
188     Group: System/Printing
189     Requires: sane-backends
190 cjw 95747 Provides: sane-backends-hpaio = %{version}-%{release}
191 cjw 106663 # (cjw) for system-config-printer
192     Provides: libsane-hpaio
193 spuhler 49621 %define _requires_exceptions devel(libcrypto)\\|devel(libdl)\\|devel(libhpip)\\|devel(libm)\\|devel(libsnmp)
194     %endif
195    
196     %if %{sane_backend}
197     %description -n %{sane_hpaio_libname}
198     SANE driver for scanners in HP's multi-function devices (from HPLIP)
199     %endif
200    
201     %if 0
202     %if %{sane_backend}
203     %package -n %{sane_hpaio_libname}-devel
204     Summary: Headers and links to compile against the "%{sane_hpaio_libname}" ("sane-hpaio") library
205     Group: Development/C
206     Requires: %{sane_hpaio_libname} >= %{version}-%{release}
207     Provides: libsane-hpaio-devel = %{version}-%{release}
208     %endif
209    
210     %if %{sane_backend}
211     %description -n %{sane_hpaio_libname}-devel
212     This package contains all files which one needs to compile programs using
213     the "%{sane_hpaio_libname}" library.
214     %endif
215     %endif
216    
217     %package model-data
218     Summary: Data file listing the HP printer models supported by HPLIP
219     Group: System/Printing
220    
221     %description model-data
222     HPLIP supports most current HP printers and multifunction devices, but
223     there are some older models not supported. This package contains the
224     list of supported models. Printerdrake installs it automatically to
225     determine whether HPLIP has to be installed or not.
226    
227     %package gui
228     Summary: HPLIP graphical tools
229     Group: System/Printing
230     Requires:python-qt4-gui
231     Requires: %{name} = %{version}-%{release}
232     Requires: usermode
233    
234     %description gui
235     HPLIP graphical tools.
236    
237    
238     %package hpijs
239     Summary: HPs printer driver IJS plug-in for GhostScript
240     Group: System/Printing
241     Requires: ghostscript
242     Provides: hpijs
243    
244     %description hpijs
245     HPs printer driver IJS plug-in for GhostScript. This driver gives full
246     printing support for nearly all non-PostScript inkjet and laser
247     printers made by HP.
248    
249     %package hpijs-ppds
250     Summary: PPD files for the HPIJS printer driver
251     Group: System/Printing
252     Requires: foomatic-filters, hplip-hpijs
253    
254     %description hpijs-ppds
255     PPD files to use the HPIJS printer driver with foomatic-rip and a
256     printer spooler like CUPS, LPRng, PDQ, ...
257    
258     %package doc
259     Summary: Documentation for HPLIP
260     Group: System/Printing
261    
262     %description doc
263     This package contains documentation for the HPLIP driver.
264    
265     This is the HP driver package to supply Linux support for most
266     Hewlett-Packard DeskJet, LaserJet, PSC, OfficeJet, and PhotoSmart
267     printers and all-in-one peripherals (also known as Multi-Function
268     Peripherals or MFPs), which can print, scan, copy, fax, and/or access
269     flash memory cards.
270    
271     %prep
272     rm -rf $RPM_BUILD_DIR/%{name}-%{version}%{extraversion}
273     %setup -q -n %{name}-%{version}%{extraversion}
274    
275     # Fedora patches
276    
277     # The pstotiff filter is rubbish so replace it (launchpad #528394).
278     %patch101 -p1 -b .pstotiff-is-rubbish
279    
280     # Fix compilation.
281     %patch102 -p1 -b .strstr-const
282    
283     # Make utils.checkPyQtImport() look for the gui sub-package (RH bug #243273).
284     %patch103 -p1 -b .ui-optional
285    
286     # Make sure to avoid handwritten asm.
287     %patch104 -p1 -b .no-asm
288    
289     # Corrected several IEEE 1284 Device IDs using foomatic data.
290 doktor5000 137692 # HP LaserJet P1007 (RH bug #585272).
291     # HP LaserJet P1505 (RH bug #680951).
292     # HP Color LaserJet CM1312nfi (RH bug #581005).
293     # HP Color LaserJet 3800 (RH bug #581935).
294     # HP Color LaserJet 2840 (RH bug #582215).
295     # HP Color LaserJet CP1518ni (RH bug #613689).
296     # HP Color LaserJet 2600n (RH bug #613712).
297     # HP LaserJet 4050 Series/4100 Series/2100 Series/4350/5100 Series/8000 Series
298     # P3005/P3010 Series/P4014/P4515 (RH bug #659039).
299     # HP Color LaserJet 2500/3700/4550/4600/4650/4700/5550/CP1515n/CP2025n
300     # CP3525/CP4520 Series/CM2320nf (RH bug #659040).
301     # HP Color LaserJet CP2025dn (RH bug #651509).
302     # HP Color LaserJet CM4730 MFP (RH bug #658831).
303     # HP Color LaserJet CM3530 MFP (RH bug #659381).
304     # HP LaserJet Professional P1606dn (RH bug #708472).
305     %patch105 -p1 -b .deviceIDs-drv
306 spuhler 49621
307 doktor5000 137692 mv prnt/drv/hpijs.drv.in{,.deviceIDs-drv-hpijs}
308     python %{SOURCE2} prnt/drv/hpcups.drv.in \
309     prnt/drv/hpijs.drv.in.deviceIDs-drv-hpijs \
310     > prnt/drv/hpijs.drv.in
311    
312 spuhler 49621 # Stopped hpcups pointlessly trying to read spool files
313     # directly (RH bug #552572).
314     %patch106 -p1 -b .mucks-with-spooldir
315    
316     # Retry when connecting to device fails (RH bug #532112).
317     %patch108 -p1 -b .retry-open
318    
319 doktor5000 137692 # Mark SNMP quirks in PPD for HP OfficeJet Pro 8500 (RH bug #581825).
320     %patch109 -p1 -b .snmp-quirks
321    
322 spuhler 49621 # Fixed hp-setup traceback when discovery page is skipped (RH bug #523685).
323     %patch110 -p1 -b .discovery-method
324    
325 doktor5000 137692 # Fixed bogus low ink warnings from hpijs driver (RH bug #643643).
326     %patch111 -p1 -b .hpijs-marker-supply
327 spuhler 49621
328 doktor5000 137692 # Clear old printer-state-reasons we used to manage (RH bug #510926).
329 spuhler 49621 %patch112 -p1 -b .clear-old-state-reasons
330    
331 doktor5000 147998 # Fixed hpcups crash when required plugin missing (RH bug #733461).
332     %patch113 -p1 -b .hpcups-crash
333    
334 spuhler 49621 # Avoid busy loop in hpcups when backend has exited (RH bug #525944).
335     %patch114 -p1 -b .hpcups-sigpipe
336    
337 doktor5000 137692 # Use correct fax PPD name for Qt3 UI.
338     %patch115 -p1 -b .fax-ppd
339    
340 spuhler 49621 # Fixed Device ID parsing code in hpijs's dj9xxvip.c (RH bug #510926).
341     %patch116 -p1 -b .bad-low-ink-warning
342    
343     # Add Device ID for
344 doktor5000 137692 # HP LaserJet 1200 (RH bug #577308)
345     # HP LaserJet 1320 series (RH bug #579920)
346     # HP LaserJet 2300 (RH bug #576928)
347     # HP LaserJet P2015 Series (RH bug #580231)
348     # HP LaserJet 4250 (RH bug #585499).
349     # HP Color LaserJet 2605dn (RH bug #583953).
350     # HP Color LaserJet 3800 (RH bug #581935).
351     # HP Color LaserJet 2840 (RH bug #582215).
352     # HP LaserJet 4050 Series/4100 Series/2100 Series/2420/4200/4300/4350/5100 Series
353     # 8000 Series/M3027 MFP/M3035 MFP/P3005/P3010 Series (RH bug #659039).
354     # HP Color LaserJet 2500/2550/2605dn/3700/4550/4600
355     # 4650/4700/5550/CP3525 (RH bug #659040).
356     # HP Color LaserJet CM4730 MFP (RH bug #658831).
357     # HP Color LaserJet CM3530 MFP (RH bug #659381).
358 spuhler 49621 for ppd_file in $(grep '^diff' %{PATCH117} | cut -d " " -f 4);
359     do
360     gunzip ${ppd_file#*/}.gz
361     done
362     %patch117 -p1 -b .deviceIDs-ppd
363     for ppd_file in $(grep '^diff' %{PATCH117} | cut -d " " -f 4);
364     do
365     gzip -n ${ppd_file#*/}
366     done
367    
368     # Hpcups (ljcolor) was putting black lines where should be blank lines (RH bug #579461).
369     %patch118 -p1 -b .skip-blank-lines
370    
371 doktor5000 137692 # Added missing newline to string argument in dbglog() call (RH bug #585275).
372 spuhler 49621 %patch119 -p1 -b .dbglog-newline
373    
374 doktor5000 137692 # Wait longer to see if a system tray becomes available (RH bug #569969).
375 spuhler 49621 %patch120 -p1 -b .no-system-tray
376    
377 doktor5000 137692 # Fix ImageableArea for Laserjet 8150/9000 (RH bug #596298).
378     for ppd_file in $(grep '^diff' %{PATCH122} | cut -d " " -f 4);
379     do
380     gunzip ${ppd_file#*/}.gz
381     done
382     %patch122 -p1 -b .ImageableArea
383     for ppd_file in $(grep '^diff' %{PATCH122} | cut -d " " -f 4);
384     do
385     gzip -n ${ppd_file#*/}
386     done
387 spuhler 49621
388 doktor5000 147998 # Fixed xsane crash when doing a multi-image scan (RH bug #725878)
389     %patch123 -p1 -b .sane-crash
390    
391 doktor5000 137692 # Fixed traceback on error condition in device.py (RH bug #628125).
392     %patch125 -p1 -b .raw_deviceID-traceback
393 spuhler 49621
394 doktor5000 137692 # Avoid UnicodeDecodeError in printsettingstoolbox.py (RH bug #645739).
395     %patch126 -p1 -b .UnicodeDecodeError
396 spuhler 49621
397 doktor5000 137692 # Don't emit SIGNALs in ui4.setupdialog.SetupDialog the PyQt3 way (RH bug #623834).
398     %patch127 -p1 -b .emit-SIGNAL
399 spuhler 49621
400     # Prevent hp-fab traceback when run as root.
401 doktor5000 137692 %patch128 -p1 -b .fab-root-crash
402 spuhler 49621
403     # Call cupsSetUser in cupsext's addPrinter method before connecting so
404 doktor5000 137692 # that we can get an authentication callback (RH bug #538352).
405     %patch129 -p1 -b .addprinter
406 spuhler 49621
407 doktor5000 137692 # Catch D-Bus exceptions in fax dialog (RH bug #645316).
408     %patch130 -p1 -b .dbus-exception
409 spuhler 49621
410 doktor5000 137692 # Prevent hpaio segfaulting on invalid URIs (RH bug #649092).
411     %patch131 -p1 -b .hpaio-segfault
412 spuhler 49621
413     # Another missing newline in filter output (Ubuntu #418053).
414 doktor5000 137692 %patch132 -p1 -b .newline
415 spuhler 49621
416 doktor5000 137692 # Enable D-Bus threading (and require pygobject2) (RH bug #600932).
417     %patch133 -p1 -b .dbus-threads
418 spuhler 49621
419 doktor5000 137692 # Catch GError exception when notification showing failed (RH bug #665577).
420     %patch134 -p1 -b .notification-exception
421 spuhler 49621
422     # Applied patch to fix CVE-2010-4267, remote stack overflow
423 doktor5000 137692 # vulnerability (RH bug #670252).
424 spuhler 49621 %patch135 -p1 -b .CVE-2010-4267
425    
426 doktor5000 137692 # Avoid KeyError in ui4/wifisetupdialog.py (RH bug #680939).
427     %patch136 -p1 -b .wifisetup
428     %patch137 -p1 -b .CVE-2011-2722
429 spuhler 49621
430 doktor5000 137692 sed -i.duplex-constraints \
431     -e 's,\(UIConstraints.* \*Duplex\),//\1,' \
432     prnt/drv/hpcups.drv.in
433 spuhler 49621
434 luigiwalser 399969 # Use mkstemp to create temporary files to avoid symlink attacks (RH#902163).
435     %patch138 -p1 -b .CVE-2013-0200
436    
437 doktor5000 137692 # Debian/Ubuntu patches
438 spuhler 49621
439     # This patch tries to make sure that black is printed with just
440     # the black pen, if the printer supports it
441 doktor5000 137692 %patch201 -p1 -b .01_rss
442 spuhler 49621
443 doktor5000 137692 # shebang fixes
444     %patch202 -p1 -b .10_shebang_fixes
445    
446 spuhler 49621 # code cleanup related to char signedness
447 doktor5000 137692 %patch203 -p1 -b .14_charsign
448 spuhler 49621
449 doktor5000 137692 # compiling ui files to py
450     %patch204 -p1 -b .85_rebuild_python_ui
451 spuhler 49621
452     # place html documentation under hplip-doc/HTML/
453 doktor5000 137692 %patch205 -p1 -b .87_move_documentation
454 spuhler 49621
455 doktor5000 137692 # Corrections on the models.dat entry for the HP PhotoSmart Pro B9100,
456     # especially for the correct color calibration mode.
457     %patch206 -p1 -b .hplip-photosmart_b9100_support
458    
459     # Fixes Short-edge duplex printing if duplex is PJL-controlled
460     # https://bugs.launchpad.net/hplip/+bug/244295
461     %patch207 -p1 -b .hplip-pjl-duplex-binding
462    
463     # original patch from debian, path to kdesu added for %%_libdir on x86_64
464     %patch208 -p1 -b .mga-kde4-kdesudo-support
465    
466     # https://bugs.launchpad.net/debian/+source/hplip/+bug/530746
467     %patch209 -p1 -b .hp-check-groups
468    
469 spuhler 49621 # Check for hpaio module in /etc/sane.d/dll.d/hplip too
470 doktor5000 137692 %patch210 -p1 -b .hp-check_debian
471 spuhler 49621
472 doktor5000 137692 %patch211 -p1 -b .hp-setup-prompt-for-custom-PPDs
473 spuhler 49621
474 doktor5000 137692 # Fix use of deprecated udev syntax
475     # https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/491346
476     %patch212 -p1 -b .mga-udev-rules-use-attrs-not-sysfs-and-hp-mkuri-call-fix
477 cjw 98894
478 doktor5000 137692 %patch213 -p1 -b .hp-mkuri-take-into-account-already-installed-plugin-also-for-exit-value
479    
480 doktor5000 137952 # disable for now, as this changes default hplip behavior
481     # and change in default scanning application should be decided by a poll first
482     #%patch215 -p1 -b .simple-scan-as-default
483 doktor5000 137692
484     %patch216 -p1 -b .make-commafy-correctly-work-with-python-2
485    
486     %patch217 -p1 -b .mga-remove-duplicate-entry-for-cp1700-in-drv-files
487    
488     # dlopen libhpmud.so.0 instad of libhpmud.so, in order not to depend on
489     # devel package (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=548379)
490     # obsoletes hplip-3.9.8-dlopen-libhpmud.patch, newer & extended version
491     %patch219 -p1 -b .try_libhpmud.so.0
492    
493     %patch220 -p1 -b .add-lidil-two-cartridge-modes
494    
495     %patch222 -p1 -b .large-sizes-borderless-on-photosmart-pro-b-series
496    
497     %patch223 -p1 -b .more-user-friendly-choice-names-for-installed-cartridges
498    
499 spuhler 49621 # Make all files in the source user-writable
500     chmod -R u+w .
501    
502     %build
503     %serverbuild
504     #needed by patch205
505     libtoolize --copy --force
506     aclocal --force
507     autoconf -f
508     #needed by patches 205 and 210
509     automake -f --foreign
510    
511     %if !%{sane_backend}
512     WITHOUT_SANE="--without-sane"
513     %endif
514     %configure2_5x $WITHOUT_SANE \
515     --disable-foomatic-rip-hplip-install \
516     --enable-scan-build \
517     --enable-gui-build \
518     --enable-fax-build \
519     --enable-pp-build \
520     --enable-qt4 --disable-qt3 \
521     --enable-hpcups-install \
522     --enable-cups-drv-install \
523     --enable-cups-ppd-install \
524     --enable-hpijs-install \
525     --enable-udev-acl-rules \
526     --enable-policykit \
527     --with-mimedir=%{_datadir}/cups/mime
528    
529     sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
530     sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
531    
532     %make
533    
534     # convert icons to required sizes
535     #convert data/images/print.png -resize 16x16 %{name}.mini.png
536     #convert data/images/print.png -resize 32x32 %{name}.png
537     #convert data/images/print.png -resize 48x48 %{name}.large.png
538    
539     %install
540     rm -rf %{buildroot}
541     mkdir -p %{buildroot}%{_bindir}
542     mkdir -p %{buildroot}%{_includedir}
543     mkdir -p %{buildroot}%{_initrddir}
544     mkdir -p %{buildroot}%{_sysconfdir}/hp
545     mkdir -p %{buildroot}/var/run/hplip
546    
547     # Do not use the macro here, use the standard DESTDIR method as it works
548     # with HPLIP, in contrary to the non-standard Mandriva method
549     #make test-destdir DESTDIR=%{buildroot}
550     make install DESTDIR=%{buildroot}
551    
552     # Install files which the "make install" missed to install
553     install -m 644 ip/hpip.h %{buildroot}%{_includedir}
554     install -m 644 ip/xform.h %{buildroot}%{_includedir}
555    
556     # Move doc in sub-package
557     mv %{buildroot}%{_docdir}/%{name}-%{version}%{extraversion} %{buildroot}%{_docdir}/%{name}-doc-%{version}%{extraversion}
558    
559     # Remove static libraries of SANE driver
560     rm -f %{buildroot}%{_libdir}/sane/libsane-hpaio*.so
561     rm -f %{buildroot}%{_libdir}/sane/libsane-hpaio*.la
562     rm -f %{buildroot}%{_sysconfdir}/sane.d/dll.conf
563    
564     # Remove other unneeded files
565     rm -f %{buildroot}%{py_platsitedir}/*.la
566    
567     # install menu icons
568     #mkdir -p %{buildroot}%{_iconsdir}/locolor/16x16/apps/
569     #install -m 644 %{name}.png -D %{buildroot}%{_iconsdir}/%{name}.png
570     #install -m 644 %{name}.mini.png -D %{buildroot}%{_miconsdir}/%{name}.png
571     #install -m 644 %{name}.large.png -D %{buildroot}%{_liconsdir}/%{name}.png
572    
573     mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
574     desktop-file-install --vendor='' \
575     --dir=%{buildroot}%{_datadir}/applications \
576     --remove-category='Application' \
577     --remove-category='Utility' \
578     --add-category='System' \
579     --add-category='Settings' \
580     --add-category='Printing' \
581     --add-category='Qt' \
582     --add-category='HardwareSettings' \
583     --add-category='X-MandrivaLinux-CrossDesktop' \
584     --remove-key='Version' \
585     %{buildroot}%{_datadir}/applications/hplip.desktop
586    
587 wally 91745 cat > $RPM_BUILD_ROOT%{_datadir}/applications/%{_real_vendor}-hp-sendfax.desktop << EOF
588 spuhler 49621 [Desktop Entry]
589     Name=HP Sendfax
590     Comment=Utility for sending faxes with HP's multi-function devices
591     Exec=%{_bindir}/hp-sendfax
592     Icon=%{_datadir}/%{name}/data/images/32x32/fax_machine.png
593     Terminal=false
594     Type=Application
595     Categories=TelephonyTools;Qt;Printing;Utility;X-MandrivaLinux-CrossDesktop;
596     EOF
597     #' #Fix vim's stupid syntax
598    
599 doktor5000 137692 # The systray applet doesn't work properly (displays icon as a
600     # window), so don't ship the launcher yet.
601 spuhler 49621 rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
602    
603 dmorgan 106333
604 spuhler 49621 # switched to udev, no need for hal information
605 dmorgan 106333 rm -rf %{buildroot}%{_datadir}/hal/fdi
606 spuhler 49621
607 dmorgan 106333 rm -f %{buildroot}%{_libdir}/*.la \
608     %{buildroot}%{python_sitearch}/*.la \
609     %{buildroot}%{_libdir}/sane/*.la
610    
611 spuhler 49621 # Regenerate hpcups PPDs on upgrade if necessary (bug #579355).
612     install -p -m755 %{SOURCE1} %{buildroot}%{_bindir}/hpcups-update-ppds
613    
614     # Fedora pstotiff
615     rm -f %{buildroot}%{_sysconfdir}/cups/pstotiff.types
616     rm -f %{buildroot}%{_datadir}/cups/mime/pstotiff.types
617     rm -f %{buildroot}%{_datadir}/hplip/fax/pstotiff*
618     rm -f %{buildroot}%{_prefix}/lib/cups/filter/hpcac
619    
620     # bork?
621     install -d %{buildroot}%{_sysconfdir}/cups
622     cp -p %{buildroot}%{_datadir}/cups/mime/pstotiff.convs %{buildroot}%{_sysconfdir}/cups/pstotiff.convs
623    
624     # set up consolehelper
625     mkdir -p %{buildroot}%{_sbindir}
626     mv %{buildroot}%{_bindir}/hp-setup %{buildroot}%{_sbindir}/hp-setup
627     ln -s consolehelper %{buildroot}%{_bindir}/hp-setup
628    
629     # Make sure pyc files are generated, otherwise we can get
630     # difficult to debug problems
631     pushd %{buildroot}%{_datadir}/%{name}
632     python -m compileall .
633     popd
634    
635     %triggerin -- hplip < 2.7.7
636     chkconfig --del hplip
637    
638     # Restart CUPS to make the Fax PPD known to it
639     if [ -f /etc/init.d/cups ]; then
640     /sbin/service cups condrestart || :
641     fi
642    
643     %post -n hplip-hpijs-ppds
644     # Restart CUPS to make the printing PPDs known to it
645     if [ -f /etc/init.d/cups ]; then
646     /sbin/service cups condrestart || :
647     fi
648    
649     %post -n hplip-hpijs
650     %{_bindir}/hpcups-update-ppds &>/dev/null ||:
651    
652     %post -n hplip-model-data
653     /sbin/udevadm trigger --subsystem-match=usb --attr-match=idVendor=03f0
654    
655    
656     %if %{sane_backend}
657     %post -n %{sane_hpaio_libname}
658 spuhler 49623
659 spuhler 49621 # Add HPLIP driver to /etc/sane.d/dll.conf
660     if ! grep ^hpaio /etc/sane.d/dll.conf >/dev/null 2>/dev/null ; then \
661     echo hpaio >> /etc/sane.d/dll.conf; \
662     fi
663     %endif
664    
665     %if %{sane_backend}
666     %preun -n %{sane_hpaio_libname}
667     # Remove HPLIP driver from /etc/sane.d/dll.conf
668     if [ "$1" = 0 ]; then \
669     if grep ^hpaio /etc/sane.d/dll.conf >/dev/null 2>/dev/null ; then \
670     sed '/hpaio/d' /etc/sane.d/dll.conf > /tmp/$$; \
671     cp -f /tmp/$$ /etc/sane.d/dll.conf; \
672     rm -f /tmp/$$; \
673     fi; \
674     fi
675     %endif
676    
677     # Restart CUPS to make the removal of the Fax PPD known to it
678     if [ -f /etc/init.d/cups ]; then
679     /sbin/service cups condrestart || :
680     fi
681    
682     %postun -n hplip-hpijs-ppds
683     # Restart CUPS to make the removal of the printing PPDs known to it
684     if [ -f /etc/init.d/cups ]; then
685     /sbin/service cups condrestart || :
686     fi
687    
688    
689    
690     %clean
691     rm -rf %{buildroot}
692    
693     %files
694     %defattr(-,root,root)
695     #doc COPYING doc/*
696     %config(noreplace) %{_sysconfdir}/hp
697     %dir /var/run/hplip/
698     %{_bindir}/hp-align
699     %{_bindir}/hp-clean
700     %{_bindir}/hp-colorcal
701     %{_bindir}/hp-devicesettings
702     %{_bindir}/hp-fab
703     %{_bindir}/hp-faxsetup
704     %{_bindir}/hp-firmware
705     %{_bindir}/hp-info
706     %{_bindir}/hp-levels
707     %{_bindir}/hp-linefeedcal
708     %{_bindir}/hp-makecopies
709     %{_bindir}/hp-makeuri
710     %{_bindir}/hp-mkuri
711     %{_bindir}/hp-pkservice
712     %{_bindir}/hp-plugin
713     %{_bindir}/hp-pqdiag
714     %{_bindir}/hp-printsettings
715     %{_bindir}/hp-probe
716     %{_bindir}/hp-query
717     %{_bindir}/hp-scan
718     %{_bindir}/hp-sendfax
719     %{_bindir}/hp-setup
720     %{_sbindir}/hp-setup
721     %{_bindir}/hp-testpage
722     %{_bindir}/hp-timedate
723     %{_bindir}/hp-unload
724     %{_bindir}/hp-wificonfig
725    
726     %exclude %{_datadir}/hplip/data/models
727     # C libraries for Python
728     %{_libdir}/python*/*/*.so*
729     # CUPS backends (0755 permissions, so that CUPS 1.2 runs these backends
730     # as lp user)
731     # Note: this must be /usr/lib not %{_libdir}, since that's the
732     # CUPS serverbin directory.
733     %attr(0755,root,root) %{_prefix}/lib/cups/backend/hp*
734     %{_prefix}/lib/cups/filter/hplipjs
735     %{_prefix}/lib/cups/filter/hpcups
736     %{_prefix}/lib/cups/filter/hpcupsfax
737 cjw 85139 %{_prefix}/lib/cups/filter/hpps
738 spuhler 49621 %{_prefix}/lib/cups/filter/pstotiff
739     %{_datadir}/cups/mime/pstotiff.convs
740     %config(noreplace) %{_sysconfdir}/cups/pstotiff.convs
741     %{_datadir}/ppd/HP/HP-Fax*.ppd*
742     %{_datadir}/cups/drv/hp/hpcups.drv
743     # Files
744     %dir %{_datadir}/hplip
745     %{_datadir}/hplip/align.py*
746     %{_datadir}/hplip/clean.py*
747     %{_datadir}/hplip/colorcal.py*
748     %{_datadir}/hplip/devicesettings.py*
749     %{_datadir}/hplip/fab.py*
750     %{_datadir}/hplip/fax
751     %{_datadir}/hplip/faxsetup.py*
752     %{_datadir}/hplip/firmware.py*
753     %{_datadir}/hplip/hpdio.py*
754     %{_datadir}/hplip/hpssd*
755     %{_datadir}/hplip/info.py*
756     %{_datadir}/hplip/__init__.py*
757     %{_datadir}/hplip/levels.py*
758     %{_datadir}/hplip/linefeedcal.py*
759     %{_datadir}/hplip/makecopies.py*
760     %{_datadir}/hplip/makeuri.py*
761     %{_datadir}/hplip/pkservice.py*
762     %{_datadir}/hplip/plugin.py*
763     %{_datadir}/hplip/pqdiag.py*
764     %{_datadir}/hplip/printsettings.py*
765     %{_datadir}/hplip/probe.py*
766     %{_datadir}/hplip/query.py*
767     %{_datadir}/hplip/scan.py*
768     %{_datadir}/hplip/sendfax.py*
769     %{_datadir}/hplip/setup.py*
770     %{_datadir}/hplip/testpage.py*
771     %{_datadir}/hplip/timedate.py*
772     %{_datadir}/hplip/unload.py*
773     %{_datadir}/hplip/wificonfig.py*
774     # Directories
775     %{_datadir}/hplip/base
776     %{_datadir}/hplip/copier
777     %dir %{_datadir}/hplip/data
778     %{_datadir}/hplip/data/ldl
779     %{_datadir}/hplip/data/localization
780     %{_datadir}/hplip/data/models
781     %{_datadir}/hplip/data/pcl
782     %{_datadir}/hplip/data/ps
783     %{_datadir}/hplip/installer
784     %{_datadir}/hplip/pcard
785     %{_datadir}/hplip/prnt
786     %{_datadir}/hplip/scan
787     %{_datadir}/polkit-1/actions/com.hp.hplip.policy
788     %{_datadir}/dbus-1/system-services/com.hp.hplip.service
789     %{_localstatedir}/lib/hp/hplip.state
790     %config(noreplace) %{_sysconfdir}/dbus-1/system.d/com.hp.hplip.conf
791    
792     %files doc
793     %defattr(-,root,root)
794     %doc %{_docdir}/%{name}-doc-%{version}%{extraversion}
795    
796     %files -n %{hpip_libname}
797     %defattr(-,root,root)
798     %{_libdir}/libhpip*.so.*
799     %{_libdir}/libhpmud.so.*
800    
801     %files -n %{hpip_libname}-devel
802     %defattr(-,root,root)
803     %{_includedir}/hpip.h
804     %{_includedir}/xform.h
805     %{_libdir}/libhpip*.so
806     %{_libdir}/libhpmud.so
807    
808     %if %{sane_backend}
809    
810     %files -n %{sane_hpaio_libname}
811     %defattr(-,root,root)
812     %{_libdir}/sane/libsane-hpaio*.so.*
813    
814     %endif
815    
816     %files model-data
817     %defattr(-,root,root)
818     %{_sysconfdir}/udev/rules.d/*.rules
819     %{_datadir}/hplip/data/models
820    
821     %files gui
822     %{_bindir}/hp-check
823     %{_bindir}/hp-print
824     %{_bindir}/hp-systray
825     %{_bindir}/hp-toolbox
826     %{_datadir}/applications/*.desktop
827     # Files
828     %{_datadir}/hplip/check.py*
829     %{_datadir}/hplip/print.py*
830     %{_datadir}/hplip/systray.py*
831     %{_datadir}/hplip/toolbox.py*
832     # Directories
833     %{_datadir}/hplip/data/images
834     %{_datadir}/hplip/ui4
835    
836     %files hpijs
837     %defattr(-,root,root)
838     %{_bindir}/hpijs
839     # Needed for both printing and fax PPDs. They all need HPIJS, therefore
840     # the link is here
841     %dir %{_datadir}/ppd
842     %dir %{_datadir}/ppd/HP
843     %{_bindir}/hpcups-update-ppds
844    
845     %files hpijs-ppds
846     %defattr(-,root,root)
847     %{_datadir}/ppd/HP/apollo*.ppd*
848     %{_datadir}/ppd/HP/hp-*.ppd*
849    
850    

  ViewVC Help
Powered by ViewVC 1.1.28