## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global srcname ocrmypdf Name: %{srcname} Version: 15.4.3 Release: %autorelease Summary: Add an OCR text layer to scanned PDF files # See all SPDX-License-Identifier tags in files. # No docs or tests are included in RPM. License: MPL-2.0 and Zlib URL: https://github.com/ocrmypdf/OCRmyPDF Source0: %pypi_source %{srcname} # Fedora specific. Patch0001: 0001-Remove-unnecessary-dependencies.patch BuildArch: noarch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: ghostscript >= 9.50 BuildRequires: pngquant >= 2.0.0 BuildRequires: tesseract >= 4.1.1 BuildRequires: tesseract-osd BuildRequires: tesseract-langpack-deu BuildRequires: unpaper >= 6.1 BuildRequires: python3-devel Requires: ghostscript >= 9.15 Recommends: pngquant >= 2.0.0 Requires: tesseract >= 4.1.1 Recommends: unpaper >= 6.1 %description OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched or copy-pasted. %package -n %{srcname}-doc Summary: ocrmypdf documentation License: CC-BY-SA-4.0 %description -n %{srcname}-doc Documentation for ocrmypdf %pyproject_extras_subpkg -n %{srcname} watcher %{_bindir}/%{srcname}-watcher %pyproject_extras_subpkg -n %{srcname} webservice %{_bindir}/%{srcname}-webservice %generate_buildrequires %pyproject_buildrequires -x docs -x test %prep %autosetup -n %{srcname}-%{version} -p1 # Remove bundled egg-info rm -rf src/%{srcname}.egg-info # Cleanup shebang and executable bits. for f in src/%{srcname}/*.py src/%{srcname}/*/*.py; do sed -e '1{\@^#!/usr/bin/env python@d}' $f > $f.new && touch -r $f $f.new && mv $f.new $f chmod -x $f done %build %pyproject_wheel # generate html docs PYTHONPATH="$PWD/build/lib" OCRMYPDF_VERSION="%{version}" sphinx-build-3 docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %install %pyproject_install %pyproject_save_files %{srcname} # Install completion files. install -Dpm 0644 misc/completion/ocrmypdf.bash %{buildroot}%{_datadir}/bash-completion/completions/ocrmypdf install -Dpm 0644 misc/completion/ocrmypdf.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/ocrmypdf.fish # Install optional programs. install -Dpm 0755 misc/watcher.py %{buildroot}%{_bindir}/%{srcname}-watcher install -Dpm 0755 misc/webservice.py %{buildroot}%{_bindir}/%{srcname}-webservice %check %{pytest} -ra -n auto --runslow -k 'not test_tesseract_config_invalid' # For some reason these break and 'work' when run in parallel. %{pytest} -ra --runslow -k 'test_tesseract_config_invalid' %files -n %{srcname} -f %{pyproject_files} %doc README.md %license LICENSE %{_bindir}/ocrmypdf %{_datadir}/bash-completion/completions/ocrmypdf %dir %{_datadir}/fish %dir %{_datadir}/fish/vendor_completions.d %{_datadir}/fish/vendor_completions.d/ocrmypdf.fish %files -n %{srcname}-doc %doc html %license LICENSE %changelog * Mon Nov 20 2023 Elliott Sales de Andrade - 15.4.3-1 - Update to latest version (#2246949) * Mon Oct 30 2023 Elliott Sales de Andrade - 15.3.1-1 - Update to latest version (#2243023) * Mon Oct 09 2023 Elliott Sales de Andrade - 15.1.0-1 - Update to latest version (#2242079) * Fri Sep 29 2023 Elliott Sales de Andrade - 15.0.2-1 - Update to latest version (#2241335) * Wed Sep 27 2023 Elliott Sales de Andrade - 15.0.1-1 - Update to latest version (#2240735) * Sun Aug 13 2023 Elliott Sales de Andrade - 14.4.0-1 - Update to latest version (#2231603) * Thu Jul 20 2023 Fedora Release Engineering - 14.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Fri Jul 07 2023 Elliott Sales de Andrade - 14.3.0-1 - Update to latest version (#2216329) * Mon Jun 19 2023 Python Maint - 14.2.1-2 - Rebuilt for Python 3.12 * Sat May 27 2023 Elliott Sales de Andrade - 14.2.1-1 - Update to latest version (#2209442) * Sun May 14 2023 Elliott Sales de Andrade - 14.2.0-1 - Update to latest versoin (#2203570) * Sun Apr 16 2023 Elliott Sales de Andrade - 14.1.0-1 - Update to latest version (#2186923) * Sun Mar 19 2023 Elliott Sales de Andrade - 14.0.4-1 - Update to latest version (#2179464) * Mon Feb 20 2023 Elliott Sales de Andrade - 14.0.3-1 - Update to latest version (#2158094) * Thu Jan 19 2023 Fedora Release Engineering - 14.0.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Jan 05 2023 Elliott Sales de Andrade - 14.0.2-1 - Update to latest version (#2158094) * Mon Dec 19 2022 Elliott Sales de Andrade - 14.0.1-2 - Drop support for i686 * Sun Oct 23 2022 Elliott Sales de Andrade - 14.0.1-1 - Update to latest version (#2128913) * Mon Aug 22 2022 Elliott Sales de Andrade - 13.7.0-1 - Update to latest version (#2090020) * Fri Jul 22 2022 Fedora Release Engineering - 13.4.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Thu Jun 16 2022 Python Maint - 13.4.5-3 - Rebuilt for Python 3.11 * Wed May 25 2022 Elliott Sales de Andrade - 13.4.5-2 - Update upstream URL * Wed May 25 2022 Benjamin A. Beasley - 13.4.5-1 - Update to 13.4.5 * Mon May 16 2022 Elliott Sales de Andrade - 13.4.4-1 - Update to latest version (#2075742) * Wed Apr 06 2022 Elliott Sales de Andrade - 13.4.2-2 - Backport fix for older pytest * Mon Apr 04 2022 Elliott Sales de Andrade - 13.4.2-1 - Update to latest version (#2071565) * Sun Mar 20 2022 Elliott Sales de Andrade - 13.4.1-1 - Update to latest version (#2063518) * Sun Mar 20 2022 Elliott Sales de Andrade - 13.4.0-2 - Enable unpaper on Fedora 36+ * Mon Feb 21 2022 Elliott Sales de Andrade - 13.4.0-1 - Update to latest version (#2056160) * Sat Jan 29 2022 Elliott Sales de Andrade - 13.3.0-1 - Update to latest version (#2046526) * Thu Jan 20 2022 Fedora Release Engineering - 13.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Dec 20 2021 Elliott Sales de Andrade - 13.2.0-1 - Update to latest version (#2029756) * Mon Dec 06 2021 Elliott Sales de Andrade - 13.0.0-1 - Update to latest version (#2018100) * Sun Nov 21 2021 Elliott Sales de Andrade - 13.0.0~rc1-1 - Update to latest rc (#2018100); fixes rhbz#2017739 * Sun Oct 17 2021 Elliott Sales de Andrade - 12.7.0-1 - Update to latest version (#2013463) * Sat Oct 02 2021 Elliott Sales de Andrade - 12.6.0-1 - Update to latest version (#2009945) * Sun Sep 26 2021 Elliott Sales de Andrade - 12.5.0-1 - Update to latest version (#2000053) * Tue Aug 31 2021 Elliott Sales de Andrade - 12.3.3-1 - Update to latest version (#1998374) * Fri Aug 06 2021 Elliott Sales de Andrade - 12.3.2-1 - Update to latest version; fixes rhbz#1989938. * Tue Aug 03 2021 Elliott Sales de Andrade - 12.3.1-1 - Update to latest version; fixes rhbz#1988806. * Tue Aug 03 2021 Elliott Sales de Andrade - 12.3.0-8 - Actually install optional scripts. * Tue Aug 03 2021 Elliott Sales de Andrade - 12.3.0-7 - Allow latest flask and watchdog; fixes rhbz#1989016. * Tue Aug 03 2021 Elliott Sales de Andrade - 12.3.0-6 - Use modern Python packaging macros. * Thu Jul 22 2021 Fedora Release Engineering - 12.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Thu Jul 15 2021 Elliott Sales de Andrade - 12.3.0-1 - Update to latest version (#1982152) * Sun Jun 20 2021 Elliott Sales de Andrade - 12.2.0-1 - Update to latest version (#1963021) * Fri Jun 04 2021 Python Maint - 12.0.2-2 - Rebuilt for Python 3.10 * Sat May 22 2021 Elliott Sales de Andrade - 12.0.2-1 - Update to latest version (#1963021) * Tue Apr 27 2021 Elliott Sales de Andrade - 12.0.1-1 - Update to latest version (#1949428) * Fri Apr 09 2021 Elliott Sales de Andrade - 12.0.0~b1-1 - Update to latest version (#1947690) * Sun Mar 21 2021 Elliott Sales de Andrade - 11.7.3-1 - Update to latest version (#1940814) * Sat Mar 06 2021 Elliott Sales de Andrade - 11.7.1-1 - Update to latest version (#1935602) * Sat Feb 27 2021 Elliott Sales de Andrade - 11.7.0-1 - Update to latest version (#1933386) * Mon Feb 15 2021 Elliott Sales de Andrade - 11.6.2-1 - Update to latest version (#1928669) * Sat Feb 06 2021 Elliott Sales de Andrade - 11.6.0-1 - Update to latest version (#1920463) * Tue Jan 26 2021 Fedora Release Engineering - 11.5.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Sat Jan 16 2021 Elliott Sales de Andrade - 11.5.0-1 - Update to latest version (#1914595) * Fri Jan 08 2021 Elliott Sales de Andrade - 11.4.5-1 - Update to latest version (#1913459) * Fri Jan 01 2021 Elliott Sales de Andrade - 11.4.4-1 - Update to latest version (#1911957) * Wed Dec 30 2020 Elliott Sales de Andrade - 11.4.3-1 - Update to latest version (#1911615) * Tue Dec 29 2020 Elliott Sales de Andrade - 11.4.2-1 - Update to latest version (#1904259) * Sat Dec 12 2020 Elliott Sales de Andrade - 11.4.0-1 - Update to latest version (#1904259) * Sat Nov 28 2020 Elliott Sales de Andrade - 11.3.3-1 - Update to latest version (#1894119) * Thu Oct 29 2020 Elliott Sales de Andrade - 11.3.1-1 - Update to latest version (#1892199) * Mon Oct 26 2020 Elliott Sales de Andrade - 11.3.0-1 - Update to latest version (#1891263) * Thu Oct 08 2020 Elliott Sales de Andrade - 11.2.1-1 - Update to latest version (#1885990) * Thu Oct 01 2020 Elliott Sales de Andrade - 11.1.2-1 - Update to latest version (#1884208) * Fri Sep 25 2020 Elliott Sales de Andrade - 11.1.1-1 - Update to latest version (#1882640) * Sat Sep 19 2020 Elliott Sales de Andrade - 11.1.0-1 - Update to latest version (#1880187) * Thu Sep 10 2020 Elliott Sales de Andrade - 11.0.2-1 - Update to latest version (#1876854) * Sat Aug 29 2020 Elliott Sales de Andrade - 11.0.1-1 - Update to latest version (#1868493) * Sun Aug 09 2020 Elliott Sales de Andrade - 10.3.3-1 - Update to latest version - Fixes rhbz#1866266 * Tue Jul 28 2020 Fedora Release Engineering - 10.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Mon Jul 27 2020 Elliott Sales de Andrade - 10.3.1-1 - Update to latest version - Fixes rhbz#1860767 * Sat Jul 25 2020 Elliott Sales de Andrade - 10.3.0-1 - Update to latest version - Fixes rhbz#1859892 * Mon Jul 13 2020 Elliott Sales de Andrade - 10.2.0-1 - Update to latest version * Sun Jun 21 2020 Elliott Sales de Andrade - 9.8.2-1 - Update to latest version * Sun May 31 2020 Elliott Sales de Andrade - 9.8.1-1 - Update to latest version * Tue May 26 2020 Miro Hrončok - 9.8.0-2 - Rebuilt for Python 3.9 * Thu Apr 30 2020 Elliott Sales de Andrade - 9.8.0-1 - Update to latest version * Thu Apr 16 2020 Elliott Sales de Andrade - 9.7.2-1 - Update to latest version * Mon Apr 13 2020 Elliott Sales de Andrade - 9.7.1-1 - Update to latest version * Wed Apr 08 2020 Elliott Sales de Andrade - 9.7.0-1 - Update to latest version * Tue Mar 03 2020 Elliott Sales de Andrade - 9.6.1-1 - Update to latest version * Fri Feb 14 2020 Elliott Sales de Andrade - 9.6.0-1 - Update to latest version * Tue Jan 28 2020 Elliott Sales de Andrade - 9.5.0-1 - Update to latest version * Mon Jan 06 2020 Elliott Sales de Andrade - 9.4.0-1 - Update to latest version * Thu Jan 02 2020 Elliott Sales de Andrade - 9.3.0-1 - Update to latest version * Sat Nov 23 2019 Elliott Sales de Andrade - 9.1.1-1 - Update to latest version * Mon Nov 04 2019 Elliott Sales de Andrade - 9.0.5-1 - Update to latest version * Mon Nov 04 2019 Elliott Sales de Andrade - 9.0.4-1 - Update to latest version * Thu Oct 17 2019 Elliott Sales de Andrade - 9.0.3-2 - Stop running flaky test * Sun Sep 08 2019 Elliott Sales de Andrade - 9.0.3-1 - Update to latest version * Sat Aug 31 2019 Elliott Sales de Andrade - 9.0.1-1 - Update to latest version * Mon Aug 19 2019 Miro Hrončok - 8.3.2-3 - Rebuilt for Python 3.8 * Thu Jul 25 2019 Fedora Release Engineering - 8.3.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Tue Jul 23 2019 Elliott Sales de Andrade - 8.3.2-1 - Update to latest version * Tue May 14 2019 Elliott Sales de Andrade - 8.3.0-1 - Update to latest version - Add completion files * Thu Apr 25 2019 Elliott Sales de Andrade - 8.2.4-1 - Update to latest version * Mon Apr 08 2019 Elliott Sales de Andrade - 8.2.3-1 - Update to latest version * Fri Mar 15 2019 Elliott Sales de Andrade - 8.2.2-2 - Add explicit sphinx_rtd_theme BuildRequires * Fri Mar 08 2019 Elliott Sales de Andrade - 8.2.2-1 - Update to latest version * Tue Feb 12 2019 Elliott Sales de Andrade - 8.1.0-1 - Update to latest version * Fri Feb 01 2019 Fedora Release Engineering - 8.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sun Jan 13 2019 Elliott Sales de Andrade - 8.0.0-1 - Update to latest version * Sun Jan 13 2019 Elliott Sales de Andrade - 7.4.0-1 - Update to latest version * Sun Oct 14 2018 Elliott Sales de Andrade - 7.2.1-1 - Update to latest version * Tue Sep 25 2018 Elliott Sales de Andrade - 7.1.0-1 - Update to latest version * Fri Sep 21 2018 Elliott Sales de Andrade - 7.0.6-1 - Update to latest version * Sat Aug 25 2018 Elliott Sales de Andrade - 7.0.4-1 - Update to latest version * Thu Aug 23 2018 Elliott Sales de Andrade - 7.0.3-2 - Remove extraneous shebangs - Fix summary line - Remove workaround for reportlab packaging bug * Wed Aug 22 2018 Elliott Sales de Andrade - 7.0.3-1 - Initial package.