File dewduct.spec of Package dewduct
#
# spec file for package dewduct
#
# Copyright (c) 2024 mantarimay
#
# 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/
#
%bcond_with test
%define appid null.daknig.dewduct
Name: dewduct
Version: 0.2.3
Release: 0
Summary: Youtube player for Linux on desktop and mobile
License: MIT
URL: https://github.com/DaKnig/DewDuct
Source0: %{url}/archive/v%{version}/DewDuct-%{version}.tar.gz
Source1: vendor.tar.zst
BuildRequires: cargo-packaging
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(libadwaita-1)
BuildRequires: /usr/bin/appstreamcli
BuildRequires: desktop-file-utils
Requires: mpv yt-dlp
%description
A privacy-focused and mobile-friendly YouTube player, a NewPipe clone for
GNOME, in Rust and GTK, based on Invidious.
%prep
%autosetup -n DewDuct-%{version} -a1 -p1
%build
%{cargo_build}
%install
install -Dm755 target/release/%{name} -t %{buildroot}%{_bindir}
install -Dm644 data/%{appid}.metainfo.xml -t \
%{buildroot}%{_datadir}/metainfo/
install -d %{buildroot}%{_datadir}/applications
appstreamcli make-desktop-file data/%{appid}.metainfo.xml \
%{buildroot}%{_datadir}/applications/%{appid}.desktop
%check
%if %{with test}
%{cargo_test}
%endif
desktop-file-validate %{buildroot}/%{_datadir}/applications/%{appid}.desktop
%files
%license LICEN*
%doc README*
%{_bindir}/%{name}
%{_datadir}/metainfo/
%{_datadir}/applications/
%changelog