e4648fa
Summary: Computes number of pages or quantity of ink needed to print documents
e4648fa
Name:    pkpgcounter
e4648fa
Version: 3.50
86c0804
Release: 15%{?dist}
e4648fa
License: GPLv3+
e4648fa
URL:     http://www.pykota.com/software/pkpgcounter
e4648fa
Source0: http://www.pykota.com/software/pkpgcounter/download/tarballs/pkpgcounter-%{version}.tar.gz
7947b50
Patch0:  pkpgcounter-postscript-multiple-copies.patch
e4648fa
e4648fa
BuildArch:     noarch
e4648fa
BuildRequires: python2-devel
c94585c
BuildRequires: python2-imaging
c94585c
Requires:      python2-imaging
e4648fa
Requires:      ghostscript
e4648fa
e4648fa
%description
e4648fa
pkpgcounter parses files and outputs the number of pages needed to print them.
e4648fa
It can also, for certain file formats, compute the percentage of ink colors
e4648fa
covering each page. It currently recognizes almost 20 Page Description Languages
e4648fa
or file formats, including the most used ones like Postscript, PDF,
e4648fa
the PCL family, DVI, OpenDocument, or even Microsoft Word, corresponding to
e4648fa
hundreds of different printer drivers. This utility and Python library is often
e4648fa
used as the PDL parsing engine in print accounting software like PyKota or
e4648fa
JASMine, but can of course be used independently.
e4648fa
e4648fa
%prep
e4648fa
%setup -q
e4648fa
7947b50
# This change corrects the page count of postscript files when printed
7947b50
# with multiple copies from the MS Office suite. Without this patch, every time
7947b50
# that a user try to print a job using multiple copies from MS office it counts
7947b50
# much more than the correct quantity of copies.
7947b50
%patch0 -p1 -b .multiple_copies
7947b50
e4648fa
iconv -f iso-8859-1 -t utf-8 -o NEWS.tmp NEWS && mv NEWS.tmp NEWS
e4648fa
iconv -f iso-8859-1 -t utf-8 -o CREDITS.tmp CREDITS && mv CREDITS.tmp CREDITS
e4648fa
e4648fa
# Remove shebang /usr/bin/env python
e4648fa
for file in pkpgpdls/*.py; do
e4648fa
    sed -i '/\/usr\/bin\/env/d' ${file}
e4648fa
done
e4648fa
e4648fa
e4648fa
%build
1ec148e
%py2_build
e4648fa
e4648fa
%install
1ec148e
%py2_install
e4648fa
rm -rf %{buildroot}%{_docdir}/pkpgcounter
e4648fa
e4648fa
e4648fa
%files
e4648fa
%doc BUGS COPYING CREDITS NEWS README
e4648fa
%{python_sitelib}/pkpgpdls
e4648fa
%{python_sitelib}/pkpgcounter*.egg-info
e4648fa
%{_bindir}/pkpgcounter
e4648fa
%{_mandir}/man1/pkpgcounter.1.gz
e4648fa
e4648fa
%changelog
86c0804
* Fri Feb 09 2018 Zdenek Dohnal <zdohnal@redhat.com> - 3.50-15
86c0804
- removing old stuff
86c0804
17252ea
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.50-14
17252ea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
17252ea
c94585c
* Wed Feb 07 2018 Iryna Shcherbina <ishcherb@redhat.com> - 3.50-13
c94585c
- Update Python 2 dependency declarations to new packaging standards
c94585c
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
c94585c
78ce66a
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.50-12
78ce66a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
78ce66a
b7b8b01
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.50-11
b7b8b01
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
b7b8b01
7f3d8e7
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.50-10
7f3d8e7
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
7f3d8e7
bbd7d65
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.50-9
bbd7d65
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
bbd7d65
1ec148e
* Tue Aug 11 2015 Jiri Popelka <jpopelka@redhat.com> - 3.50-8
1ec148e
- %%py2_build && %%py2_install
1ec148e
db3a361
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.50-7
db3a361
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
db3a361
8edf54e
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.50-6
8edf54e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8edf54e
755d112
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.50-5
755d112
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
755d112
22e6968
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.50-4
22e6968
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
22e6968
7947b50
* Sat Sep 01 2012 Jiri Popelka <jpopelka@redhat.com> 3.50-3
7947b50
- Correct page count of postscript files when printed
7947b50
  with multiple copies from the MS Office (#852410)
7947b50
5cd0faa
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.50-2
5cd0faa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
5cd0faa
e4648fa
* Mon Jan 09 2012 Jiri Popelka <jpopelka@redhat.com> 3.50-1
e4648fa
- Initial RPM spec file.