%ifarch aarch64 %define output_arch arm64 %else %define output_arch x64 %endif Name: Radarr Version: 5.6.0.8846 Release: 6%{?dist} Summary: Movie organizer/manager for usenet and torrent users. License: GPL-3.0 URL: https://radarr.video Source0: https://github.com/Radarr/Radarr/archive/v%{version}/%{name}-%{version}.tar.gz Source1: %{name}.service Source2: %{name}-firewalld.xml %{?systemd_requires} BuildRequires: dotnet-sdk-6.0 BuildRequires: yarnpkg BuildRequires: nodejs BuildRequires: systemd-rpm-macros #BuildRequires: gawk #BuildRequires: sed BuildRequires: firewalld-filesystem Requires: servarr-user Requires: dotnet-runtime-6.0 Requires: aspnetcore-runtime-6.0 Requires: %{name}-firewalld %global __requires_exclude ^liblttng-ust.so.0 %global _build_id_links none %description Movie organizer/manager for usenet and torrent users. %package firewalld Summary: firewalld configuration for Radarr %description firewalld firewalld configuration for Radarr %global debug_package %{nil} %prep %setup -q #export DOTNET_VERSION=$(dotnet --list-sdks | grep 6.0 | awk '{print $1}' | tail -1) #sed -i "s/\"version\": \".*\"/\"version\": \"$DOTNET_VERSION\"/" global.json # Fix error on vulnerability found sed -i 's/true/false/' src/Directory.Build.props %build export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 ./build.sh --backend --frontend %install mkdir -p %{buildroot}%{_libdir}/%{name}/ cp -ar _output/net6.0/linux-%{output_arch}/* %{buildroot}%{_libdir}/%{name}/ mkdir -p %{buildroot}%{_libdir}/%{name}/Radarr.Update cp -ar _output/Radarr.Update/net6.0/linux-%{output_arch}/* %{buildroot}%{_libdir}/%{name}/Radarr.Update mkdir -p %{buildroot}%{_libdir}/%{name}/UI cp -ar _output/UI/* %{buildroot}%{_libdir}/%{name}/UI mkdir -p %{buildroot}%{_unitdir} cp %{SOURCE1} %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_sharedstatedir}/%{name} mkdir -p %{buildroot}%{_bindir} tee %{buildroot}%{_bindir}/%{name} << EOF #!/bin/sh exec %{_libdir}/%{name}/Radarr \${@} EOF chmod +x %{buildroot}%{_bindir}/%{name} # firewalld install -p -m 644 -D %{SOURCE2} %{buildroot}%{_prefix}/lib/firewalld/services/%{name}.xml %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun %{name}.service %files %{_bindir}/%{name} %attr(755,servarr,servarr) %{_libdir}/%{name} %{_unitdir}/%{name}.service %attr(750,servarr,servarr) %dir %{_sharedstatedir}/%{name} %files firewalld %{_prefix}/lib/firewalld/services/%{name}.xml %post firewalld %firewalld_reload %changelog * Sat Jun 08 2024 Jonas Hucklenbroich 5.6.0.8846-6 - Add changelogs (jonas@hucklenbroich.org)