File normcap.spec of Package normcap
#
# spec file for package normcap
#
# Copyright (c) 2023 Malcolm Lewis <malcolmlewis@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define pythons python3
%define _version 0.5.4
Name: normcap
Version: 0.5.4+10
Release: 0
Summary: OCR-powered screen-capture tool to capture information instead of images
License: GPL-3.0+
URL: https://dynobo.github.io/normcap/
Source: normcap-%{version}.tar.xz
BuildRequires: fdupes
BuildRequires: python3-babel
BuildRequires: python3-hatchling
BuildRequires: python3-packaging
BuildRequires: python3-pip
BuildRequires: python3-poetry-core
BuildRequires: python3-setuptools
BuildRequires: python3-toml
Requires: python3-jeepney
Requires: python3-pyside6
Requires: python3-pytesseract
Requires: python3-shiboken6
Requires: tesseract-ocr
BuildArch: noarch
%description
OCR-powered screen-capture tool to capture information instead of images.
%prep
%autosetup
#
# Remove hidden-file
#
if [ -f normcap/resources/tessdata/.keep ]; then
rm -v normcap/resources/tessdata/.keep
else
echo 'The normcap/resources/tessdata/.keep file is gone. Adjust the spec file.'
fi
%build
%pyproject_wheel
%install
%pyproject_install
%fdupes %{buildroot}%{python_sitelib}
%files
%doc CHANGELOG README.md
%license LICENSE
%{_bindir}/normcap
%dir %{python_sitelib}/normcap/
%dir %{python_sitelib}/normcap-%{_version}*-info
%{python_sitelib}/normcap/
%{python_sitelib}/normcap-%{_version}*-info
%changelog