%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: prowlarr Version: 2.3.0.5236 Release: %autorelease Summary: Prowlarr is an indexer manager/proxy built on the popular *arr .net/reactjs base stack to integrate with your various PVR apps, supporting management of both Torrent Trackers and Usenet Indexers License: GPL-3.0-only URL: https://github.com/Prowlarr/Prowlarr 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 Prowlarr-%{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 export PROWLARRVERSION=%{version} export BUILD_SOURCEBRANCHNAME=develop ./build.sh \ --framework %{dotnet_framework} \ --runtime %{dotnet_runtime} \ --backend \ --frontend \ --packages %install install --directory "%{buildroot}%{_libexecdir}" cp --recursive _artifacts/%{dotnet_runtime}/%{dotnet_framework}/Prowlarr "%{buildroot}%{_libexecdir}/%{name}" rm --recursive --force "%{buildroot}%{_libexecdir}/%{name}/Prowlarr.Update" pushd "%{buildroot}%{_libexecdir}/%{name}" find . -name "Prowlarr" -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/%{name}.conf %files %doc README.md %license LICENSE %{_libexecdir}/%{name} %{_unitdir}/%{name}.service %{_prefix}/lib/systemd/system-preset/90-%{name}.preset %{_exec_prefix}/lib/tmpfiles.d/%{name}.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