File rustdesk-bin.spec of Package rustdesk-bin

#
# spec file for package rustdesk-bin
#
# Copyright (c) 2022 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 major 1.3.1
#%%define minor 2
#%%define version %{major}~%{minor}
#%%define sversion %{major}-%{minor}
%define version %{major}
%define sversion %{major}

Name:           rustdesk-bin
Version:        %{version}
Release:        0
Summary:        Remote desktop software, written in Rust
License:        AGPL-3.0
Group:          Productivity/Networking/Other
URL:            https://rustdesk.com/
Source0:        https://github.com/rustdesk/rustdesk/releases/download/%{version}/rustdesk-%{sversion}-x86_64.AppImage
#Source0:        https://github.com/rustdesk/rustdesk/releases/download/nightly/rustdesk-%%{version}-x86_64.AppImage
Source1:        https://github.com/rustdesk/rustdesk/raw/master/LICENCE
Source2:        https://raw.githubusercontent.com/rustdesk/rustdesk/master/README.md
Source3:        rustdesk.desktop
Source4:        rustdesk.png
ExclusiveArch:  x86_64
Requires:       libnsl1
Provides:       rustdesk
Provides:       Rustdesk

%description
Open source virtual / remote desktop infrastructure for everyone!
The open source TeamViewer alternative. 
Display and control your PC and Android devices from anywhere at anytime. 

%prep
install -m 644 %{SOURCE1} .
install -m 644 %{SOURCE1} .
install -m 644 %{SOURCE2} .

%build
# Nothing to build

%install
install -Dm 0755 %{SOURCE0} %{buildroot}%{_libdir}/rustdesk-%{version}-linux-x86_64.AppImage
install -Dm 0644 %{SOURCE3} %{buildroot}/%{_datadir}/applications/rustdesk.desktop
install -Dm 0644 %{SOURCE4} %{buildroot}/%{_datadir}/pixmaps/rustdesk.png
mkdir -p %{buildroot}/%{_bindir}
ln -fs %{_libdir}/rustdesk-%{version}-linux-x86_64.AppImage %{buildroot}/%{_bindir}/rustdesk

%files
%license LICENCE
%doc README.md
%{_bindir}/rustdesk
%{_datadir}/applications/rustdesk.desktop
%{_datadir}/pixmaps/rustdesk.png
%{_libdir}/rustdesk-%{version}-linux-x86_64.AppImage

%changelog
openSUSE Build Service is sponsored by