%ifarch aarch64 %define output_arch arm64 %else %define output_arch x64 %endif Name: Prowlarr Version: 1.18.0.4543 Release: 4%{?dist} Summary: Prowlarr, an indexer manager/proxy License: GPL-3.0 URL: https://prowlarr.com Source0: https://github.com/prowlarr/prowlarr/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: 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 Prowlarr, an indexer manager/proxy %package firewalld Summary: firewalld configuration for Radarr %description firewalld firewalld configuration for Prowlarr %global debug_package %{nil} %prep %setup -q 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}/Prowlarr.Update cp -ar _output/Prowlarr.Update/net6.0/linux-%{output_arch}/* %{buildroot}%{_libdir}/%{name}/Prowlarr.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}/Prowlarr \${@} 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 1.18.0.4543-4 - Add changelogs (jonas@hucklenbroich.org)