|
|
bceae89 |
%global srcname paperwork
|
|
|
bceae89 |
|
|
|
bceae89 |
Name: %{srcname}
|
|
|
bceae89 |
Version: 1.2.4
|
|
|
9cc4039 |
Release: 3%{?dist}
|
|
|
bceae89 |
Summary: Using scanner and OCR to grep dead trees the easy way
|
|
|
bceae89 |
|
|
|
bceae89 |
License: GPLv3+
|
|
|
bceae89 |
URL: https://github.com/openpaperwork/paperwork
|
|
|
bceae89 |
Source0: %pypi_source
|
|
|
bceae89 |
# https://gitlab.gnome.org/World/OpenPaperwork/paperwork/merge_requests/794
|
|
|
bceae89 |
Patch0001: 0001-Don-t-print-anything-in-setup-if-quiet.patch
|
|
|
bceae89 |
# https://gitlab.gnome.org/World/OpenPaperwork/paperwork/merge_requests/785
|
|
|
bceae89 |
Patch0002: a08bb86c9b4b84e9989fe5981fef51d4cdd3f7f3.patch
|
|
|
bceae89 |
# https://gitlab.gnome.org/World/OpenPaperwork/paperwork/merge_requests/801
|
|
|
bceae89 |
Patch0003: 0001-Install-icons-to-correct-hicolor-subdirectory.patch
|
|
|
bceae89 |
Patch0004: 0002-Drop-extra-icon-dirs.patch
|
|
|
bceae89 |
|
|
|
bceae89 |
BuildArch: noarch
|
|
|
bceae89 |
|
|
|
bceae89 |
BuildRequires: desktop-file-utils
|
|
|
bceae89 |
BuildRequires: libappstream-glib
|
|
|
bceae89 |
BuildRequires: python3-devel
|
|
|
bceae89 |
BuildRequires: python3dist(setuptools)
|
|
|
bceae89 |
|
|
|
bceae89 |
Requires: hicolor-icon-theme
|
|
|
bceae89 |
Requires: python3-%{srcname} = %{version}-%{release}
|
|
|
bceae89 |
|
|
|
bceae89 |
%global _description %{expand: \
|
|
|
bceae89 |
Paperwork is a personal document manager. It manages scanned documents and PDFs.
|
|
|
bceae89 |
|
|
|
bceae89 |
It's designed to be easy and fast to use. The idea behind Paperwork is "scan &
|
|
|
bceae89 |
forget": You can just scan a new document and forget about it until the day you
|
|
|
bceae89 |
need it again.
|
|
|
bceae89 |
|
|
|
bceae89 |
In other words, let the machine do most of the work for you.
|
|
|
bceae89 |
}
|
|
|
bceae89 |
|
|
|
bceae89 |
%description %{_description}
|
|
|
bceae89 |
|
|
|
bceae89 |
|
|
|
bceae89 |
%package -n python3-%{srcname}
|
|
|
bceae89 |
Summary: %{summary}
|
|
|
bceae89 |
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
bceae89 |
|
|
|
bceae89 |
BuildRequires: python3dist(paperwork-backend) >= 1.2.4
|
|
|
bceae89 |
BuildRequires: python3dist(pillow)
|
|
|
bceae89 |
BuildRequires: python3dist(pycountry)
|
|
|
bceae89 |
BuildRequires: python3dist(pyinsane2)
|
|
|
bceae89 |
BuildRequires: python3dist(pyocr) >= 0.3.0
|
|
|
bceae89 |
BuildRequires: python3dist(pypillowfight)
|
|
|
bceae89 |
BuildRequires: python3dist(python-dateutil)
|
|
|
bceae89 |
BuildRequires: python3dist(python-levenshtein)
|
|
|
bceae89 |
BuildRequires: python3dist(pyxdg) >= 0.25
|
|
|
bceae89 |
BuildRequires: python3dist(setuptools)
|
|
|
bceae89 |
BuildRequires: python3dist(termcolor)
|
|
|
bceae89 |
BuildRequires: python3-gobject
|
|
|
bceae89 |
BuildRequires: gtk3
|
|
|
bceae89 |
BuildRequires: gnome-icon-theme
|
|
|
bceae89 |
BuildRequires: gnome-icon-theme-symbolic
|
|
|
bceae89 |
BuildRequires: libnotify
|
|
|
bceae89 |
BuildRequires: tesseract
|
|
|
bceae89 |
BuildRequires: /usr/bin/xvfb-run
|
|
|
bceae89 |
|
|
|
9cc4039 |
# Fallback to old orientation heuristic just freezes, so ensure this is
|
|
|
9cc4039 |
# available.
|
|
|
9cc4039 |
Requires: tesseract-osd
|
|
|
9cc4039 |
|
|
|
bceae89 |
%description -n python3-%{srcname} %{_description}
|
|
|
bceae89 |
|
|
|
bceae89 |
|
|
|
bceae89 |
%prep
|
|
|
bceae89 |
%autosetup -n %{srcname}-%{version} -p2
|
|
|
bceae89 |
|
|
|
bceae89 |
# Remove bundled egg-info
|
|
|
bceae89 |
rm -rf %{srcname}.egg-info
|
|
|
bceae89 |
|
|
|
bceae89 |
# Remove spurious executable bit and shebangs.
|
|
|
bceae89 |
sed -i -e '/^#!\//, 1d' src/%{srcname}/{,frontend/,frontend/import/,frontend/util/}__init__.py
|
|
|
bceae89 |
sed -i -e '/^#!\//, 1d' src/%{srcname}/{deps,paperwork}.py
|
|
|
bceae89 |
|
|
|
bceae89 |
|
|
|
bceae89 |
%build
|
|
|
bceae89 |
%py3_build
|
|
|
bceae89 |
|
|
|
bceae89 |
|
|
|
bceae89 |
%install
|
|
|
bceae89 |
%py3_install
|
|
|
bceae89 |
|
|
|
bceae89 |
PYTHONPATH=%{buildroot}%{python3_sitelib} \
|
|
|
bceae89 |
paperwork-shell install_system %{buildroot}%{_datadir}/icons %{buildroot}%{_datadir}
|
|
|
bceae89 |
|
|
|
bceae89 |
%find_lang %{srcname}
|
|
|
bceae89 |
|
|
|
bceae89 |
|
|
|
bceae89 |
%check
|
|
|
bceae89 |
paperwork-shell -b chkdeps paperwork_backend
|
|
|
bceae89 |
PYTHONPATH=%{buildroot}%{python3_sitelib} \
|
|
|
bceae89 |
xvfb-run -a paperwork-shell -b chkdeps paperwork
|
|
|
bceae89 |
|
|
|
bceae89 |
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
|
|
|
bceae89 |
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml
|
|
|
bceae89 |
|
|
|
bceae89 |
|
|
|
bceae89 |
%files
|
|
|
bceae89 |
%{_bindir}/paperwork
|
|
|
bceae89 |
%{_datadir}/applications/*.desktop
|
|
|
bceae89 |
%{_datadir}/icons/hicolor/*/apps/*
|
|
|
bceae89 |
%{_metainfodir}/*.appdata.xml
|
|
|
bceae89 |
|
|
|
bceae89 |
%files -n python3-%{srcname} -f %{name}.lang
|
|
|
bceae89 |
%doc README.markdown
|
|
|
bceae89 |
%{python3_sitelib}/%{srcname}
|
|
|
bceae89 |
%{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info
|
|
|
bceae89 |
|
|
|
bceae89 |
|
|
|
bceae89 |
%changelog
|
|
|
9cc4039 |
* Thu May 16 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.4-3
|
|
|
9cc4039 |
- Require tesseract-osd so orientation detection doesn't freeze
|
|
|
9cc4039 |
|
|
|
bceae89 |
* Tue Mar 26 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.4-2
|
|
|
bceae89 |
- Fix icon installation
|
|
|
bceae89 |
|
|
|
bceae89 |
* Mon Mar 25 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.4-1
|
|
|
bceae89 |
- Initial package.
|