From e4648fa0663970c3a5637e0bd9456dc91b453b9b Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Jan 23 2012 13:23:11 +0000 Subject: Initial RPM spec file. --- diff --git a/.gitignore b/.gitignore index e69de29..5e4b25c 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pkpgcounter-3.50.tar.gz diff --git a/pkpgcounter.spec b/pkpgcounter.spec new file mode 100644 index 0000000..17ae14f --- /dev/null +++ b/pkpgcounter.spec @@ -0,0 +1,55 @@ +Summary: Computes number of pages or quantity of ink needed to print documents +Name: pkpgcounter +Version: 3.50 +Release: 1%{?dist} +License: GPLv3+ +URL: http://www.pykota.com/software/pkpgcounter +Source0: http://www.pykota.com/software/pkpgcounter/download/tarballs/pkpgcounter-%{version}.tar.gz +Group: Applications/System + +BuildArch: noarch +BuildRequires: python2-devel +BuildRequires: python-imaging +Requires: python-imaging +Requires: ghostscript + +%description +pkpgcounter parses files and outputs the number of pages needed to print them. +It can also, for certain file formats, compute the percentage of ink colors +covering each page. It currently recognizes almost 20 Page Description Languages +or file formats, including the most used ones like Postscript, PDF, +the PCL family, DVI, OpenDocument, or even Microsoft Word, corresponding to +hundreds of different printer drivers. This utility and Python library is often +used as the PDL parsing engine in print accounting software like PyKota or +JASMine, but can of course be used independently. + +%prep +%setup -q + +iconv -f iso-8859-1 -t utf-8 -o NEWS.tmp NEWS && mv NEWS.tmp NEWS +iconv -f iso-8859-1 -t utf-8 -o CREDITS.tmp CREDITS && mv CREDITS.tmp CREDITS + +# Remove shebang /usr/bin/env python +for file in pkpgpdls/*.py; do + sed -i '/\/usr\/bin\/env/d' ${file} +done + + +%build +%{__python} setup.py build + +%install +%{__python} setup.py install --skip-build --root %{buildroot} +rm -rf %{buildroot}%{_docdir}/pkpgcounter + + +%files +%doc BUGS COPYING CREDITS NEWS README +%{python_sitelib}/pkpgpdls +%{python_sitelib}/pkpgcounter*.egg-info +%{_bindir}/pkpgcounter +%{_mandir}/man1/pkpgcounter.1.gz + +%changelog +* Mon Jan 09 2012 Jiri Popelka 3.50-1 +- Initial RPM spec file. diff --git a/sources b/sources index e69de29..89995f9 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +564dd96e8a5433564c2e39319e65217e pkpgcounter-3.50.tar.gz