[pkpgcounter/el6] Initial RPM spec file.

Jiří Popelka jpopelka at fedoraproject.org
Mon Jan 23 13:54:15 UTC 2012


commit c15a522341967365d2fdc1e1315ec4e77474c208
Author: Jiri Popelka <jpopelka at redhat.com>
Date:   Mon Jan 23 14:49:33 2012 +0100

    Initial RPM spec file.

 .gitignore       |    1 +
 pkpgcounter.spec |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources          |    1 +
 3 files changed, 62 insertions(+), 0 deletions(-)
---
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..9e6c182
--- /dev/null
+++ b/pkpgcounter.spec
@@ -0,0 +1,60 @@
+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
+
+BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:     noarch
+BuildRequires: python-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
+rm -rf %{buildroot}
+%{__python} setup.py install --skip-build --root %{buildroot}
+rm -rf %{buildroot}%{_docdir}/pkpgcounter
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%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 <jpopelka at redhat.com> 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


More information about the scm-commits mailing list