File gnome-mpv.spec of Package gnome-mpv

#
# spec file for package gnome-mpv
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#


%define _name   GnomeMpv
Name:           gnome-mpv
Version:        0.16
Release:        0
Summary:        Simple GTK+ frontend for MPV
License:        GPL-3.0-or-later
Group:          Productivity/Multimedia/Video/Players
URL:            https://github.com/gnome-mpv/gnome-mpv
Source:         https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz
BuildRequires:  gettext-runtime-mini >= 0.19.7
BuildRequires:  hicolor-icon-theme
BuildRequires:  intltool >= 0.40.6
BuildRequires:  meson >= 0.40.0
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(appstream-glib)
BuildRequires:  pkgconfig(epoxy)
BuildRequires:  pkgconfig(gio-2.0) >= 2.44
BuildRequires:  pkgconfig(glib-2.0) >= 2.44
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.18
BuildRequires:  pkgconfig(mpv) >= 0.27
Recommends:     %{name}-lang
Recommends:     youtube-dl
%if 0%{?suse_version} < 1500
BuildRequires:  update-desktop-files
%glib2_gsettings_schema_requires
%endif

%description
GNOME MPV is a simple GTK+ frontend for MPV.

%lang_package

%prep
%setup -q

%build
%meson
%meson_build

%install
%meson_install
%find_lang %{name}
%suse_update_desktop_file -G "Multimedia Player" %{buildroot}%{_datadir}/applications/io.github.%{_name}.desktop

%if 0%{?suse_version} < 1500
%post
%desktop_database_post
%icon_theme_cache_post
%glib2_gsettings_schema_post

%postun
%desktop_database_postun
%icon_theme_cache_postun
%glib2_gsettings_schema_postun
%endif

%files
%doc README.md
%license COPYING
%{_bindir}/%{name}
%{_datadir}/glib-2.0/schemas/*.gschema.xml
%{_datadir}/applications/*%{_name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/io.github.%{_name}.svg
%{_datadir}/icons/hicolor/symbolic/apps/io.github.%{_name}-symbolic.svg
%dir %{_datadir}/metainfo
%{_datadir}/metainfo/io.github.%{_name}.appdata.xml
%{_datadir}/dbus-1/services/io.github.%{_name}.service
%{_mandir}/man1/%{name}.1%{ext_man}

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by