File hypnotix.spec of Package hypnotix

#
# spec file for package hypnotix
#
# Copyright (c) 2021 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 pythons python311
Name:           hypnotix
Version:        4.9
Release:        0
Summary:        An M3U IPTV Player
License:        GPL-2.0-or-later
Group:          Productivity/Multimedia/Video/Players
URL:            https://github.com/linuxmint/hypnotix
Source:         https://github.com/linuxmint/hypnotix/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(xapp) >= 2.6
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module base}
# Upstream say requires libmpv1. Not sure if it runs also with libmpv2.
%if 0%{?suse_version} > 1600 || ( 0%{?sle_version} >= 150600 && 0%{?is_opensuse} )
Requires:       libmpv2
%else
Requires:       libmpv1
%endif
Requires:       libxapp1 >= 2.6
Requires:       %{python_flavor}-IMDbPY
Requires:       %{python_flavor}-gobject-Gdk
Requires:       %{python_flavor}-pycairo
Requires:       %{python_flavor}-setproctitle
Requires:       %{python_flavor}-Unidecode
Requires:       %{python_flavor}-xapp
Requires:       typelib-1_0-Gtk-3_0
BuildArch:      noarch

%description
Hypnotix is an IPTV streaming application with support for live TV, movies and series.

%lang_package

%prep
%autosetup

%build
find -type f -exec sed -i -e 's|/usr/bin/python3|/usr/bin/python%python_bin_suffix|g' {} \;
%make_build

%install
cp -r usr %{buildroot}
%find_lang %{name}

%files
%doc README.md
%{_bindir}/hypnotix
%dir %{_prefix}/lib/hypnotix
%{_prefix}/lib/hypnotix/*
%{_datadir}/applications/hypnotix.desktop
%{_datadir}/glib-2.0/schemas/org.x.hypnotix.gschema.xml
%dir %{_datadir}/hypnotix
%{_datadir}/hypnotix/*
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/scalable/apps/hypnotix.svg

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by