File lios.spec of Package lios
#
# spec file for package lios
#
# Copyright (c) 2020 SUSE LLC
#
# 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 skip_python2 1
Name: lios
Version: 2.7.1
Release: 0
Summary: Linux-Intelligent-Ocr-Solution
License: GPL-3.0-or-later
Group: Productivity/Office/Other
URL: https://sourceforge.net/projects/lios/
Source: http://download.sf.net/lios/%{name}-%{version}.tar
BuildRequires: %{python_module Pillow}
BuildRequires: %{python_module pyenchant}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module speechd}
BuildRequires: ImageMagick
BuildRequires: aspell-en
BuildRequires: espeak
BuildRequires: fdupes
BuildRequires: gstreamer-plugins-base
BuildRequires: noto-sans-cuneiform-fonts
BuildRequires: tesseract-ocr
BuildRequires: update-desktop-files
Requires: PackageKit-gtk3-module
Requires: aspell-en
Requires: espeak
Requires: noto-sans-cuneiform-fonts
Requires: poppler-tools
Requires: python-gobject
Requires: python-pyenchant
Requires: python-sane
Requires: python-speechd
Requires: tesseract-ocr
Requires: typelib(Vte)
BuildArch: noarch
%description
Lios is a free and open source software for converting print in to text using
either scanner or a camera. It can also produce text out of scanned images from
other sources such as Pdf, Image, Folder containing Images or screenshot.
Program is given total accessibility for visually impaired. Lios is written in
python3.
%prep
%setup -q
for f in `find ./lios/ -name "*.py"`
do
sed -i '1{/\/usr\/bin\/env/d;}' ${f}
sed -i '1{/\/usr\/bin\/python/d;}' ${f}
done
sed -i "s|#!/usr/bin/env python|#!/usr/bin/python3|" bin/lios
%build
%python_build
%install
%python_install
# REMOVE EXEC BITS FROM DESKTOP FILE
chmod -x %{buildroot}%{_datadir}/applications/Tesseract-Trainer.desktop
%suse_update_desktop_file Lios OCR
%suse_update_desktop_file Tesseract-Trainer OCR
rm %{buildroot}%{_datadir}/doc/lios/copyright
%python_expand %fdupes %{buildroot}%{$python_sitelib}/lios/
%fdupes %{buildroot}%{_datadir}/%{name}
%files
%license LICENSE
%doc share/doc/lios/copyright
%doc user-guide.odt
%{python_sitelib}/lios/
%{python_sitelib}/lios-2.5-py%{python_version}.egg-info
%{_datadir}/%{name}/
%{_datadir}/applications/*
%{_mandir}/man1/*%{ext_man}
%{_datadir}/pixmaps/lios.xpm
%{_bindir}/lios
%{_bindir}/train-tesseract
%changelog