%global _hardened_build 1 Name: nzbget Summary: A binary newsgrabber Version: 21.1 Release: 3%{?dist} License: GPL-2.0 Group: Applications/Internet Url: http://nzbget.net/ Source0: %{name}-%{version}-src.tar.gz Source1: nzbgetd.service BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: pkgconfig BuildRequires: libxml2-devel BuildRequires: ncurses-devel BuildRequires: libsigc++20-devel BuildRequires: openssl-devel BuildRequires: libgcrypt-devel BuildRequires: zlib-devel BuildRequires: libcurl-devel Requires(post): systemd Requires(preun): systemd Requires(postun): systemd BuildRequires: systemd Requires(pre): shadow-utils Patch3: nzbget-21.1-libcurl.patch Patch4: nzbget-21.1-openssl3-fips.patch %description NZBGet is a binary newsgrabber, which downloads files from usenet based on information given in nzb-files. NZBGet can be used in standalone and in server/client modes. %prep %autosetup -p1 sed -i -e 's|\r||' ChangeLog sed -i -e 's|^MainDir=.*|MainDir=/var/spool/nzbget|' nzbget.conf %build %configure \ --with-tlslib=OpenSSL \ --with-libcurl make %{?_smp_mflags} %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} make install-conf DESTDIR=%{buildroot} # "make install" puts stuff in the docdir that we don't want rm -rf %{buildroot}%{_defaultdocdir} find %{buildroot} -type f | xargs sed -i "s|%{buildroot}||g" %{__install} -d %{buildroot}%{_unitdir} %{__install} --mode=644 %{SOURCE1} %{buildroot}%{_unitdir}/nzbgetd.service %{__install} -d %{buildroot}%{_localstatedir}/spool/nzbget %{__install} -d %{buildroot}%{_localstatedir}/spool/nzbget/dst # Explicitly ues python3 sed -i -e 's,#!/usr/bin/env python,#!/usr/bin/env python3,' %{buildroot}%{_datadir}/nzbget/scripts/*.py %files %defattr(-, root, root) %doc %attr(644,root,root) COPYING ChangeLog README %{_bindir}/%{name} %{_datadir}/%{name} %{_unitdir}/nzbgetd.service %{_sysconfdir}/nzbget.conf %dir %{_localstatedir}/spool/nzbget %attr(-, nzbget, nzbget) %{_localstatedir}/spool/nzbget/* %pre getent group nzbget >/dev/null || groupadd -r nzbget getent passwd nzbget >/dev/null || \ useradd -r -g nzbget -d /var/spool/nzbget -s /sbin/nologin \ -c "NZBGet Daemon" nzbget exit 0 %post %systemd_post nzbgetd.service %preun %systemd_preun nzbgetd.service %postun %systemd_postun_with_restart nzbgetd.service %changelog * Fri Feb 18 2022 Ralf Ertzinger - 21.1-3 - Fix builds against OpenSSL 3.0 and higher * Fri Feb 18 2022 Ralf Ertzinger - 21.1-2 - Rebuild with OpenSSL instead of GnuTLS * Thu Jul 29 2021 Ralf Ertzinger - 21.1-1 - Update to 21.1 * Sun Dec 29 2019 Ralf Ertzinger - 21.0-9 - Rebuild with updated libcurl patch * Sat Nov 09 2019 Ralf Ertzinger - 21.0-8 - Build with libcurl patch * Mon Oct 14 2019 Ralf Ertzinger - 21.0-2 - Add patch to fix aborts on non-fatal TLS errors with gnutls * Mon Aug 12 2019 Ralf Ertzinger - Update to 21.0 * Sat Jul 15 2017 Ralf Ertzinger - Update to 19.1 * Sat May 13 2017 Ralf Ertzinger - Update ot 18.1 * Sat Nov 05 2016 Ralf Ertzinger - Update to 17.1 * Wed Apr 27 2016 Ralf Ertzinger - Update to 16.4 * Fri Dec 5 2014 Joshua Rich - 14.1 * Thu Oct 2 2014 Joshua Rich - Version bump. - Switch to hardened build. * Tue Jul 1 2014 Joshua Rich - small tweaks in spec file