%global debug_package %{nil} %global _build_id_links none %define dotnet_version 8.0 %define dotnet_framework net%{dotnet_version} %define dotnet_runtime %( \ if [ "%{_arch}" = "x86_64" ]; then \ echo -n "linux-x64"; \ elif [ "%{_arch}" = "aarch64" ]; then \ echo -n "linux-arm64"; \ else \ echo "Unsupported architecture: %{_arch}"; \ exit 1; \ fi \ ) Name: radarr Version: 6.0.4.10291 Release: %autorelease Summary: Movie organizer/manager for usenet and torrent users License: GPL-3.0-only URL: https://github.com/Radarr/Radarr Source0: %{url}/archive/refs/tags/v%{version}.tar.gz Source1: %{name}.sysusers Source2: %{name}.service Source3: %{name}-service.preset Source4: %{name}-tmpfiles.conf ExclusiveArch: x86_64 aarch64 BuildRequires: dotnet-sdk-%{dotnet_version} BuildRequires: findutils BuildRequires: jq BuildRequires: sed BuildRequires: systemd-rpm-macros BuildRequires: yarnpkg %{?systemd_requires} %{?sysusers_requires_compat} Requires: dotnet-runtime-%{dotnet_version} Requires: aspnetcore-runtime-%{dotnet_version} Requires: sqlite %description %{summary}. %prep %autosetup -n Radarr-%{version} %build export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 export SENTRY_DSN='' pushd / >/dev/null DOTNET_VERSION="$(dotnet --version)" popd >/dev/null jq --arg v "$DOTNET_VERSION" '.sdk.version = $v' global.json > global.json.new && mv --force global.json.new global.json sed --in-place 's/SelfContained=True/SelfContained=False/g' build.sh ./build.sh \ --framework %{dotnet_framework} \ --runtime %{dotnet_runtime} \ --backend \ --frontend \ --packages %install install --directory "%{buildroot}%{_libexecdir}" cp --recursive _artifacts/%{dotnet_runtime}/%{dotnet_framework}/Radarr "%{buildroot}%{_libexecdir}/radarr" rm --recursive --force "%{buildroot}%{_libexecdir}/radarr/Radarr.Update" pushd "%{buildroot}%{_libexecdir}/radarr" find . -name "ffprobe" -exec chmod a+x {} \; find . -name "Radarr" -exec chmod a+x {} \; popd install -D --mode=0644 "%{SOURCE2}" %{buildroot}%{_unitdir}/%{name}.service install -D --mode=0644 "%{SOURCE3}" %{buildroot}%{_prefix}/lib/systemd/system-preset/90-%{name}.preset install -D --mode=0644 "%{SOURCE4}" %{buildroot}%{_exec_prefix}/lib/tmpfiles.d/radarr.conf %files %doc README.md %license LICENSE %{_libexecdir}/radarr %{_unitdir}/%{name}.service %{_prefix}/lib/systemd/system-preset/90-%{name}.preset %{_exec_prefix}/lib/tmpfiles.d/radarr.conf %pre %sysusers_create_compat %{SOURCE1} %post %systemd_post %{name}.service %preun %systemd_preun %{name}.service %postun %systemd_postun_with_restart %{name}.service %changelog %autochangelog