f1318bc
Name:           pdfarranger
6c958ae
Version:        1.5.1
12b6241
Release:        1%{?dist}
f1318bc
Summary:        PDF file merging, rearranging, and splitting
f1318bc
f1318bc
License:        GPLv3
f1318bc
URL:            https://github.com/jeromerobert/%{name}
f1318bc
Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
f1318bc
BuildArch:      noarch
f1318bc
f1318bc
BuildRequires:  python3-devel
f1318bc
BuildRequires:  python3-distutils-extra
f1318bc
BuildRequires:  python3-wheel
f1318bc
BuildRequires:  python3-pip
f1318bc
f1318bc
# For checks only
f1318bc
BuildRequires:  libappstream-glib
f1318bc
BuildRequires:  desktop-file-utils
f1318bc
12b6241
Requires:       python3-pikepdf
f1318bc
f1318bc
# These seem to be included in the default desktop install
f1318bc
Requires:       python3-gobject
f1318bc
Requires:       gtk3
f1318bc
Requires:       python3-cairo
523c5ca
Requires:       poppler-glib
f1318bc
6ece3fa
%if 0%{?fedora} > 31
6ece3fa
# replace pdfshuffler for Fedora 32+ since it is python2 only (#1738935)
6ece3fa
Provides:       pdfshuffler = %{version}-%{release}
6ece3fa
# Current pdfshuffler is 0.6.0-17. I obsolete everything < 0.6.1 here
6ece3fa
# because there might be new releases but they won't add python3 support.
6ece3fa
Obsoletes:      pdfshuffler < 0.6.1-1
6ece3fa
%endif
6ece3fa
8b20eea
%global app_id com.github.jeromerobert.pdfarranger
f1318bc
%global python3_wheelname %{name}-%{version}-py3-none-any.whl
f1318bc
f1318bc
%description
f1318bc
pdfarranger is a small Python GTK application, which helps the user to merge 
f1318bc
or split PDF documents and rotate, crop and rearrange their pages using an 
f1318bc
interactive and intuitive graphical interface. It is a front end for 
f1318bc
python-PyPDF2.
f1318bc
pdfarranger is a fork of Konstantinos Poulios's PDF-Shuffler.
f1318bc
f1318bc
%prep
f1318bc
%autosetup -n %{name}-%{version}
f1318bc
523c5ca
# py3_build / py3_install do not work with this setup.py but building
523c5ca
# a wheel works just fine
f1318bc
%build
f1318bc
%py3_build_wheel
f1318bc
f1318bc
%install
f1318bc
%py3_install_wheel %{python3_wheelname}
f1318bc
%find_lang %{name}
6ece3fa
%if 0%{?fedora} > 31
6ece3fa
ln -s %{_bindir}/pdfarranger %{buildroot}%{_bindir}/pdfshuffler
6ece3fa
%endif
f1318bc
f1318bc
%check
8b20eea
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{app_id}.desktop
8b20eea
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml
f1318bc
f1318bc
%files -f %{name}.lang
f1318bc
%license COPYING
f1318bc
%doc README.md
f1318bc
%{python3_sitelib}/%{name}/
f1318bc
%{python3_sitelib}/%{name}-%{version}.dist-info/
f1318bc
%{_mandir}/man*/*.*
8b20eea
%{_datadir}/icons/hicolor/*/apps/%{app_id}.*
8b20eea
%{_metainfodir}/%{app_id}.metainfo.xml
8b20eea
%{_datadir}/applications/%{app_id}.desktop
f1318bc
%{_datadir}/%{name}/
f1318bc
%{_bindir}/pdfarranger
6ece3fa
%if 0%{?fedora} > 31
6ece3fa
%{_bindir}/pdfshuffler
6ece3fa
%endif
f1318bc
f1318bc
%changelog
6c958ae
* Mon Apr 20 2020 David Auer <dreua@posteo.de> - 1.5.1-1
6c958ae
- Update to 1.5.1 (#1823971)
6c958ae
- Fixes rhbz#1824017
6c958ae
8b20eea
* Wed Apr 15 2020 David Auer <dreua@posteo.de> - 1.5.0-1
8b20eea
- Update to 1.5.0 (#1823971)
8b20eea
17e6d42
* Tue Mar 17 2020 Fabian Affolter <mail@fabian-affolter.ch> - 1.4.2-1
17e6d42
- Update to new upstream version 1.4.2 (rhbz#1814032)
17e6d42
Fedora Release Monitoring 350a72f
* Sun Feb 09 2020 Fedora Release Monitoring <release-monitoring@fedoraproject.org> - 1.4.1-1
Fedora Release Monitoring 350a72f
- Update to 1.4.1 (#1800993)
Fedora Release Monitoring 350a72f
12b6241
* Sat Feb 01 2020 David Auer <dreua@posteo.de> - 1.4.0-1
12b6241
- New version, see https://github.com/jeromerobert/pdfarranger/releases/tag/1.4.0
12b6241
- Replace python3-PyPDF2 with python3-pikepdf
12b6241
5b3073d
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-3
5b3073d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
5b3073d
6ece3fa
* Wed Sep 25 2019 David Auer <dreua@posteo.de> - 1.3.1-2
6ece3fa
- replace pdfshuffler on f32+
6ece3fa
2b6a12f
* Sun Sep 22 2019 David Auer <dreua@posteo.de> - 1.3.1-1
2b6a12f
- New version, see https://github.com/jeromerobert/pdfarranger/releases/tag/1.3.1
2b6a12f
523c5ca
* Wed Sep 11 2019 David Auer <dreua@posteo.de> - 1.3.0-2
523c5ca
- Add missing dependency
523c5ca
- Remove unnecessary python_provide makro
523c5ca
f1318bc
* Sun Aug 11 2019 David Auer <dreua@posteo.de> - 1.3.0-1
f1318bc
- New version, see https://github.com/jeromerobert/pdfarranger/releases/tag/1.3.0
523c5ca
- Remove obsolete downstream fixes 
f1318bc
f1318bc
* Tue Jun 11 2019 David Auer <dreua@posteo.de> - 1.2.1-8
f1318bc
- Better source URL
f1318bc
f1318bc
* Mon May 20 2019 David Auer <dreua@posteo.de> - 1.2.1-7
f1318bc
- Fix directory ownership
f1318bc
- Replace obsolete srcname by name
f1318bc
f1318bc
* Mon May 20 2019 David Auer <dreua@posteo.de> - 1.2.1-6
f1318bc
- Name changed from python-pdfarranger to pdfarranger
f1318bc
- Remove shebang in __main__.py
f1318bc
f1318bc
* Sat May 18 2019 David Auer <dreua@posteo.de> - 1.2.1-5
f1318bc
- Fix rpmlint errors and warnings
f1318bc
f1318bc
* Sat May 18 2019 David Auer <dreua@posteo.de> - 1.2.1-4
f1318bc
- Buiding with wheel to get lang and icons right
f1318bc
f1318bc
* Sat May 18 2019 David Auer <dreua@posteo.de> - 1.2.1-3
f1318bc
- Move Requires to the right location
f1318bc
f1318bc
* Sat May 18 2019 David Auer <dreua@posteo.de> - 1.2.1-2
f1318bc
- Add missing requires
f1318bc
f1318bc
* Sat May 18 2019 David Auer <dreua@posteo.de> - 1.2.1
f1318bc
- Packaging pdfarranger based on pdfshuffler's spec file and https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_example_python_spec_file
f1318bc
f1318bc