%if 0%{?el8} %global debug_package %{nil} %endif %if 0%{?el9} %global debug_package %{nil} %endif %if 0%{?el10} %global debug_package %{nil} %endif %global hbb_commit 87b11a7 Name: rustdesk-server Version: 1.1.15 Release: 5%{?dist} Summary: RustDesk Server Program License: AGPL-3.0-only URL: https://github.com/rustdesk/rustdesk-server Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Source1: https://github.com/rustdesk/hbb_common/archive/%{hbb_commit}/hbb_common-%{hbb_commit}.tar.gz Source2: hbbs.xml Source3: hbbr.xml Source4: hbbs.service Source5: hbbr.service Source6: rustdesk-server.sysusers Source7: rustdesk-server.tmpfiles BuildRequires: cargo BuildRequires: rust BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: make BuildRequires: pkgconfig BuildRequires: openssl-devel BuildRequires: systemd-rpm-macros Requires: firewalld-filesystem %{?systemd_requires} %{?sysusers_requires_compat} %description RustDesk Server Program. Includes the hbbs (RustDesk ID/Rendezvous server) and hbbr (RustDesk Relay server) binaries. %prep %autosetup -n %{name}-%{version} # Replace the empty hbb_common directory with the submodule source rm -rf libs/hbb_common/* tar -xzf %{SOURCE1} -C libs/hbb_common --strip-components=1 %build cargo build --release %install mkdir -p %{buildroot}%{_bindir} install -m 0755 target/release/hbbs %{buildroot}%{_bindir}/hbbs install -m 0755 target/release/hbbr %{buildroot}%{_bindir}/hbbr # Include rustdesk-utils if it exists in the build output [ -f target/release/rustdesk-utils ] && install -m 0755 target/release/rustdesk-utils %{buildroot}%{_bindir}/rustdesk-utils || : # Install firewalld service files mkdir -p %{buildroot}%{_prefix}/lib/firewalld/services install -m 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/firewalld/services/hbbs.xml install -m 0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/firewalld/services/hbbr.xml # Install systemd service files mkdir -p %{buildroot}%{_unitdir} install -m 0644 %{SOURCE4} %{buildroot}%{_unitdir}/hbbs.service install -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/hbbr.service # Create working directory for keys/database mkdir -p %{buildroot}%{_sharedstatedir}/%{name} # Create sysusers.d config mkdir -p %{buildroot}%{_sysusersdir} install -m 0644 %{SOURCE6} %{buildroot}%{_sysusersdir}/%{name}.conf # Create tmpfiles.d config mkdir -p %{buildroot}%{_tmpfilesdir} install -m 0644 %{SOURCE7} %{buildroot}%{_tmpfilesdir}/%{name}.conf %pre %sysusers_create_compat %{SOURCE6} %post %systemd_post hbbs.service hbbr.service systemd-tmpfiles --create %{name}.conf || : %preun %systemd_preun hbbs.service hbbr.service %postun %systemd_postun_with_restart hbbs.service hbbr.service %files %license LICENSE %doc README.md %{_bindir}/* %{_prefix}/lib/firewalld/services/hbbs.xml %{_prefix}/lib/firewalld/services/hbbr.xml %{_unitdir}/hbbs.service %{_unitdir}/hbbr.service %{_sysusersdir}/%{name}.conf %{_tmpfilesdir}/%{name}.conf %attr(0750, rustdesk, rustdesk) %dir %{_sharedstatedir}/%{name} %changelog * Tue May 12 2026 Jason Rothstein - Run as a dedicated user instead of root * Sat May 09 2026 Jason Rothstein - No debug packages for EL10 * Sat May 09 2026 Jason Rothstein - No debug packages for EL9 * Fri May 08 2026 Jason Rothstein - No debug packages for EL8 * Fri May 01 2026 Jason Rothstein - Initial package creation for RHEL and Fedora