# spec file for package pdf-stapler
#
Name: pdf-stapler
Version: 0.3.3
Release: 5%{?dist}
Summary: Tool for manipulating PDF documents from the command line
License: BSD
URL: https://github.com/hellerbarde/stapler
Source0: https://pypi.python.org/packages/source/s/stapler/stapler-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
Requires: python-PyPDF2
Provides: python2-staplelib = %{version}-%{release}
%{?python_provide:%python_provide python2-%{srcname}}
%description
pdf-stapler is the Fedora package for stapler, the opensource python
project which provides a commandline tool that staples, deletes,
concatenates and shuffles documents in the Portable Document Format
(PDF). It is an alternative to PDFtk.
From the project git page:
Philip Stark found pypdf, a PDF library written in pure Python. He
couldn't find a tool which actually used the library, so he started
writing his own.
This version of stapler is Fred Wenzel's fork of the project, with
a completely refactored source code, tests, and added functionality.
%prep
%setup -q -n stapler-%{version}
sed -i 's|"PyPDF2>=1.24"||' setup.py
%build
%py2_build
%check
%{__python2} setup.py test
%install
%{py2_install}
mv $RPM_BUILD_ROOT/%{_bindir}/stapler $RPM_BUILD_ROOT/%{_bindir}/%{name}
# Fedora already has a stapler package so this "stapler" package is renamed
# pdf-stapler
%files
%{_bindir}/%{name}
%{python2_sitelib}/stapler-%{version}*.egg-info
%{python2_sitelib}/staplelib
%doc README.rst PKG-INFO
%license LICENSE
%changelog
* Sun Dec 20 2015 aarem AT fedoraproject DOT org - 0.3.3-5
- made changes as per Zbigniew Jędrzejewski-Szmek
1. corrected macro signs in changelog to represent that these are comments.
2. Provided explicit Provides: in packaging
* Sun Dec 20 2015 aarem AT fedoraproject DOT org - 0.3.3-4
- made changes as per Zbigniew Jędrzejewski-Szmek
1. changed build and install statements
2. reduced description
* Mon Dec 14 2015 aarem AT fedoraproject DOT org - 0.3.3-3
- made changes to packaging as per Parag AN:
1. changed %%{__python} to %%{__python_macros}
2. increased release number
3. reduced changelog entry to be less than 80 characters per line
4. added comment on why pdf-stapler is not named stapler
* Fri Dec 11 2015 aarem AT fedoraproject DOT org - 0.3.3-2
- initial repackaging to include README, and PKG-INFO in documentation
* Thu Sep 24 2015 aarem AT fedoraproject DOT org - 0.3.3-1
- initial packaging of 0.3.3 version