Blob Blame History Raw
# spec file for package pdf-stapler
#

Name:           pdf-stapler
Version:        0.3.3
Release:        12%{?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:  python2-setuptools
Requires:       python2-staplelib = %{version}-%{release}

%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.

%package -n python2-staplelib
Summary:        Module staplelib of pdf-stapler
Requires:       python2-PyPDF2
%{?python_provide:%python_provide python2-staplelib}

%description -n python2-staplelib
%{summary}.

%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}
%doc README.rst PKG-INFO
%license LICENSE

%files -n python2-staplelib
%{python2_sitelib}/stapler-%{version}*.egg-info
%{python2_sitelib}/staplelib/
%license LICENSE

%changelog
* Mon Mar 26 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.3.3-12
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Wed Oct 05 2016 aarem AT fedoraproject DOT org - 0.3.3-8
- applied patch supplied by Raphael Groner

* Fri Jun 03 2016 Raphael Groner <projects.rg@smart.ms> - 0.3.3-7
- split module into subpackage, rhbz#1337605

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* 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