Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 1bf188a5c5cbabc720d2b59fa273b132 > files > 2

foomatic-db-hpijs-2.1.1-1.20050404.1mdk.src.rpm

%define version 2.1.1
%define releasedate 20050404
%define release 1.%{releasedate}.1mdk

##### RPM PROBLEM WORKAROUNDS

# Suppress automatically generated Requires for Perl libraries.
#define _requires_exceptions perl\(.*\)

#define _unpackaged_files_terminate_build       0 
#define _missing_doc_files_terminate_build      0

##### GENERAL DEFINITIONS

Name:		foomatic-db-hpijs
Version:	%{version}
Release:	%{release}
Summary:        Foomatic data for the HPIJS driver
License:        GPL
Group:          System/Servers
Url:            http://www.linuxprinting.org/
Requires:       foomatic-db, ghostscript, hplip-hpijs
BuildRequires:	ghostscript, hplip-hpijs
BuildArchitectures: noarch

##### BUILDREQUIRES

BuildRequires:	autoconf2.5 automake foomatic-db-engine foomatic-db

##### FOOMATIC SOURCES

Source:		http://www.linuxprinting.org/download/foomatic/foomatic-db-hpijs-%{version}-%{releasedate}.tar.bz2

##### BUILD ROOT

BuildRoot:	%_tmppath/%name-%version-%release-root


##### PACKAGE DESCRIPTIONS

%description
Foomatic is a comprehensive, spooler-independent database of printers,
printer drivers, and driver descriptions. It contains utilities to
generate PPD (Postscript Printer Description) files and printer queues
for CUPS, LPD, GNUlpr, LPRng, PPR, and PDQ using the database. There
is also the possibility to read the PJL options out of PJL-capable
laser printers and take them into account at the driver description
file generation.

There are spooler-independent command line interfaces to manipulate
queues (foomatic-configure) and to print files/manipulate jobs
(foomatic printjob).
 
The site http://www.linuxprinting.org/ is based on this database.

This package contains the Foomatic data needed for HP's HPIJS driver.



%prep
# remove old directory
rm -rf $RPM_BUILD_DIR/%{name}-%{version}-*

##### FOOMATIC

# Source tree for installation
%setup -q -n %{name}-%{version}-%{releasedate}



%build

# Correct the hpijs-printermap file to matvh the actually installed HPIJS
# This changes should make the following test pass

# Bug #14909: HP Deskjet 3745 gets misconfigured
#perl -p -i -e "s/\|deskjet 3740\|/|deskjet 3320|/" data-generators/hpijs/hpijs-printermap

# HP Color LaserJet 35xx and HP LaserJet 101x not supported yet by HPIJS
#perl -p -i -e 's/^(HP-LaserJet_101[02])/\#$1/' data-generators/hpijs/hpijs-printermap
#perl -p -i -e 's/^(HP-Color_LaserJet_35\d\d)/\#$1/' data-generators/hpijs/hpijs-printermap


# Check whether all printers in hpijs-printermap are supported by the
# current HPIJS
cat data-generators/hpijs/hpijs-printermap | grep -v '^\#' | cut -d '|' -f 3 | sort | uniq | perl -p -e 's/\n/\00/sg' > ijsmodels
cat ijsmodels | xargs -0 -t -iXXX gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs  -sDeviceManufacturer="HEWLETT-PACKARD" -sDeviceModel="XXX" -dIjsUseOutputFD -sOutputFile=/dev/null /usr/share/ghostscript/*/examples/alphabet.ps
rm -f ijsmodels

# Makefile generation ("./make_configure" for CVS snapshots)
./make_configure
# Fix for lib64 architectures, avoid patch
perl -pi -e "s@/usr/lib/(cups|pdq|ppr)@%{_libdir}/\1@g" configure
%configure
make

# Remove data for old patched HPIJS 1.2
rm -rf db/source/*/hpijs-rss*.xml

# Delete drivers with empty command line prototype, they would give
# unusable printer/driver combos.
FOOMATICDB=`pwd` %{_sbindir}/foomatic-cleanupdrivers



%install

rm -rf %{buildroot}

# Do not use "make" macro, as parallelized build of Foomatic does not
# work.

# Install data files
make	PREFIX=%{_prefix} \
        DESTDIR=%buildroot \
        install

# Install documentation
install -d %buildroot%{_docdir}/%{name}-%{version}
cp README USAGE TODO ChangeLog \
	%buildroot%{_docdir}/%{name}-%{version}



##### GENERAL STUFF

# Correct permissions for all documentation files
chmod -R a+rX %{buildroot}%{_docdir}
chmod -R go-w %{buildroot}%{_docdir}
chmod -R u+w %{buildroot}%{_docdir}



##### FILES

%files
%defattr(-,root,root)
%docdir %{_docdir}/%{name}-%{version}
%{_docdir}/%{name}-%{version}
%_datadir/foomatic/db/*/*/*.xml


# Correct the default drivers of the printer entries to have a valid
# default for every printer.

#post
#%{_sbindir}/foomatic-preferred-driver > /dev/null 2>&1

#postun
#if [ "$1" -eq "0" ]; then
#    %{_sbindir}/foomatic-preferred-driver > /dev/null 2>&1
#fi

##### CLEAN UP

%clean
rm -rf %{buildroot}

%changelog

* Mon Apr  4 2005 Till Kamppeter <till@mandrakesoft.com> 2.1.1-1.20050404.1mdk
- Updated foomatic-db-hpijs to the state of the 04/04/2005 (updates for 
  HPLIP 0.9.1/HPIJS 2.1.1).

* Wed Mar 30 2005 Till Kamppeter <till@mandrakesoft.com> 2.1-1.20050330.1mdk
- Updated foomatic-db-hpijs to the state of the 30/03/2005 (updates for 
  HPLIP 0.9/HPIJS 2.1).

* Wed Mar 23 2005 Till Kamppeter <till@mandrakesoft.com> 2.0.2-1.20050318.2mdk
- Introduced test for compatibility of the Foomatic data with the actual 
  HPIJS driver
- Fixed bug 14909 of HP DeskJet 37xx having wrong IJS model entry
- Removed data for printers not supported yet (LaserJet 101x, Color LaserJet
  35xx).

* Thu Mar 17 2005 Till Kamppeter <till@mandrakesoft.com> 2.0.2-1.20050318.1mdk
- Updated foomatic-db to the state of the 18/03/2005 (New printers: HP
  DskJet 6600, 9800, fixed paper tray selection for the Business Inkjets).

* Tue Feb  8 2005 Till Kamppeter <till@mandrakesoft.com> 2.0.0-1.20050128.2mdk
- Deactivated pre/post-install scripts.

* Fri Feb  4 2005 Till Kamppeter <till@mandrakesoft.com> 2.0.0-1.20050128.1mdk
- Updated foomatic-db to the state of the 28/01/2005.