%global debug_package %{nil}

%global gobject_introspection_version 1.35.9
%global gtk4_version 4.5.0
%global pygobject_version 3.36.1
%global tracker_sparql_version 2.99.3
%global grilo_version 0.3.13

Name:          gnome-music
Summary:       Music is the new GNOME music playing application.
Version:       44.0
Release:       1
License:       GPLv2+
URL:           https://wiki.gnome.org/Apps/Music
Source0:       https://download.gnome.org/sources/%{name}/44/%{name}-%{version}.tar.xz

BuildRequires:  meson itstool git-core gettext desktop-file-utils libappstream-glib
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(goa-1.0)
BuildRequires:  pkgconfig(gobject-introspection-1.0) >= %{gobject_introspection_version}
BuildRequires:  pkgconfig(grilo-0.3) >= %{grilo_version}
BuildRequires:  pkgconfig(grilo-plugins-0.3)
BuildRequires:  pkgconfig(gtk4) >= %{gtk4_version}
BuildRequires:  pkgconfig(libadwaita-1)
BuildRequires:  pkgconfig(libmediaart-2.0)
BuildRequires:  pkgconfig(libsoup-3.0)
BuildRequires:  pkgconfig(py3cairo)
BuildRequires:  pkgconfig(pygobject-3.0) >= %{pygobject_version}
BuildRequires:  pkgconfig(tracker-sparql-3.0) >= %{tracker_sparql_version}
BuildRequires:  python3-devel

Requires:	gdk-pixbuf2 gnome-online-accounts libsoup libmediaart pango
Requires:       gobject-introspection >= %{gobject_introspection_version}
Requires:       grilo >= %{grilo_version}
Requires:       grilo-plugins
Requires:       gstreamer1
Requires:       gstreamer1-plugins-base
Requires:       gtk4 >= %{gtk4_version}
Requires:       libnotify >= 0.7.6
Requires:       libtracker-sparql3 >= %{tracker_sparql_version}
Requires:       python3-cairo
Requires:       python3-gobject >= %{pygobject_version}
Requires:	libdazzle 
Requires:	xdg-user-dirs

Provides:       bundled(libgd)

%description
Music is the new GNOME music playing application.

%prep
%autosetup -p1

%build
%meson
%meson_build

%install
%meson_install
%find_lang %{name} --with-gnome --all-name

%check
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/org.gnome.Music.appdata.xml
desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Music.desktop

%files -f %{name}.lang
%license LICENSE
%doc NEWS README.md
%{_bindir}/gnome-music
%{_datadir}/applications/org.gnome.Music.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.Music.gschema.xml
%{_datadir}/org.gnome.Music/
%{_datadir}/icons/hicolor/scalable/apps/org.gnome.Music.svg
%{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Music-symbolic.svg
%{_datadir}/metainfo/org.gnome.Music.appdata.xml
%{python3_sitelib}/gnomemusic

%changelog
* Thu Nov 23 2023 lwg <liweiganga@uniontech.com> - 44.0-1
- update to version 44.0

* Mon Jun 6 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 42.1-1
- Update to 42.1

* Mon Mar 28 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 42.0-1
- Update to 42.0 and Add gnome-music.yaml

* Thu Sep 23 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 3.38.3-2
- Add xdg-user-dirs for default music dir

* Thu Jun 17 2021 weijin deng <weijin.deng@turbolinux.com.cn> - 3.38.3-1
- Package init with version 3.38.3
