File gaupol.spec of Package gaupol

# spec file for package gaupol
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# 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

Name:           gaupol
Version:        1.3.1
Release:        0
Summary:        GTK Subtitle editor
License:        GPL-3.0+
Group:          Productivity/Multimedia/Video/Editors and Convertors
# PATCH-FIX-OPENSUSE gaupol-0.17.1-desktop.patch -- add desktop category
Patch0:         %{name}-0.17.1-desktop.patch
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  python3-devel
BuildRequires:  python3-gobject >= 3.12
BuildRequires:  python3-pyenchant
BuildRequires:  update-desktop-files
Requires:       python3
Requires:       python3-aeidon
Requires:       python3-gobject >= 3.12
Requires:       python3-pyenchant
Requires:       typelib-1_0-Gst-1_0
Requires:       typelib-1_0-GstPbutils-1_0
Requires:       typelib-1_0-GtkSpell-3_0
Recommends:     iso-codes
Recommends:     python-chardet
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
Requires:       python(abi) = %{py3_ver}

Gaupol is an editor for text-based subtitle files. It supports multiple subtitle
file formats and provides means of correcting texts and timing subtitles to match
video. The user interface is designed with attention to batch processing of
multiple documents and convenience of translating.

Gaupol should run on all Unix-like (GNU/Linux, *BSD, etc.) operating systems and
on Windows. Technically it should be able to run on Mac as well, but that has
not been tested nor made convenient. Gaupol's user interface is based on the GTK+
toolkit and has been designed to best fit the GNOME desktop environment.

%package -n python3-aeidon
Summary:        Package for reading, writing and manipulating text-based subtitle files
Group:          Development/Libraries/Python
Provides:       python-aeidon = %version
Obsoletes:      python-aeidon < %version

%description -n python3-aeidon
This is a Python package for reading, writing and manipulating
text-based subtitle files. It is separate from the gaupol package,
which provides a subtitle editor application with a GTK+ user

%setup -q

export CFLAGS="%{optflags}"
python3 build

python3 clean install --prefix=%{_prefix} --root=%{buildroot}
rm -f %{buildroot}%{_datadir}/gaupol/extensions/side-pane/__pycache__/*.pyc
rm -f %{buildroot}%{_datadir}/gaupol/extensions/custom-framerates/__pycache__/*.pyc
rm -f %{buildroot}%{_datadir}/gaupol/extensions/bookmarks/__pycache__/*.pyc

#remove zero length files
find %{buildroot} -type f -size 0 -delete

%suse_update_desktop_file -i %{name}
%find_lang %{name}
%fdupes %{buildroot}

%files -f %{name}.lang
%dir %{_datadir}/metainfo/

%files -n python3-aeidon
%defattr(-, root, root, -)

openSUSE Build Service is sponsored by