Name: sabnzbd Version: 4.3.2 Release: 2%{?dist} Summary: SABnzbd - The automated Usenet download tool License: GPL-2.0 URL: https://sabnzbd.org/ Source0: https://github.com/sabnzbd/sabnzbd/archive/%{version}/%{name}-%{version}.tar.gz Source1: %{name}.service Source2: %{name}-firewalld.xml Source3: %{name}.ini Patch0: SABnzbd.py.patch %{?systemd_requires} BuildRequires: python3-devel BuildRequires: systemd-rpm-macros BuildRequires: firewalld-filesystem Requires: python3-apprise Requires: python3-cheetah Requires: python3-cherrypy Requires: python3-cheroot Requires: python3-chardet Requires: python3-configobj Requires: python3-dbus Requires: python3-feedparser Requires: python3-portend Requires: python3-sabctools Requires: python3-guessit Requires: python3-puremagic Requires: python3-pysocks Requires: par2cmdline Requires: p7zip Requires: unrar Requires: servarr-user Requires: %{name}-firewalld %global _build_id_links none %description SABnzbd - The automated Usenet download tool %package firewalld Summary: firewalld configuration for Radarr %description firewalld firewalld configuration for Radarr %global debug_package %{nil} %prep %autosetup # Set python and data directory (templates etc.) sed -i 's;@@python3@@;%{python3};' SABnzbd.py sed -i 's;@@DATADIR@@;%{_datarootdir}/%{name};' SABnzbd.py # Set directories in default config sed -i 's;@@DOWNLOADDIR@@;%{_sharedstatedir}/%{name};' %{SOURCE3} sed -i 's;@@ADMINDIR@@;%{_sharedstatedir}/%{name};' %{SOURCE3} sed -i 's;@@LOGDIR@@;%{_localstatedir}/log/%{name};' %{SOURCE3} sed -i 's;@@CONFIGFILE@@;%{_sysconfdir}/%{name}/%{name}.ini;' %{SOURCE1} %build %{python3} tools/make_mo.py %install install -p -m 755 -D SABnzbd.py %{buildroot}%{_bindir}/SABnzbd.py mkdir -p %{buildroot}%{python3_sitelib}/%{name} cp -ar sabnzbd/* %{buildroot}%{python3_sitelib}/%{name} chmod -R 755 %{buildroot}%{python3_sitelib}/%{name} mkdir -p %{buildroot}%{_datarootdir}/%{name} cp -ar email %{buildroot}%{_datarootdir}/%{name} cp -ar icons %{buildroot}%{_datarootdir}/%{name} cp -ar interfaces %{buildroot}%{_datarootdir}/%{name} cp -ar locale %{buildroot}%{_datarootdir}/%{name} cp -ar po %{buildroot}%{_datarootdir}/%{name} cp -ar tools %{buildroot}%{_datarootdir}/%{name} mkdir -p %{buildroot}%{_sharedstatedir}/%{name} # config mkdir -p %{buildroot}%{_sysconfdir}/%{name} cp %{SOURCE3} %{buildroot}%{_sysconfdir}/%{name}/%{name}.ini # log mkdir -p %{buildroot}%{_localstatedir}/log/%{name} # service mkdir -p %{buildroot}%{_unitdir} cp %{SOURCE1} %{buildroot}%{_unitdir} # 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}/SABnzbd.py %{python3_sitelib}/%{name} %{_unitdir}/%{name}.service %attr(750,servarr,servarr)%dir %{_sharedstatedir}/%{name} %{_datarootdir}/%{name} %attr(750,servarr,servarr) %dir %{_sysconfdir}/%{name} %attr(750,servarr,servarr) %config %{_sysconfdir}/%{name}/%{name}.ini %attr(750,servarr,servarr) %dir %{_localstatedir}/log/%{name} %files firewalld %{_prefix}/lib/firewalld/services/%{name}.xml %post firewalld %firewalld_reload %changelog * Thu Jun 06 2024 Jonas Hucklenbroich 4.3.2-2 - Change sabnzbd spec file to autosetup (jonas@hucklenbroich.org) * Tue Jun 04 2024 Jonas Hucklenbroich 4.3.2-1 - new package built with tito