File xtream-download-manager.spec of Package xtream-download-manager
#
# spec file for package xtream-download-manager
#
# Copyright (c) 2023 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/
#
%define _name xdm
%define _pkgname xdman
Name: xtream-download-manager
Version: 8.0.29
Release: 0
Summary: Powerfull download accelerator and video downloader
License: GPL-2.0-only
URL: https://xtremedownloadmanager.com/
Source0: %{_name}-%{version}.tar.gz
Source1: packages.tar.gz
Source2: xdm.files
Patch1: 0001-fix-GetContentDispositionFileName-can-not-correc.patch
BuildRequires: desktop-file-utils
BuildRequires: dotnet-host
BuildRequires: dotnet-sdk
BuildRequires: gendesk
BuildRequires: git
Requires: (ffmpeg-free or ffmpeg)
Requires: gtk3 >= 3.22
BuildRequires: hicolor-icon-theme
Recommends: %{name}-lang
%description
If you have any questions regarding the use or development of xtream-download-manager,
want to discuss design or simply hang out, please join us on our #xtream-download-manager:matrix.org channel.
%prep
%setup -qa1 -n %{_name}-%{version}
%patch1 -p1
gendesk -f -n --name='Xtreme Download Manager' --comment="${pkgdesc/.}" --custom='Keywords=download;internet;manager;' --exec=/opt/%{_pkgname}/xdm-app --icon=/opt/%{_pkgname}/xdm-logo.svg --terminal=false --categories='Network' --startupnotify=false --pkgname=%{_pkgname}
%build
%install
install -dm 755 %{buildroot}/{opt/%{_pkgname},usr/share/applications}
dotnet publish -c Release -f net6.0 -r linux-x64 --self-contained app/XDM/XDM.Gtk.UI/XDM.Gtk.UI.csproj --source "./packages" -o %{buildroot}/opt/%{_pkgname}
#dotnet publish -c Release -f net4.7.2 -r linux-x64 app/XDM/XDM.App.Host/XDM.App.Host.csproj --source "./packages" -o %{buildroot}/opt/%{_pkgname}/XDM.App.Host
cp -a *.desktop %{buildroot}%{_datadir}/applications/
desktop-file-validate %{buildroot}%{_datadir}/applications/%{_pkgname}.desktop
%files -f %{SOURCE2}
%{_datadir}/applications/%{_pkgname}.desktop
%dir /opt/%{_pkgname}
%dir /opt/%{_pkgname}/Lang
%dir /opt/%{_pkgname}/chrome-extension
%dir /opt/%{_pkgname}/glade
%dir /opt/%{_pkgname}/images
%dir /opt/%{_pkgname}/svg-icons
%changelog