%global debug_package %{nil} Name: go2rtc Version: 1.9.14 Release: 1%{?dist} Summary: Ultimate camera streaming application License: MIT URL: https://github.com/AlexxIT/go2rtc Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: %{name}.service Source2: %{name}-sysusers.conf Source3: %{name}.yaml BuildRequires: golang >= 1.24 BuildRequires: systemd-rpm-macros Recommends: ffmpeg-free %description go2rtc is a camera streaming application with support for RTSP, RTMP, HomeKit, HLS, MP4, MSE, WebRTC and other protocols. It can bridge IP cameras and other sources into a wide range of viewers and home automation systems, and ships as a single static binary. %prep %autosetup -n %{name}-%{version} # Tag archives have no VCS metadata; retain the version fallback from main.go. sed -i 's/info.Main.Version != "v"+Version/info.Main.Version != "(devel)" \&\& info.Main.Version != "v"+Version/' internal/app/app.go %build export CGO_ENABLED=0 go build -buildvcs=false -buildmode=pie -ldflags "-s -w" -trimpath -o %{name} %install install -Dm755 %{name} %{buildroot}%{_bindir}/%{name} install -Dm644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service install -Dm644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf install -Dm640 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name}/%{name}.yaml %pre %sysusers_create_package %{name} %{SOURCE2} %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %check test -x %{buildroot}%{_bindir}/%{name} %{buildroot}%{_bindir}/%{name} --version | grep -F "go2rtc version %{version} " %files %license LICENSE %doc README.md %{_bindir}/%{name} %{_unitdir}/%{name}.service %{_sysusersdir}/%{name}.conf %attr(0750, go2rtc, go2rtc) %dir %{_sysconfdir}/%{name} %config(noreplace) %attr(0640, go2rtc, go2rtc) %{_sysconfdir}/%{name}/%{name}.yaml %changelog * Sun Sep 13 2026 sachesi - 1.9.14-1 - Initial COPR package - Ship a systemd service running as a dedicated go2rtc system user - Bind the unauthenticated API and RTSP server to localhost by default