commit:     de78a88c6827bcb439b7fc8b088c93a3e8c254c0
Author:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 28 23:21:54 2025 +0000
Commit:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Sat Jun 28 23:22:33 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de78a88c

net-nntp/nzbget: add 25.1

Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>

 net-nntp/nzbget/Manifest                           |   2 +
 ...nzbget-25.1-build-with-par2-turbo-offline.patch |  17 +++
 net-nntp/nzbget/nzbget-25.1.ebuild                 | 120 +++++++++++++++++++++
 3 files changed, 139 insertions(+)

diff --git a/net-nntp/nzbget/Manifest b/net-nntp/nzbget/Manifest
index 905b45b0de6a..2e276629a1c0 100644
--- a/net-nntp/nzbget/Manifest
+++ b/net-nntp/nzbget/Manifest
@@ -2,4 +2,6 @@ DIST nzbget-21.1.tar.gz 1988916 BLAKE2B 
74298c5c7f3986831f36832a8ffe596543196b5b
 DIST nzbget-24.2.tar.gz 5512752 BLAKE2B 
ef4c6e562976030b790a93747d11d6b7059be7cb8bc9076068c037a0e8d25f09054ff280417b52f534af50aec0f11cd21959f995ae8252a21ea274aa7efdfc84
 SHA512 
ad280315f9a60bf206a134e3703337af2e2dfb8282dd5efc55af071f82f5f7e7857f819dd843f6ae70cd7fcea2c84de4db535d7658fb5255a380ffcf685a680f
 DIST nzbget-24.8.tar.gz 7299541 BLAKE2B 
d9cee4fe3f320f3b489f295fd664492680598f68afa21373a33398f93bdf9adabe6bd4f1d9dd060af26161def46a9b2570b8bc496fa89405ae0651c3f5e0b16c
 SHA512 
6701ba9659bf62ca025787566e9488700d981476c51626f44fac8348c4978a8e208b9b4a7d464fd598312fc8cdfc4e5e4302b33dcfa0df0cc281af4357eb4e90
 DIST nzbget-25.0.tar.gz 7315774 BLAKE2B 
af116e68bd716402b5c55becf0d9ea89e959ddb0dd4f6359ac315a8d489d9351954b17784bdfd5bf134abe602a7a24574d74d2744f5d89f59c7e87dcea10db8b
 SHA512 
0e265af8e20d2de585698750dd42ea84f7001f74b8ffab22929de4face27ed49ba64ef72afa167f0cca4e5db7f6bd6b5d2f4194e5311ffcbda39e613f7643450
+DIST nzbget-25.1.tar.gz 7321033 BLAKE2B 
9174f10b8b894f6c631631b8a07fac82f39582e931b601c24c9af7f899453d62a7add84bb553d1926236930e7790e57469ba7611120f85143cbdd7cbc4d7e59d
 SHA512 
44ccb2fda2645e3a0936bd758ab809917a1da603261c322c590bd111fddaef77ddcb88f06ac45480d747db196f92825c5943544059e6dbdb92a7693bf68eb74f
 DIST nzbgetcom-par2turbo-1.2.0-nzbget-20250213.tar.gz 3964785 BLAKE2B 
049771c21a5febe453d2866eebca3a91c145f5b054f2dfa8226d0b5245753506c184f1ad7739bd76eaad0343e87bc0e7abc2830b3cedd6e459bef64f596e3853
 SHA512 
fdf639759361440fef6948a61391ad579070575a2d9a62a39b0e5ff87beb365d4baab2a56fffb672e78a2094748fbf0d17abc50144914e5fb5ffe432e9c02a9d
+DIST nzbgetcom-par2turbo-1.3.0.tar.gz 3969491 BLAKE2B 
7862bb25211a1784e5326a85daebfa5bdd45c56c782691b12285b331f6fa0fa2fad11b358baad0d83f6e1e8372a9fb41549a273409b8bf1e957eba1336d89b41
 SHA512 
d8ddfc0789d915241a474ae71b6a7ac8ad2d814aa32f357e206f5849d3c0e34bb4a8408427bb9ddca0fb21c08973a6e35a83681699d568701bcab28fd3416b71

diff --git 
a/net-nntp/nzbget/files/nzbget-25.1-build-with-par2-turbo-offline.patch 
b/net-nntp/nzbget/files/nzbget-25.1-build-with-par2-turbo-offline.patch
new file mode 100644
index 000000000000..9870e55f8cb3
--- /dev/null
+++ b/net-nntp/nzbget/files/nzbget-25.1-build-with-par2-turbo-offline.patch
@@ -0,0 +1,17 @@
+Patch the build system to support par2-turbo downloaded into the source
+directory.
+--- a/cmake/par2-turbo.cmake
++++ b/cmake/par2-turbo.cmake
+@@ -42,11 +42,7 @@ endif()
+ ExternalProject_add(
+       par2-turbo
+       PREFIX                  par2-turbo
+-      GIT_REPOSITORY  https://github.com/nzbgetcom/par2cmdline-turbo.git
+-      GIT_TAG                 v1.3.0
+-      TLS_VERIFY              TRUE
+-      GIT_SHALLOW             TRUE
+-      GIT_PROGRESS    TRUE
++      URL par2-turbo
+       DOWNLOAD_EXTRACT_TIMESTAMP      TRUE
+       BUILD_BYPRODUCTS ${PAR2_LIBS}
+       CMAKE_ARGS               ${CMAKE_ARGS}

diff --git a/net-nntp/nzbget/nzbget-25.1.ebuild 
b/net-nntp/nzbget/nzbget-25.1.ebuild
new file mode 100644
index 000000000000..5417577f57e5
--- /dev/null
+++ b/net-nntp/nzbget/nzbget-25.1.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake systemd
+
+PAR2_TURBO_VER="1.3.0"
+DESCRIPTION="A command-line based binary newsgrabber supporting .nzb files"
+HOMEPAGE="https://nzbget.com/";
+SRC_URI="
+       parcheck? (
+               
https://github.com/nzbgetcom/par2cmdline-turbo/archive/v${PAR2_TURBO_VER}.tar.gz
+                       -> nzbgetcom-par2turbo-${PAR2_TURBO_VER}.tar.gz
+       )
+       https://github.com/nzbgetcom/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
+IUSE="ncurses +parcheck ssl test zlib"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+       dev-libs/boost:=
+       dev-libs/libxml2:=
+       ncurses? ( sys-libs/ncurses:0= )
+       ssl? ( dev-libs/openssl:0=[-bindist(-)] )
+       zlib? ( sys-libs/zlib:= )"
+RDEPEND="
+       ${DEPEND}
+       acct-user/nzbget
+       acct-group/nzbget
+"
+BDEPEND="
+       test? (
+               || (
+                       app-arch/rar
+                       app-arch/unrar
+               )
+       )
+       virtual/pkgconfig
+"
+
+DOCS=( ChangeLog.md README.md nzbget.conf )
+
+PATCHES=(
+       # Required to use par2-turbo downloaded into the source directory
+       "${FILESDIR}/${PN}-25.1-build-with-par2-turbo-offline.patch"
+)
+
+src_prepare() {
+       if use parcheck; then
+               mv "${WORKDIR}/par2cmdline-turbo-${PAR2_TURBO_VER}" par2-turbo 
|| die
+       fi
+       cmake_src_prepare
+
+       # Update the main configuration file with the correct paths
+       sed -i nzbget.conf \
+               -e "s:^WebDir=.*:WebDir=${EPREFIX}/usr/share/nzbget/webui:" \
+               -e 
"s:^ConfigTemplate=.*:ConfigTemplate=${EPREFIX}/usr/share/nzbget/nzbget.conf:" \
+               || die
+       # Update the daemon-specific configuration file (used by the OpenRC and
+       # systemd services)
+       sed nzbget.conf > nzbgetd.conf \
+               -e "s:^MainDir=.*:MainDir=${EPREFIX}/var/lib/nzbget:" \
+               -e 
"s:^LogFile=.*:LogFile=${EPREFIX}/var/log/nzbget/nzbget.log:" \
+               -e 's:^DaemonUsername=.*:DaemonUsername=nzbget:' \
+               || die
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DDISABLE_CURSES=$(usex !ncurses)
+               -DDISABLE_PARCHECK=$(usex !parcheck)
+               -DDISABLE_TLS=$(usex !ssl)
+               -DDISABLE_GZIP=$(usex !zlib)
+               -DENABLE_TESTS=$(usex test)
+       )
+       cmake_src_configure
+}
+
+src_install() {
+       cmake_src_install
+
+       insinto /etc
+       doins nzbget.conf
+       doins nzbgetd.conf
+
+       # The configuration file's "ConfigTemplate" option points to this, we 
must
+       # make sure it exists as the Web UI reads it. It is not installed by
+       # default, see the "install-conf" target in cmake/install.cmake.
+       insinto /usr/share/nzbget
+       doins nzbget.conf
+
+       keepdir /var/log/nzbget
+
+       newinitd "${FILESDIR}"/nzbget.initd-r1 nzbget
+       newconfd "${FILESDIR}"/nzbget.confd nzbget
+       systemd_dounit "${FILESDIR}"/nzbget.service
+}
+
+pkg_preinst() {
+       fowners nzbget:nzbget /var/log/nzbget
+       fperms 750 /var/log/nzbget
+
+       fowners nzbget:nzbget /etc/nzbgetd.conf
+       fperms 640 /etc/nzbgetd.conf
+}
+
+pkg_postinst() {
+       if [[ -z ${REPLACING_VERSIONS} ]] ; then
+               elog
+               elog "Please add users that you want to be able to use the 
system-wide"
+               elog "nzbget daemon to the nzbget group. To access the daemon, 
run nzbget"
+               elog "with the --configfile /etc/nzbgetd.conf option."
+               elog
+       fi
+}

Reply via email to