File songrec.spec of Package songrec
#
# spec file for package songrec
#
# Copyright (c) 2024 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/
#
Name: songrec
Version: 0.12.3
Release: 0%{?dist}
Summary: An open-source, unofficial Shazam client for Linux, written in Rust
License: GPL-3.0-only
URL: https://github.com/marin-m/SongRec
BuildRequires: cargo
BuildRequires: cargo-packaging
BuildRequires: git
BuildRequires: pkgconf
BuildRequires: rust
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(gdk-3.0) >= 3.22
BuildRequires: pkgconfig(gdk-pixbuf-2.0) >= 2.30
BuildRequires: pkgconfig(glib-2.0) >= 2.44
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(pango) >= 1.36
%if "%_repository" == "15.5"
BuildRequires: -libstdc++6
BuildRequires: libstdc++6-gcc13
%endif
Requires: alsa
Requires: ffmpeg
Requires: gtk3
Source0: %{name}-%{version}.tar.xz
Source1: vendor.tar.gz
Source2: cargo_config
%description
An open-source, unofficial Shazam client for Linux, written in Rust.
%prep
%setup -qa1
mkdir .cargo
cp %{SOURCE2} .cargo/config
%build
%{cargo_build}
%install
%{cargo_install}
install -Dm755 "%{_builddir}/%{name}-%{version}/packaging/rootfs/usr/share/applications/com.github.marinm.songrec.desktop" "%{buildroot}/usr/share/applications/com.github.marinm.songrec.desktop"
install -Dm755 "%{_builddir}/%{name}-%{version}/packaging/rootfs/usr/share/icons/hicolor/scalable/apps/com.github.marinm.songrec.svg" \
"%{buildroot}/usr/share/icons/hicolor/scalable/apps/com.github.marinm.songrec.svg"
install -Dm755 "packaging/rootfs/usr/share/metainfo/com.github.marinm.songrec.metainfo.xml" \
"%{buildroot}/usr/share/metainfo/com.github.marinm.songrec.metainfo.xml"
mkdir -p "%{buildroot}/usr/share/songrec"
cp -ra "translations" "%{buildroot}/usr/share/songrec/translations"
install -Dm644 "LICENSE" "%{buildroot}/usr/share/licenses/$_pkgname/LICENSE"
%files
%{_bindir}/%{name}
%{_datadir}/applications/com.github.marinm.%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/com.github.marinm.%{name}.svg
%license %{_datadir}/licenses/LICENSE
%{_datadir}/metainfo/com.github.marinm.%{name}.metainfo.xml
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/translations
%changelog