Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37525468
en ru br
ALT Linux repos
S:4.0.20230906-alt1
5.0: 3.0.2.20081126-alt9
4.1: 3.0.2.20081126-alt8.M41.1
4.0: 3.0.2-alt6.20071012
+backports:3.0.2.20081126-alt8.M40.1
3.0: 3.0.2-alt1.20050404

Group :: Publishing
RPM: foomatic-db

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define snapshot 20081126

Packager: Stanislav Ievlev <inger at altlinux.org>

Name: foomatic-db
Version: 3.0.2.%snapshot
Release: alt8.M40.1

Summary: Foomatic printer database
License: GPL
Group: Publishing

BuildArch: noarch

Url: http://www.openprinting.org

# foomatic-db includes foomatic-db-hpijs (exept for hpijs junk in db/source)

Provides: foomatic-db-hpijs = %version-%release
Provides: hplip-foomatic = 2.8.0
Obsoletes: hplip-foomatic < 2.8.0
# enable hpijs junk in db/source; do we really need them?
%def_enable hpijs

Source0: http://www.openprinting.org/download/foomatic/%name-%version.tar
%if_enabled hpijs
Source1: http://www.openprinting.org/download/foomatic/%name-hpijs-%version.tar
%endif

# sync with SuSE cups-drivers-1.3.9-2.10.src.rpm

Patch0: cups-drivers-1.1.23-stcolor.patch
Patch1: cups-drivers-1.3.8-A4.patch
Patch2: cups-drivers-1.3.8-hl7x0_language.patch
Patch5: cups-drivers-1.3.8-samsunggdi.patch

PreReq: foomatic-db-engine >= %version

#we need foomatic-kitload during install

BuildPreReq: foomatic-db-engine cups >= 1.2.1

# Automatically added by buildreq on Fri May 26 2006 (-bi)

BuildRequires: cups foomatic-db-engine

%description
This package is the Foomatic database, an XML database containing
information about the capabilities of near 1000 printers and around
250 drivers. Especially it contains the information how and with which
options the drivers have to be executed.

The site http://www.linuxprinting.org/ is based in this database.

%prep
%if_enabled hpijs
%setup -q -a1
%else
%setup -q
%endif
%patch0 -p2
%patch1 -p2
%patch2 -p2
%patch5 -p2

%build
./make_configure
%configure --disable-gzip-ppds


# Delete drivers with empty command line prototype, they would give

# unusable printer/driver combos.
FOOMATICDB=`pwd` %_sbindir/foomatic-cleanupdrivers

%if_enabled hpijs
pushd foomatic-db-hpijs-%version
./make_configure
%configure --disable-gzip-ppds
make
popd
%endif

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

%if_enabled hpijs
pushd foomatic-db-hpijs-%version
%make DESTDIR=$RPM_BUILD_ROOT install
popd
%endif

#force A4

find %buildroot/%_datadir/%name/model -name "*.ppd" -print0 |
xargs -r0 perl -pi -e 's:^(\*Default.*)Letter\s*$:$1A4\n:; \
s:^(\*ImageableArea A4.*\:\s+)"0 0 595 842":$1"24 48 571 818":; \
s:^(\*ImageableArea Letter.*\:\s+)"0 0 612 792":$1"24 48 588 768":; \
s:\s\n:\n:'

%files
%doc README USAGE ChangeLog
%_datadir/foomatic
%_datadir/cups/model/foomatic-db-ppds

#not found in tarball

#%exclude %_datadir/foomatic/db/source/PPD/*.sh

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin