417bd7b
# spec file for package pdf-stapler
417bd7b
#
2ec3059
%global commit 875325103234b4a3ed96a4a5167ff78c291edbff
2ec3059
%global shortcommit %(c=%{commit}; echo ${c:0:7})
2ec3059
%global commitdate 20191215
417bd7b
8f4c8d0
%global _description %{expand:
417bd7b
pdf-stapler is the Fedora package for stapler, the opensource python
417bd7b
project which provides a commandline tool that staples, deletes,
417bd7b
concatenates and shuffles documents in the Portable Document Format
417bd7b
(PDF). It is an alternative to PDFtk.
417bd7b
417bd7b
From the project git page:
417bd7b
417bd7b
Philip Stark found pypdf, a PDF library written in pure Python. He
417bd7b
couldn't find a tool which actually used the library, so he started 
417bd7b
writing his own.
417bd7b
417bd7b
This version of stapler is Fred Wenzel's fork of the project, with
8f4c8d0
a completely refactored source code, tests, and added functionality.}
8f4c8d0
8f4c8d0
8f4c8d0
Name:           pdf-stapler
8f4c8d0
Version:        1.0.0
eea931d
Release:        0.19.%{commitdate}git%{shortcommit}%{?dist}
8f4c8d0
Summary:        Tool for manipulating PDF documents from the command line
fce650b
License:        BSD-3-Clause
8f4c8d0
URL:            https://github.com/hellerbarde/stapler
8f4c8d0
Source0:        https://github.com/hellerbarde/stapler/archive/stapler-%{commit}.tar.gz
8f4c8d0
BuildArch:      noarch
8f4c8d0
BuildRequires:  python3-devel
8f4c8d0
Requires:       python3-staplelib = %{version}-%{release}
8f4c8d0
8f4c8d0
%description %_description
417bd7b
fce650b
58c9b13
%package -n python3-staplelib
ae61305
Summary:        Module staplelib of pdf-stapler
58c9b13
Requires:       python3-PyPDF2
ae61305
8f4c8d0
%description -n python3-staplelib %_description
417bd7b
fce650b
417bd7b
%prep
8f4c8d0
%autosetup -n stapler-%{commit}
417bd7b
sed -i 's|"PyPDF2>=1.24"||' setup.py
75eef2e
# Remove upper limit from more-itertools
75eef2e
# https://github.com/hellerbarde/stapler/issues/71
75eef2e
sed -i 's|"more-itertools>=2.2,<6.0.0"|"more-itertools>=2.2"|' setup.py
8f4c8d0
# Remove shebangs from modules
8f4c8d0
sed -i -e '/^#!/d' staplelib/*.py
8f4c8d0
8f4c8d0
8f4c8d0
%generate_buildrequires
8f4c8d0
%pyproject_buildrequires -t
8f4c8d0
8f4c8d0
417bd7b
%build
8f4c8d0
%pyproject_wheel
417bd7b
417bd7b
417bd7b
%install
8f4c8d0
%pyproject_install
417bd7b
# Fedora already has a stapler package so this "stapler" package is renamed
417bd7b
# pdf-stapler
8f4c8d0
rm %{buildroot}%{_bindir}/stapler
8f4c8d0
%pyproject_save_files staplelib
417bd7b
417bd7b
8f4c8d0
%check
8f4c8d0
%tox
8f4c8d0
8f4c8d0
8f4c8d0
%files -n %{name}
8f4c8d0
%{_bindir}/pdf-stapler
8f4c8d0
8f4c8d0
%files -n python3-staplelib -f %{pyproject_files}
8f4c8d0
%doc README.rst
ae61305
%license LICENSE
ae61305
fce650b
417bd7b
%changelog
eea931d
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-0.19.20191215git8753251
eea931d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
eea931d
28d8891
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-0.18.20191215git8753251
28d8891
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
28d8891
bbf2de2
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-0.17.20191215git8753251
bbf2de2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
bbf2de2
1f13a1e
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 1.0.0-0.16.20191215git8753251
1f13a1e
- Rebuilt for Python 3.12
1f13a1e
fce650b
* Sat May 06 2023 Sandro <devel@penguinpee.nl> - 1.0.0-0.15.20191215git8753251
fce650b
- Migrate to SPDX license
fce650b
8f4c8d0
* Sat May 06 2023 Sandro <devel@penguinpee.nl> - 1.0.0-0.14.20191215git8753251
8f4c8d0
- Use Python macros in spec file
8f4c8d0
4e552c9
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-0.13.20191215git8753251
4e552c9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
4e552c9
12ae462
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-0.12.20191215git8753251
12ae462
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
12ae462
8d9c11e
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.0.0-0.11.20191215git8753251
8d9c11e
- Rebuilt for Python 3.11
8d9c11e
e12ad0b
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-0.10.20191215git8753251
e12ad0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
e12ad0b
f77bbef
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-0.9.20191215git8753251
f77bbef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
f77bbef
1c2b305
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.0.0-0.8.20191215git8753251
1c2b305
- Rebuilt for Python 3.10
1c2b305
fff4ce0
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-0.7.20191215git8753251
fff4ce0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
fff4ce0
17481b4
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-0.6.20191215git8753251
17481b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
17481b4
907b790
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-0.5.20191215git8753251
907b790
- Rebuilt for Python 3.9
907b790
75eef2e
* Sat Mar 21 2020 Lumír Balhar <lbalhar@redhat.com> - 1.0.0-0.4.20191215git8753251
75eef2e
- Remove upper limit from more-itertools dependency
75eef2e
Fixes: rhbz#1812845
75eef2e
7cbbde6
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-0.3.20191215git8753251
7cbbde6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
7cbbde6
2ec3059
* Sat Dec 28 2019 aarem AT fedoraproject DOT org - 1.0.0-1
2ec3059
- Minor updates to specfile 
2ec3059
* Thu Dec 26 2019 aarem AT fedoraproject DOT org - 1.0.0-1
2ec3059
- Rebuilt for python3
2ec3059
2ec3059
58c9b13
* Thu Dec 26 2019 aarem AT fedoraproject DOT org - 1.0.0-1
58c9b13
- Rebuilt for python3, added PKG-INFO.
65255cc
14137a7
* Mon Mar 26 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.3.3-12
14137a7
- Update Python 2 dependency declarations to new packaging standards
14137a7
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
14137a7
1f1072b
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-11
1f1072b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
1f1072b
533ffc0
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-10
533ffc0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
533ffc0
5333422
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-9
5333422
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
5333422
ae61305
* Wed Oct 05 2016 aarem AT fedoraproject DOT org - 0.3.3-8
ae61305
- applied patch supplied by Raphael Groner
ae61305
ae61305
* Fri Jun 03 2016 Raphael Groner <projects.rg@smart.ms> - 0.3.3-7
ae61305
- split module into subpackage, rhbz#1337605
c36a341
54690b5
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-6
54690b5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
54690b5
417bd7b
* Sun Dec 20 2015 aarem AT fedoraproject DOT org - 0.3.3-5
417bd7b
- made changes as per Zbigniew Jędrzejewski-Szmek
417bd7b
1. corrected macro signs in changelog to represent that these are comments.
417bd7b
2. Provided explicit Provides: in packaging
417bd7b
417bd7b
* Sun Dec 20 2015 aarem AT fedoraproject DOT org - 0.3.3-4
417bd7b
- made changes as per Zbigniew Jędrzejewski-Szmek
417bd7b
  1. changed build and install statements
417bd7b
  2. reduced description
417bd7b
417bd7b
* Mon Dec 14 2015 aarem AT fedoraproject DOT org - 0.3.3-3
417bd7b
- made changes to packaging as per Parag AN:
417bd7b
  1. changed %%{__python} to  %%{__python_macros}
417bd7b
  2. increased release number
417bd7b
  3. reduced changelog entry to be less than 80 characters per line
417bd7b
  4. added comment on why pdf-stapler is not named stapler
417bd7b
417bd7b
* Fri Dec 11 2015 aarem AT fedoraproject DOT org - 0.3.3-2
417bd7b
- initial repackaging to include README, and PKG-INFO in documentation
417bd7b
417bd7b
* Thu Sep 24 2015 aarem AT fedoraproject DOT org - 0.3.3-1
417bd7b
- initial packaging of 0.3.3 version