Name:           sayonara
Version:        @SAYONARA_VERSION_BASE@
Release:        @SAYONARA_VERSION_RELEASE@
Summary:        A lightweight Qt Audio player

License:        GPLv3+
URL:            http://sayonara-player.com
Source0:        https://gitlab.com/luciocarreras/sayonara-player/-/archive/%{version}-%{release}/sayonara-player-%{version}-%{release}.tar.bz2
BuildRequires:  cmake
BuildRequires:  desktop-file-utils
BuildRequires:  libappstream-glib
BuildRequires:  qt5-qtbase-devel
BuildRequires:  qt5-linguist
BuildRequires:  qt5-qtsvg-devel
BuildRequires:  gstreamer1-plugins-base-devel
BuildRequires:  libnotify-devel
BuildRequires:  taglib-devel
Requires:		qt5-qtsvg
Requires:		hicolor-icon-theme
Requires:		gstreamer1-plugins-bad-free
Requires:		python-pydbus

%description
%{name} is a small, clear, not yet platform-independent music player. Low 
CPU usage, low memory consumption and no long loading times are only three 
benefits of this player. Sayonara should be easy and intuitive to use and 
therefore it should be able to compete with the most popular music players.

%package        doc
Summary:        Documentation files for %{name}
BuildArch:      noarch

%description    doc
The %{name}-doc package contains html documentation
that use %{name}.

%prep
%autosetup -p1 -n %{name}-player-%{version}-%{release}

rm -rf .gitignore .gitlab-ci.yml debian

%build
%cmake . -DCMAKE_BUILD_TYPE="RelWithDebInfo" \
         -DCMAKE_INSTALL_PREFIX=%{_prefix}
%cmake_build

%install
%cmake_install

%find_lang %{name} --all-name --with-qt

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

%files -f %{name}.lang
%license LICENSE
%doc MANUAL README.md INSTALL.md
%{_bindir}/%{name}
%{_bindir}/%{name}-ctl
%{_bindir}/%{name}-query
%{_datadir}/applications/com.sayonara-player.Sayonara.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/metainfo/com.sayonara-player.Sayonara.appdata.xml
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/translations
%dir %{_datadir}/%{name}/translations/icons
%{_datadir}/%{name}/translations/icons/*.png
%{_mandir}/man1/%{name}.1.gz
%{_mandir}/man1/%{name}-ctl.1.gz
%{_mandir}/man1/%{name}-query.1.gz

%changelog
* @SAYONARA_DATE_TODAY@ Michael Lugmair <sayonara-player@posteo.org> - @SAYONARA_VERSION@
- New Release @SAYONARA_VERSION@
