File pkpgcounter.spec of Package pkpgcounter

#
# spec file for package pkpgcounter
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name:		pkpgcounter
Version:	3.50.60
%define tver	3.50+
Release:	0
Group:		Hardware/Printing
Summary:	Page Description Language parser
License:	GPL-3.0
URL:		http://pykota.com/software/pkpgcounter/
# There are no public tarballs
#Svn-Clone:	http://svn.pykota.com/pkpgcounter/trunk
# In the openSUSE build service SLE_10 SLE_11 and SLE_11_SP1 do not provide an "xz" package
# so that pkpgcounter-<version>.tar.xz cannot be used instead pkpgcounter-<version>.tar.bz2 is used:
Source:		%name-%tver.tar.bz2
BuildRoot:	%_tmppath/%name-%version-build
BuildRequires:	python-base
BuildRequires:  python-imaging
%py_requires
Requires:	python-imaging

%description
pkpgcounter is a generic Page Description Language parser which can
either count the number of pages or compute the percent of ink
coverage needed to print various types of documents.

It currently recognizes the following file formats:

* PostScript (both DSC compliant and binary)
* PDF
* PCL3/4/5
* PCLXL (aka PCL6)
* DVI
* OpenDocument (ISO/IEC DIS 26300)
* Microsoft Word (c) (tm) (r) (etc...)
* Plain text
* TIFF
* Several other image formats
* ESC/P2
* Zenographics ZjStream
* Samsung QPDL (aka SPL2)
* Samsung SPL1
* ESC/PageS03
* Brother HBP
* Hewlett-Packard Lightweight Imaging Device Interface Language
* Structured Fax
* Canon BJ/BJC
* ASCII PNM (Netpbm)

%prep
%setup -qn %name

%build
python setup.py build;

%install
b="%buildroot";
rm -Rf "$b";
mkdir "$b";
python setup.py install --prefix=%_prefix --root=%buildroot \
	--record-rpm=INSTALLED_FILES;
perl -i -lpe 's{/man\w+/[^/]+$}{$&.gz}m' INSTALLED_FILES;

%files -f INSTALLED_FILES
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by