mirror of
https://abf.rosa.ru/djam/rustdesk.git
synced 2025-02-24 23:42:51 +00:00
115 lines
3.4 KiB
RPMSpec
115 lines
3.4 KiB
RPMSpec
%define debug %nil
|
|
%define debug_package %nil
|
|
%define rustver 1.79.0
|
|
%define vcpkg_ver 2024.07.12
|
|
%define _optdir /opt/%{name}
|
|
|
|
Name: rustdesk
|
|
Version: 1.3.0
|
|
Release: 2
|
|
Summary: Virtual / remote desktop infrastructure
|
|
URL: https://rustdesk.com
|
|
Source0: https://github.com/rustdesk/rustdesk/archive/%{version}/%{name}-%{version}.tar.gz
|
|
Source1: https://github.com/microsoft/vcpkg/archive/%{vcpkg_ver}/vcpkg-%{vcpkg_ver}.tar.gz
|
|
License: GPLv3
|
|
Group: Office
|
|
%if %{mdvver} > 201610
|
|
BuildRequires: cargo
|
|
BuildRequires: rust
|
|
%else
|
|
BuildRequires: curl
|
|
%endif
|
|
BuildRequires: yasm
|
|
BuildRequires: nasm
|
|
BuildRequires: cmake >= 3.21
|
|
BuildRequires: zip
|
|
BuildRequires: git-core
|
|
BuildRequires: ninja
|
|
BuildRequires: python3
|
|
BuildRequires: %{_lib}pam-devel
|
|
BuildRequires: pkgconfig(libpulse)
|
|
BuildRequires: pkgconfig(vpx)
|
|
BuildRequires: pkgconfig(xcb)
|
|
BuildRequires: pkgconfig(libyuv)
|
|
BuildRequires: pkgconfig(opus) >= 1.3.1
|
|
BuildRequires: %{_lib}opus-static-devel
|
|
BuildRequires: %{_lib}vpx-static-devel
|
|
BuildRequires: %{_lib}aom-static-devel
|
|
BuildRequires: %{_lib}yuv-static-devel
|
|
BuildRequires: pkgconfig(gstreamer-1.0)
|
|
BuildRequires: pkgconfig(gstreamer-app-1.0)
|
|
BuildRequires: pkgconfig(gdk-3.0)
|
|
BuildRequires: pkgconfig(aom) >= 3
|
|
BuildRequires: pkgconfig(alsa)
|
|
BuildRequires: pkgconfig(libxdo)
|
|
Requires: sciter-sdk-bin
|
|
|
|
%description
|
|
Yet another remote desktop software, written in Rust.
|
|
Works out of the box, no configuration required. You
|
|
have full control of your data, with no concerns about
|
|
security. You can use our rendezvous/relay server, set
|
|
up your own, or write your own rendezvous/relay server.
|
|
|
|
%prep
|
|
%setup -q
|
|
%if %{mdvver} <= 201610
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs |\
|
|
sh -s -- -y --profile default --default-toolchain %{rustver}
|
|
%endif
|
|
|
|
# setup vcpkg
|
|
tar -xf %{SOURCE1}
|
|
mv vcpkg-%{vcpkg_ver} vcpkg
|
|
|
|
# hardcode ui files
|
|
#sed -i 's|"file://{}/src/ui/{}"|"file:/%{_datadir}/%{name}/ui/{}"|g' src/ui.rs
|
|
|
|
%build
|
|
%if %{mdvver} <= 201610
|
|
source "$HOME/.cargo/env"
|
|
%endif
|
|
|
|
export VCPKG_ROOT=./vcpkg
|
|
export RUSTFLAGS="-L%{_libdir}"
|
|
|
|
cargo fix --lib -p scrap --allow-no-vcs
|
|
|
|
cargo build --release
|
|
|
|
|
|
%install
|
|
install -d %{buildroot}%{_optdir}/src %{buildroot}%{_bindir}
|
|
install -Dm0755 target/release/%{name} %{buildroot}%{_optdir}/%{name}
|
|
install -Dm0644 res/rustdesk.service %{buildroot}%{_unitdir}/%{name}.service
|
|
install -Dm0644 res/rustdesk.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
|
|
install -Dm0644 res/rustdesk-link.desktop %{buildroot}%{_datadir}/apprlications/%{name}-link.desktop
|
|
install -Dm0644 res/32x32.png %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{name}.png
|
|
install -Dm0644 res/64x64.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/%{name}.png
|
|
install -Dm0644 res/128x128.png %{buildroot}%{_iconsdir}/hicolor/128x128/apps/%{name}.png
|
|
install -Dm0644 res/128x128@2x.png %{buildroot}%{_iconsdir}/hicolor/256x256/apps/%{name}.png
|
|
install -Dm0644 res/scalable.svg %{buildroot}%{_iconsdir}/hicolor/scalable/apps/%{name}.svg
|
|
|
|
cp -a src/ui %{buildroot}%{_optdir}/src
|
|
|
|
# start script
|
|
cat > %{buildroot}%{_bindir}/%{name} << EOF
|
|
#!/bin/bash
|
|
|
|
cd /opt/%{name}
|
|
./%{name}
|
|
EOF
|
|
|
|
chmod +x %{buildroot}%{_bindir}/%{name}
|
|
|
|
|
|
%files
|
|
%doc README* LICENCE docs
|
|
%{_bindir}/%{name}
|
|
%{_unitdir}/%{name}.service
|
|
%{_datadir}/applications/%{name}.desktop
|
|
%{_datadir}/apprlications/%{name}-link.desktop
|
|
%{_iconsdir}/hicolor/*/apps/%{name}.png
|
|
%{_iconsdir}/hicolor/scalable/apps/%{name}.svg
|
|
%{_optdir}
|
|
|