Пакет hplip: Specfile

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
Summary: Solution for printing, scanning, and faxing with Hewlett-Packard inkjet and laser printers.

%def_enable sane_backend
%def_enable python_code
%def_enable PPDs
%def_disable backportM30_mode
%def_without external_foomatic_db

Name: hplip
Version: 2.7.12
Release: alt2.M40.1
License: GPL/MIT/BSD
Group: Publishing
URL: http://hplip.sourceforge.net
Packager: Igor Vlasenko <viy@altlinux.org>

%define foomatic_snapshot 20070820
%define fooversion %version
%define hpijsname hpijs
%define foomaticname foomatic-db-hpijs

Conflicts: ghostscript <= 7.05-alt15
Obsoletes: hpoj <= 0.91
Provides: cups-backend-ptal
Obsoletes: cups-backend-ptal
Conflicts: cups < 1.1.18-alt7

PreReq:	cups
Requires: %name-common = %version-%release

%if_enabled python_code
###Requires: python
Requires: python-module-qt => 3.16-alt0
%add_python_lib_path %_datadir/%name
%endif

Requires: service => 0.5.9-alt1
%if_enabled backportM30_mode
BuildRequires: rpm-build-compat >= 0.4
%endif

Source: http://dl.sourceforge.net/hplip/%name-%version.tar.bz2
%if_with external_foomatic_db
Source1: http://www.linuxprinting.org/download/foomatic/%foomaticname.tar.bz2
%endif
Source2: %name.init
Source4: 80-hpmud.perms
Source5: %name.png
Source6: %name-icons.tar.bz2
Source7: %name-fixppd.sh
# fedora fdi policy (examine)
Source100: hplip.fdi

# OpenSuSE based sources
# deprecated; 2.7.7 shows 'can't connect to device'
Source101: hp-toolbox.wrapper
Source102: hpijs.1

Patch0: hplip-2.7.12-alt-automake-ld.patch
Patch1: hplip-2.7.12-alt-urlhandler.patch
Patch2: hplip-2.7.12-alt-fix-udev-rules.patch
Patch3: hplip-2.7.10-alt-hplip-desktop.patch

Patch10: http://www.linuxprinting.org/download/printing/hpijs/hpijs-1.4.1-rss.1.patch
# it is patch 10 rediffed
Patch11: hpijs-1.4.1-rss-alt-for-2.7.7.patch

# fedora patches
Patch103: fedora-2.7.12-4-hplip-quiet.patch
Patch104: fedora-2.7.12-4-hplip-marker-supply.patch
# in patch0
#Patch: fedora-2.7.12-4-hplip-libm.patch
# in patch2
#Patch: fedora-2.7.12-4-hplip-udev-rules.patch
Patch108: fedora-2.7.12-4-hplip-libsane.patch
Patch109: fedora-2.7.12-4-hplip-media-empty.patch
Patch111: fedora-2.7.12-4-hplip-unload-traceback.patch
Patch112: fedora-2.7.12-4-hplip-no-root-config.patch
Patch113: fedora-2.7.12-4-hplip-ui-optional.patch
Patch106: fedora-2.7.12-4-hplip-alloc.patch
#Patch??: fedora-2.7.12-4-hplip-guest.patch

Patch201: hplip-parse-crash-12.patch
Patch202: hplip-static-alerts-table.patch
Patch203: hplip-validate-uri.patch


# for hack around file conflict
BuildRequires: foomatic-db

BuildPreReq: libsane-devel
# Automatically added by buildreq on Thu Sep 22 2005
BuildRequires: gcc-c++ libcups-devel libjpeg-devel libnet-snmp-devel libssl-devel libstdc++-devel libusb-devel

%if_enabled python_code
BuildPreReq: python-module-qt-devel
#RemovedBuildRequires: python-base python-dev python-modules-compiler python-modules-encodings
BuildRequires: python-devel
%endif

%if_enabled PPDs
#cups-common is for cupstestppd
BuildPreReq: perl cups-common 
%endif

%description
This is the HP driver package to supply Linux support for most
Hewlett-Packard DeskJet, LaserJet, PSC, OfficeJet, and PhotoSmart
printers and all-in-one peripherals (also known as Multi-Function
Peripherals or MFPs), which can print, scan, copy, fax, and/or access
flash memory cards.

This package contains various tools for memory card access,
ink/toner/battery/consumable level checking, and inkjet printer
maintenance, along with python cups backends.


%if_enabled python_code
%package gui
Summary: HPLIP graphical tools for Hewlett-Packard Co. Inkjet Printers and MFPs
License: GPL
Group: Publishing
Obsoletes: xojpanel <= 0.91
Obsoletes: hpoj-xojpanel <= 0.91
Obsoletes: hplip-tools < 2.0
Provides: hplip-tools = 2.0
# for hp-scan -n
Requires: python-module-imaging
Requires: %name = %version-%release
%if_enabled PPDs
Requires: %name-PPDs = %version-%release
%endif

%description gui
HPLIP is an HP developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux.

The HPLIP project provides printing support for nearly 1000 printer models, including Deskjet, Officejet, Photosmart, PSC (Print Scan Copy), Business Inkjet, LaserJet, and LaserJet MFP.

This package contains the gui toolbox application for HPLIP,
with which several tasks such as memory card access, 
ink/toner/battery/consumable level checking, and inkjet printer
maintenance can be done.
%endif

%package common
Summary: Hewlett-Packard Co. Inkjet Driver Project
License: GPL
Group: Publishing

%description common
HPLIP is an HP developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux.

The HPLIP project provides printing support for nearly 1000 printer models, including Deskjet, Officejet, Photosmart, PSC (Print Scan Copy), Business Inkjet, LaserJet, and LaserJet MFP.

This package contains common libraries for
The Hewlett-Packard  Inkjet  Driver  Project.

%description
This is the HP driver package to supply Linux support for most
Hewlett-Packard DeskJet, LaserJet, PSC, OfficeJet, and PhotoSmart
printers and all-in-one peripherals (also known as Multi-Function
Peripherals or MFPs), which can print, scan, copy, fax, and/or access
flash memory cards.

%if_enabled PPDs
%package PPDs
Summary: PPDs for Hewlett-Packard Co. Inkjet Printers and MFPs
License: MIT
Group: Publishing

%description PPDs
HPLIP is an HP developed solution for printing, scanning, and faxing with HP inkjet and laser based printers in Linux.

The HPLIP project provides printing support for nearly 1000 printer models, including Deskjet, Officejet, Photosmart, PSC (Print Scan Copy), Business Inkjet, LaserJet, and LaserJet MFP.

This package contains postscript printer definition files (PPDs)

various tools for memory card access,
ink/toner/battery/consumable level checking, and inkjet printer
maintenance.
%endif

%package hpijs
Summary: Hewlett-Packard Co. Inkjet Driver Project
License: BSD
Group: Publishing
Obsoletes: hpijs < 2.7
Provides: %hpijsname = %version
Requires: %name-common = %version-%release
Requires: ghostscript

%description hpijs
hpijs is a collection of optimized drivers for HP printers.
hpijs supports the DeskJet 350C, 600C, 600C Photo, 630C, Apollo 2000,
Apollo 2100, Apollo 2560, DeskJet 800C, DeskJet 825, DeskJet 900,
PhotoSmart, DeskJet 990C, and PhotoSmart 100 series.

The  Hewlett-Packard  Inkjet  Driver  Project  is  a add-on to the GNU
Ghostscript  application. This driver is open source software based on
the  Hewlett  Packard  Appliance  Printing Development Kit APDK for
deskjet printers.

%if_enabled sane_backend
%package sane
Summary: SANE driver for scanners in HP's multi-function devices (from HPLIP)
License: GPL
Group: Publishing
Requires: libsane
Requires: %name-common = %version-%release
Obsoletes: libsane-hpoj <= 0.91

%description sane
SANE driver for scanners in HP's multi-function devices (from HPLIP)
%endif # sane_backend

%package foomatic
Summary: foomatic data for %name-%hpijsname
Group: Publishing
Requires: %{name}-hpijs = %version-%release
Obsoletes: hpijs-foomatic
Provides: %hpijsname-foomatic = %version
Provides: foomatic-db-hpijs = %fooversion-%foomatic_snapshot
PreReq:	foomatic-db-engine >= 3.0.1
%if_enabled backportM30_mode
PreReq: printer-drivers-utils
%endif

%description foomatic
foomatic database for %hpijsname
Snapshot at %foomatic_snapshot


%prep
%if_with external_foomatic_db
%setup -q -a 1
%else
%setup -q 
%endif

%patch0 -p1
%patch1 -p1
%patch2 -p1

# Fix desktop file.
%patch3 -p1 -b .desktop

# Quieten hpssd on startup.
%patch103 -p1 -b .quiet

# Low ink is a warning condition, not an error.
%patch104 -p1 -b .marker-supply

# patch0 is better
# libhpip should link against libm (bug #197599).
#%patch105 -p1 -b .libm

%patch106 -p1 -b .alloc

# Link libsane-hpaio against libsane (bug #234813).
%patch108 -p1 -b .libsane

# Clear the media-empty-error printer state.
%patch109 -p1 -b .media-empty

# Prevent a traceback when unloading a photo card (bug #238617).
%patch111 -p1 -b .unload-traceback

# Prevent SELinux audit message from the CUPS backends (bug #241776)
#patch112 -p1 -b .no-root-config

# Make utils.checkPyQtImport() look for the gui sub-package (bug #243273).
%patch113 -p1 -b .ui-optional

%patch201 -p1
%patch202 -p1
%patch203 -p1

fgrep -lZr '#!/usr/bin/env python' . | xargs -r0 %__subst 's,#!/usr/bin/env python,#!/usr/bin/python,'
tar -jxf %SOURCE6

#pushd prnt/hpijs
#%patch10 -p1
#popd
# it is patch 10 rediffed
%patch11 -p1

## fix for possibly broken foomatic_db.inc (was in 2.7.9)
mv foomatic_db.inc foomatic_db.inc.old
cat foomatic_db.inc.old | perl -npe '$_="" if m,PPD/HP/([Hh][Pp][-_].*\.ppd) \\\n, and not -e "foomatic-db/db/source/PPD/HP/$1";' > foomatic_db.inc
echo "any difference?"
diff foomatic_db.inc.old foomatic_db.inc
##################################

%build

export QTDIR=%_libdir/qt3

autoconf
cat > /dev/null <<EOF
--enable-doc-build               enable documentation build (default=yes)
--enable-hpijs-only-build        enable hpijs only build (default=no)
--enable-foomatic-ppd-install    enable foomatic ppd install, uses hpppddir default=no
--enable-foomatic-xml-install    enable foomatic xml install, uses foomaticdir default=yes
--with-cupsbackenddir=DIR        set cups backend install directory, default=/usr/lib/cups/backend
--with-icondir=DIR               set icon install directory, default=/usr/share/applications
--with-hpppddir=DIR              set hp ppd install directory, default=datadir/ppd/HP
--with-docdir=DIR                set hplip documentation directory, default=datadir/doc
--with-foomaticdir=DIR           set foomatic db install directory, default=datadir/foomatic
EOF

#we install foomatic data in separate package
%configure \
%if_enabled PPDs
    --enable-foomatic-ppd-install \
%else
    --disable-foomatic-ppd-install \
%endif
    --enable-foomatic-xml-install \
%if_enabled python_code
    --enable-gui-build \
    --enable-fax-build \
    --enable-network-build=yes \
%if_enabled backportM30_mode
    --enable-cups11-build \
%endif
%if_enabled sane_backend
    --enable-scan-build \
%else
    --disable-scan-build \
%endif
%else
    --enable-hpijs-only-build 
%endif

%make

%if_with external_foomatic_db
pushd %foomaticname
# Makefile generation ("./make_configure" for CVS snapshots)
./make_configure
# TODO: whether it is needed in modern times ??
# Fix for lib64 architectures, avoid patch
%__subst "s@/usr/lib/(cups|pdq|ppr)@%_libdir/\1@g" configure
%configure
%make
popd
%endif

%install
%if_with external_foomatic_db
# TODO: by the way, do we need it now?
pushd %foomaticname
%make DESTDIR=$RPM_BUILD_ROOT install
popd
%endif

install -d $RPM_BUILD_ROOT/%_datadir/cups/model/
%if_disabled PPDs
# in alt, ppds are stored with cups (not good?)
#mv $RPM_BUILD_ROOT/usr/share/ppd/HP/fax/HP-Fax-hplip.ppd.gz $RPM_BUILD_ROOT/%_datadir/cups/model/
install -m644 fax/ppd/HP-Fax-hplip.ppd $RPM_BUILD_ROOT/%_datadir/cups/model/
%endif

%make DESTDIR=$RPM_BUILD_ROOT install
%if_enabled python_code
###
mkdir -p $RPM_BUILD_ROOT%_sysconfdir/security/console.perms.d/
%__install -m 600 %{SOURCE4} $RPM_BUILD_ROOT%_sysconfdir/security/console.perms.d/80-hpmud.perms

#mkdir -p $RPM_BUILD_ROOT%_initdir/
#%__install -m 755 %{SOURCE2} $RPM_BUILD_ROOT%_initdir/%name

mkdir -p $RPM_BUILD_ROOT%_sysconfdir/hp

### add to doc install
%__cp COPYING $RPM_BUILD_ROOT%_docdir/%name-%version/

# # Comment out all "setSizePolicy" calls, this function is incompatible with
# # PyQT/SIP <3.16
# # the code below is correct: it does'nt comments semilines ..., as previous
# # which cause syntax error in 1.6.6a, but is deprecated with PyQT = 3.16
# perl -p -i -e 'if (/^(.*setSizePolicy.*)$/) {$_="#".$_; if (/,\s*$/) {$endcomma=1}} elsif ($endcomma) {$_="#".$_; $endcomma=0}' `grep -l setSizePolicy $RPM_BUILD_ROOT%_datadir/%name/ui/*.py`

# install menu entry
%__install -d $RPM_BUILD_ROOT{%_menudir,%_datadir/applications}
rm -f $RPM_BUILD_ROOT%_menudir/%name
cat << EOF > $RPM_BUILD_ROOT%_menudir/%name
?package(%name): longtitle="%summary - HP Device Manager" \
command="%_bindir/hp-toolbox" title="HP Device Manager" needs="x11" \
section="Configuration/Printing" \
icon="%name.png"
EOF

#subst 's,Categories=Application;Utility;,Categories=Application;Utility;Printing;,' $RPM_BUILD_ROOT%_datadir/applications/%name.desktop

#install -m 755 %{SOURCE101} %{buildroot}%{_bindir}/hp-toolbox.wrapper


# Menu Icons
%__install -pD -m644 %name.16.png $RPM_BUILD_ROOT%_miconsdir/hplip.png
%__install -pD -m644 %name.32.png $RPM_BUILD_ROOT%_niconsdir/hplip.png
%__install -pD -m644 %name.48.png $RPM_BUILD_ROOT%_liconsdir/hplip.png

# Remove the installed /etc/sane.d/dll.conf
# because this is provided by the sane package:
rm -f $RPM_BUILD_ROOT%_sysconfdir/sane.d/dll.conf
# Remove other unneeded files
rm -f $RPM_BUILD_ROOT%_datadir/%name/%name
rm -f $RPM_BUILD_ROOT%_datadir/%name/hplip_readme.html
rm -f $RPM_BUILD_ROOT%_datadir/%name/hplip_overview.png
rm -f $RPM_BUILD_ROOT%_datadir/%name/COPYING
%endif # python_code

# Install other files for HPIJS
mkdir -p $RPM_BUILD_ROOT%_docdir/%hpijsname-%version
%__install -pD -m644 prnt/hpijs/README_LIBJPG  $RPM_BUILD_ROOT%_docdir/%hpijsname-%version/
%__install -d %{buildroot}%{_man1dir}/
%__install -p -m644 %{SOURCE102} %{buildroot}%{_man1dir}/

%if_enabled PPDs
#### Remove the installed /usr/bin/foomatic-rip
#### because this is provided by the foomatic-filters package:
###rm %{buildroot}%{_bindir}/foomatic-rip
%endif # PPDs

%if_enabled PPDs
### a piece of ancient wisdom of SuSE
# Make some general tests and adjustments for all PPDs (see manufacturer-PPDs.spec):
pushd %{buildroot}%{_datadir}/foomatic/db/source/PPD/HP
#pushd foomatic-db/db/source/PPD/HP
for ppd in *.ppd{,.gz,.bz2}; 
do
	[ -e $ppd ] && sh %{SOURCE7} $ppd
done
popd
# End of the general tests and adjustments for all PPDs.
%endif # PPDs

# fedora fdi policy
mkdir -p %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor
install -p -m644 %{SOURCE100} %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor/10-hplip.fdi


# resolving conflicts with foomatic-db
pushd $RPM_BUILD_ROOT/usr/share/foomatic/db/source/printer
for i in *.xml
do 
    if [ -f /usr/share/foomatic/db/source/printer/$i ] ; then
	echo "foomatic-db conflict: removed $i"
	rm -f $i
    fi
done
popd

# removing unpackaged files
pushd $RPM_BUILD_ROOT
rm -f /usr/share/hplip/hplip-install \
      /usr/share/hplip/install.py
popd

%postun -n hplip-gui
%clean_menus


%post -n hplip-gui
%update_menus


%pre
# no more services
if [ -f %_initrddir/%name ]; then
    /sbin/service hplip condstop ||:
    /sbin/chkconfig --del hplip ||:
fi

%post
%update_menus
/sbin/service cups condrestart

%preun
if [ "$RPM_INSTALL_ARG1" -eq 0 ]; then
    /sbin/service cups condrestart
fi

%postun
%clean_menus

%if_enabled backportM30_mode
%post foomatic
/usr/bin/update-printers-db
%endif

%if_enabled sane_backend
%post sane
%post_ldconfig
DLLCONF=%_sysconfdir/sane.d/dll.conf
if ! %__grep -Eqs '^[[:space:]]*hpaio[[:space:]]*$' $DLLCONF; then
        if %__grep -Eqs '^[[:space:]]*#[[:space:]]*hpaio[[:space:]]*$' $DLLCONF; 
	then
            %__subst 's|^[[:space:]]*#[[:space:]]*hpaio[[:space:]]*$|hpaio|' $DLLCONF
        else
		cat  >> $DLLCONF <<EOF
#
# HPLIP backend homepage: http://hpinkjet.sf.net/
# Uncomment the following line if hplip is installed:
hpaio
EOF
     	fi 
fi
							
%preun sane
# Remove HPLIP driver from /etc/sane.d/dll.conf
if [ "$1" = 0 ]; then
        %__subst 's|^\([[:space:]]*hpaio[[:space:]]*\)$|#\1|' %_sysconfdir/sane.d/dll.conf
fi
%endif #sane_backend

%files
%if_enabled python_code
%doc %_docdir/%name-%version
%dir %{_sysconfdir}/hp
%config(noreplace) %{_sysconfdir}/hp/hplip.conf
# logged-in user gave direct access to the printers
%_sysconfdir/security/console.perms.d/80-hpmud.perms
#deprecated
#%_initdir/%name
# C libraries for Python
%_libdir/python*/site-packages/*.so*
%exclude %_libdir/python*/site-packages/*.la
# CUPS backend
%_prefix/lib/cups/backend/hp
%_prefix/lib/cups/backend/hpfax
# python
%{_bindir}/hp-align
%{_bindir}/hp-clean
%{_bindir}/hp-colorcal
%{_bindir}/hp-fab
%{_bindir}/hp-firmware
%{_bindir}/hp-info
%{_bindir}/hp-levels
%{_bindir}/hp-makecopies
%{_bindir}/hp-makeuri
%{_bindir}/hp-probe
%{_bindir}/hp-scan
%{_bindir}/hp-sendfax
%{_bindir}/hp-setup
%{_bindir}/hp-testpage
%{_bindir}/hp-timedate
%{_bindir}/hp-unload
# Files
%dir %{_datadir}/hplip
%{_datadir}/hplip/align.py*
%{_datadir}/hplip/clean.py*
%{_datadir}/hplip/colorcal.py*
%{_datadir}/hplip/fab.py*
%{_datadir}/hplip/fax
%{_datadir}/hplip/firmware.py*
%{_datadir}/hplip/hpssd*
%{_datadir}/hplip/info.py*
%{_datadir}/hplip/__init__.py*
%{_datadir}/hplip/levels.py*
%{_datadir}/hplip/makecopies.py*
%{_datadir}/hplip/makeuri.py*
%{_datadir}/hplip/probe.py*
%{_datadir}/hplip/scan.py*
%{_datadir}/hplip/sendfax.py*
%{_datadir}/hplip/setup.py*
%{_datadir}/hplip/testpage.py*
%{_datadir}/hplip/timedate.py*
%{_datadir}/hplip/unload.py*
# Directories
%{_datadir}/hplip/base
%{_datadir}/hplip/copier
%dir %{_datadir}/hplip/data
#%{_datadir}/hplip/data/firmware
%{_datadir}/hplip/data/ldl
%{_datadir}/hplip/data/localization
%{_datadir}/hplip/data/models
%{_datadir}/hplip/data/pcl
%{_datadir}/hplip/data/ps
%{_datadir}/hplip/pcard
%{_datadir}/hplip/prnt
%{_datadir}/hplip/scan
%endif

%if_enabled python_code
%files gui
#_bindir/hp-*
%{_bindir}/hp-print
#%{_bindir}/hp-toolbox.wrapper
%{_bindir}/hp-toolbox
# Files
%{_datadir}/hplip/print.py*
%{_datadir}/hplip/toolbox.py*
# Directories
%{_datadir}/hplip/data/images
%{_datadir}/hplip/plugins
%{_datadir}/hplip/ui
# requires installer
%{_bindir}/hp-check
%{_datadir}/hplip/check.py*
%{_datadir}/hplip/installer

# HPLIP menu files
%if_enabled backportM30_mode
%_menudir/%name
%exclude %_datadir/applications/%name.desktop
%else
%exclude %_menudir/%name
%_datadir/applications/%name.desktop
%endif
%_niconsdir/hplip.png
%_liconsdir/hplip.png
%_miconsdir/hplip.png
%endif

%files common
# HPIP
%_libdir/libhpip*so*
%_libdir/libhpmud*so*
%_sysconfdir/udev/rules.d/*.rules

%files hpijs
#doc prnt/hpijs/COPYING
%doc %_docdir/%hpijsname-%version
%_bindir/%hpijsname
%{_man1dir}/%hpijsname.1*
#HPLIP-PPDS
#%{_datadir}/foomatic/db/source/PPD/HP

%if_enabled sane_backend
# SANE
%files sane
%{_datadir}/hal/fdi/policy/10osvendor/10-hplip.fdi
%_libdir/sane/libsane-hpaio*.so*
%exclude %_libdir/sane/libsane-hpaio*.la
# is it needed?
%{_datadir}/hplip/hpaio.desc
%endif

%if_enabled PPDs
%files PPDs
### TODO !!!!
###%_datadir/cups/model/foomatic-ppds
%_datadir/ppd/HP/*
%else
%_datadir/cups/model/HP-Fax-hplip.ppd*
%endif

%files foomatic
#%doc  %foomaticname/TODO
%doc  %foomaticname/README
%if_with external_foomatic_db
%doc  %foomaticname/{ChangeLog,USAGE}
%endif
%_datadir/foomatic/db/source/driver/*
%_datadir/foomatic/db/source/opt/*
%_datadir/foomatic/db/source/PPD/HP/*
# conflicts with foomatic-db
#%_datadir/foomatic/db/source/printer/*

#TODO 
#*** SANE Backend ***
#SANE - need test with real devices and SANE software
#SANE - merge SuSE trigger on installing sane
#*** FOOMATIC ***
#Update version from linuxprinting at new release (foomatic-db too)
#*** CUPS Backend ***
#[FR] Need to see in cups web interface avalable hplip devices - DONE

%changelog
* Wed Aug 13 2008 Igor Vlasenko <viy@altlinux.ru> 2.7.12-alt2.M40.1
- backport to M40

* Wed Aug 13 2008 Igor Vlasenko <viy@altlinux.ru> 2.7.12-alt3
- applied security fixes (thanks to @inger)
  see https://rhn.redhat.com/errata/RHSA-2008-0818.html

* Thu Apr 10 2008 Igor Vlasenko <viy@altlinux.ru> 2.7.12-alt1.qa1
- NMU (by repocop): the following fixes applied:
 * update_menus for hplip-gui

* Tue Jan 08 2008 Igor Vlasenko <viy@altlinux.ru> 2.7.12-alt1
- new version

* Thu Nov 22 2007 Igor Vlasenko <viy@altlinux.ru> 2.7.10-alt3
- thanks to mithraen@:
  + added provides hplip-tools
  + added Requires: python-module-imaging for hp-scan -n mode

* Wed Nov 07 2007 Igor Vlasenko <viy@altlinux.ru> 2.7.10-alt2
- removed dependency on printer-drivers-utils

* Mon Oct 22 2007 Igor Vlasenko <viy@altlinux.ru> 2.7.10-alt1
- new version

* Sat Sep 29 2007 Igor Vlasenko <viy@altlinux.ru> 2.7.9-alt1
- added security patch (thanks to ldv@)
- new version

* Thu Sep 13 2007 Igor Vlasenko <viy@altlinux.ru> 2.7.7-alt2
- resolved conflict with foomatic-db

* Wed Aug 22 2007 Igor Vlasenko <viy@altlinux.ru> 2.7.7-alt1
- new version
  * Replaced hpiod with the new HP Multi-Point Transport Driver (hpmud).
  * Hpmud is a shared library instead of a daemon.
  * Hpssd is started automatically when needed by HPLIP.
- removed foomatic-db-hpijs snapshots (included upstream)
- removed hp-toolbox.wrapper (hp-toolbox is already fixed)
- removed init script for hpssd 
  (it is is started automatically when needed by HPLIP)
- hplip-tools renamed and rearranged to hplip-gui
- added pam_console support.

* Wed May 16 2007 Igor Vlasenko <viy@altlinux.ru> 1.7.4a-alt1
- new version
- foomatic-db-hpijs snapshot 20070516

* Mon Apr 02 2007 Igor Vlasenko <viy@altlinux.ru> 1.7.3-alt1
- new version
- new foomatic snapshot 20070327 

* Thu Mar 01 2007 Igor Vlasenko <viy@altlinux.ru> 1.7.2-alt1
- new version

* Wed Feb 28 2007 Igor Vlasenko <viy@altlinux.ru> 1.7.1-alt2
- foomatic-db-hpijs snapshot 20070227

* Thu Jan 25 2007 Igor Vlasenko <viy@altlinux.ru> 1.7.1-alt1
- new version

* Thu Jan 18 2007 Igor Vlasenko <viy@altlinux.ru> 1.6.12-alt5
- foomatic_snapshot updated to 20070117
- fixes for x86_64 (thanks to Dmitriy Khanzhin - dimajin-sandy.ru)

* Tue Jan 02 2007 Igor Vlasenko <viy@altlinux.ru> 1.6.12-alt4
- PPDs are moved to separate package
- removed .desktop (menu is used again due to Configuration/Printing)

* Tue Jan 02 2007 Igor Vlasenko <viy@altlinux.ru> 1.6.12-alt3
- spec cleanup -- removed manual links as they are already created

* Mon Jan 01 2007 Igor Vlasenko <viy@altlinux.ru> 1.6.12-alt0.M30.1
- backport for M30

* Mon Jan 01 2007 Igor Vlasenko <viy@altlinux.ru> 1.6.12-alt2
- enabled PPDs by default (some hplip tools do require them)
- hplip initscript merge

* Sat Dec 23 2006 Igor Vlasenko <viy@altlinux.ru> 1.6.12-alt1
- new version
- spec cleanup
- removed menu (now .desktop is used)

* Sat Nov 11 2006 Igor Vlasenko <viy@altlinux.ru> 1.6.10-alt1
- new version
- new foomatic snapshot 20061109

* Sat Sep 23 2006 Igor Vlasenko <viy@altlinux.ru> 1.6.9-alt1
- new version
- new foomatic snapshot 20060922 

* Fri Sep 08 2006 Igor Vlasenko <viy@altlinux.ru> 1.6.7-alt2
- new foomatic snapshot 20060906 

* Tue Sep 05 2006 Igor Vlasenko <viy@altlinux.ru> 1.6.7-alt1
- new version

* Fri Aug 25 2006 Igor Vlasenko <viy@altlinux.ru> 1.6.6a-alt0.M30.4.1
- backport for M30

* Mon Aug 07 2006 Igor Vlasenko <viy@altlinux.ru> 1.6.6a-alt4
- set default url viewer to url_handler.sh
  (hplip-1.6.6a-alt-urlhandler.patch)

* Thu Aug 03 2006 Igor Vlasenko <viy@altlinux.ru> 1.6.6a-alt3
- all python code moved to package hplip-tools
- BuildRequires python-devel according to python policy
- added hpfax cups backend
- added build of ppds (disabled)
- OpenSuSE experience partially integrated
- fedora experience partially integrated

* Sun Jul 30 2006 Igor Vlasenko <viy@altlinux.ru> 1.6.6a-alt2
- libhpip moved to package common --- this eliminates 
  printing system dependency on python.

* Thu Jul 27 2006 Igor Vlasenko <viy@altlinux.ru> 1.6.6a-alt1
- new fresh versions of hplip, hpijs, foomatic-db-hpijs
- build for Sisyphus

* Fri Jul 21 2006 Igor Vlasenko <viy@altlinux.ru> 1.6.6a-alt0
- build for Daedalus 

* Wed Jul 12 2006 Igor Vlasenko <viy@altlinux.ru> 1.6.6a-alt0.M30.1
- new fresh versions of hplip, hpijs, foomatic-db-hpijs
- backport for M30

* Fri Dec 02 2005 ALT QA Team Robot <qa-robot@altlinux.org> 0.9.4-alt3.1
- rebuild with libnetsnmp.so.9 .

* Mon Sep 19 2005 Serge A. Volkov <vserge at altlinux.ru> 0.9.4-alt3
- update initscript (add --displayname)
- Add Requires to package service-0.5.9-alt1
- Fix absolute symlinks (#7984)
- Update Buildreq

* Fri Sep 09 2005 Serge A. Volkov <vserge at altlinux.ru> 0.9.4-alt2.2
- Correct SANE backend scripts and etc

* Sun Sep 04 2005 Serge A. Volkov <vserge at altlinux.ru> 0.9.4-alt2.1
- Update foomatic version to new snapshot at 20050903
- Add Provides: foomatic-db-hpijs = %fooversion-%foomatic_snapshot
- Add PreReq: cups

* Sun Sep 04 2005 Serge A. Volkov <vserge at altlinux.ru> 0.9.4-alt2
- FIX (thanks Dmitry Vukolov)
  + mistake in "Provides hplip-hpijs-%%hpijsversion"
  + Provides/Obsoletes in hplip-foomatic
  + PreReq in hplip-foomatic
  + remove automatic requirements to gcc-g77
  + correct descriptions
  + correct mistake in hplip.desktop
  + correct hplip.menu (change title, section and add icons)

* Mon Aug 22 2005 Serge A. Volkov <vserge at altlinux.ru> 0.9.4-alt1
- Initscript fix hack
- Replace #!/usr/bin/env python  by the #!/usr/bin/python

* Thu Aug 18 2005 Serge A. Volkov <vserge at altlinux.ru> 0.9.4-alt0.2
- Init script cleanup
- Local hack in initscript for work hpssd.py from it (start, stop, status) 

* Mon Aug 08 2005 Serge A. Volkov <vserge at altlinux.ru> 0.9.4-alt0.1
- Update to new version 0.9.4
- Create link %_bindir/hp-* to %_datadir/%name/*

* Tue May 31 2005 Serge A. Volkov <vserge at altlinux.ru> 0.9.3-alt0.2
- FIX rpm conflicts with hpijs <= 2.0

* Sun May 29 2005 Serge A. Volkov <vserge at altlinux.ru> 0.9.3-alt0.1
- Update to new version 0.9.3
- Add variable %%hplip_minor

* Thu May 19 2005 Serge A. Volkov <vserge at altlinux.ru> 0.9.2-alt4
- Correct python builds
- Update BuildRequires and spec cleanup
- Add menu files
- Add correct QTDIR

* Sat May 14 2005 Serge A. Volkov <vserge at altlinux.ru> 0.9.2-alt3
- SPEC cleanup
- Add Requires to python-module-PyQt

* Fri May 13 2005 Serge A. Volkov <vserge at altlinux.ru> 0.9.2-alt2
- Add initial hplip.init for ALT Linux Sisyphus

* Mon May 09 2005 Serge A. Volkov <vserge at altlinux.ru> 0.9.2-alt1
- Update 
  - to new version HPLIP 0.9.2
  - version of hpijs componets to 2.1.2
  - Build Requires
  - spec according spec from Mandrake (Mandriva) linux
- Add conflicts with hpijs < 2.0
- Spec clean up
- Remove all patches
- Correct license
- Devide four packages hplip, hplip-hpijs, hplip-sane, hplip-foomatic

* Mon May 09 2005 Serge A. Volkov <vserge at altlinux.ru> 0.9.1-alt2
- Update to new foomatic-db-hpijs snapshot 20050508 (v.1.5)

* Mon Apr 18 2005 Serge A. Volkov <vserge at altlinux.ru> 0.9.1-alt1
- Update to new version 0.9.1
- Disable
  - patch1
  - buils with SANE
- Add patch from MDK package: hplip-0.9.1-HP-DeskJet_450-Battery.patch

* Sun Jan 09 2005 Serge A. Volkov <vserge at altlinux.ru> 0.8.4-alt1
- Add patch from Debian
- Initial release