summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD57
-rw-r--r--disable-update-checks.patch13
-rw-r--r--nzbhydra2.service6
-rw-r--r--nzbhydra2.sh11
-rw-r--r--nzbhydra2.tmpfiles3
-rw-r--r--skip-unneeded-builds.patch15
7 files changed, 105 insertions, 27 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e542ac7c978e..9c1ab7ad2aa0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,29 @@
pkgbase = nzbhydra2
- pkgdesc = Meta search for NZB indexers
- pkgver = 2.7.1
+ pkgdesc = Search aggregator for newznab and torznab indexers.
+ pkgver = 6.0.0
pkgrel = 1
url = https://github.com/theotherp/nzbhydra2
arch = any
license = Apache
- depends = python2
- depends = java-runtime-headless>=8
- source = https://github.com/theotherp/nzbhydra2/releases/download/v2.7.1/nzbhydra2-2.7.1-linux.zip
+ makedepends = maven
+ makedepends = java-environment=17
+ depends = python
+ depends = java-runtime-headless=17
+ optdepends = jackett: torrent indexer proxy
+ options = !debug
+ source = nzbhydra2-6.0.0.tar.gz::https://github.com/theotherp/nzbhydra2/archive/refs/tags/v6.0.0.tar.gz
source = nzbhydra2.service
source = nzbhydra2.tmpfiles
source = nzbhydra2.sysusers
- sha256sums = dbce6943bbcaf25ae9cf810b3b512ce1e6407460108a3e3ce7a57b368101a9f8
- sha256sums = 8c864fa865c92a6e0182f4dd3d4032ad85f09d021444cca217efafecbeff33c3
- sha256sums = 464bffa0e7bf99ccd7bbcdb787b25b53b7692f86f081a4fe347b92f88c56fb09
+ source = nzbhydra2.sh
+ source = disable-update-checks.patch
+ source = skip-unneeded-builds.patch
+ sha256sums = 55227f046005a908b107beaab4df750088df5c40bf30eff6eeadd7c97c5c3f80
+ sha256sums = 86c2f02cb8913c3093b1669247447691329bf5bd88fee1b8f2977cff96775655
+ sha256sums = a9ceeed2b50d55c5e554c0d4c615e855fe4d3889eb118e37908fa04ffb7cb003
sha256sums = 8f91eb4f98f7f5c11590b29b1394dfa7ca62ad115feeac4f402c9ac094fb925a
+ sha256sums = ed649f9b5d9f9f561829f8a563d28c1335945785b08b887634be15bc742cb4e7
+ sha256sums = 20c57da3a877f0390778b88cbea2f98cc88fd59a2e6f15895fd6a2ef69b245a7
+ sha256sums = fa133df02514af1fd10d282f6b52f03d70778dc9fdf55ca2469bc124f8c815d0
pkgname = nzbhydra2
-
diff --git a/PKGBUILD b/PKGBUILD
index ed7781df63f6..3b0638ae4441 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,59 @@
# Maintainer: Donald Webster <fryfrog@gmail.com>
# Maintainer: Daniel Egeberg <daniel.egeberg@gmail.com>
+# Co-Maintainer: Leon Möller <jkhsjdhjs at totally dot rip>
pkgname="nzbhydra2"
-pkgver=2.7.1
+pkgver=6.0.0
pkgrel=1
-pkgdesc="Meta search for NZB indexers"
+pkgdesc="Search aggregator for newznab and torznab indexers."
arch=('any')
url="https://github.com/theotherp/nzbhydra2"
license=('Apache')
-depends=('python2' 'java-runtime-headless>=8')
-
-source=("https://github.com/theotherp/nzbhydra2/releases/download/v${pkgver}/${pkgname}-${pkgver}-linux.zip"
+depends=('python' 'java-runtime-headless=17')
+makedepends=('maven' 'java-environment=17')
+optdepends=('jackett: torrent indexer proxy')
+options=(!debug)
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/theotherp/nzbhydra2/archive/refs/tags/v${pkgver}.tar.gz"
'nzbhydra2.service'
'nzbhydra2.tmpfiles'
- 'nzbhydra2.sysusers')
+ 'nzbhydra2.sysusers'
+ 'nzbhydra2.sh'
+ 'disable-update-checks.patch'
+ 'skip-unneeded-builds.patch')
+
+sha256sums=('55227f046005a908b107beaab4df750088df5c40bf30eff6eeadd7c97c5c3f80'
+ '86c2f02cb8913c3093b1669247447691329bf5bd88fee1b8f2977cff96775655'
+ 'a9ceeed2b50d55c5e554c0d4c615e855fe4d3889eb118e37908fa04ffb7cb003'
+ '8f91eb4f98f7f5c11590b29b1394dfa7ca62ad115feeac4f402c9ac094fb925a'
+ 'ed649f9b5d9f9f561829f8a563d28c1335945785b08b887634be15bc742cb4e7'
+ '20c57da3a877f0390778b88cbea2f98cc88fd59a2e6f15895fd6a2ef69b245a7'
+ 'fa133df02514af1fd10d282f6b52f03d70778dc9fdf55ca2469bc124f8c815d0')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 < "${srcdir}/disable-update-checks.patch"
+ patch -p1 < "${srcdir}/skip-unneeded-builds.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
-sha256sums=('dbce6943bbcaf25ae9cf810b3b512ce1e6407460108a3e3ce7a57b368101a9f8'
- '8c864fa865c92a6e0182f4dd3d4032ad85f09d021444cca217efafecbeff33c3'
- '464bffa0e7bf99ccd7bbcdb787b25b53b7692f86f081a4fe347b92f88c56fb09'
- '8f91eb4f98f7f5c11590b29b1394dfa7ca62ad115feeac4f402c9ac094fb925a')
+ export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
+ mvn -Dmaven.test.skip -pl core -am clean package
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
+ mvn -pl core -am test
+}
package() {
- install -d -m 755 "${pkgdir}/usr/lib/nzbhydra2"
- cp -dpr --no-preserve=ownership "${srcdir}/lib" "${srcdir}/readme.md" "${pkgdir}/usr/lib/nzbhydra2"
- install -D -m 755 "${srcdir}/nzbhydra2wrapper.py" "${pkgdir}/usr/lib/nzbhydra2/nzbhydra2wrapper.py"
- install -D -m 755 "${srcdir}/nzbhydra2" "${pkgdir}/usr/lib/nzbhydra2"
+ install -D -m 755 "${srcdir}/nzbhydra2.sh" "${pkgdir}/usr/bin/nzbhydra2"
+ install -D -m 755 "${srcdir}/${pkgname}-${pkgver}/other/wrapper/nzbhydra2wrapperPy3.py" "${pkgdir}/usr/lib/nzbhydra2/nzbhydra2wrapperPy3.py"
+ install -D -m 644 "${srcdir}/${pkgname}-${pkgver}/core/target/core-${pkgver}-exec.jar" "${pkgdir}/usr/share/java/nzbhydra2/core-${pkgver}-exec.jar"
+ install -D -m 644 "${srcdir}/${pkgname}-${pkgver}/readme.md" "${pkgdir}/usr/share/doc/nzbhydra2/readme.md"
install -D -m 644 "${srcdir}/nzbhydra2.service" "${pkgdir}/usr/lib/systemd/system/nzbhydra2.service"
install -D -m 644 "${srcdir}/nzbhydra2.sysusers" "${pkgdir}/usr/lib/sysusers.d/nzbhydra2.conf"
diff --git a/disable-update-checks.patch b/disable-update-checks.patch
new file mode 100644
index 000000000000..1cb959efabe6
--- /dev/null
+++ b/disable-update-checks.patch
@@ -0,0 +1,13 @@
+diff --git a/core/src/main/resources/config/baseConfig.yml b/core/src/main/resources/config/baseConfig.yml
+index a3ca40b2..5a40ba00 100644
+--- a/core/src/main/resources/config/baseConfig.yml
++++ b/core/src/main/resources/config/baseConfig.yml
+@@ -316,7 +316,7 @@ main:
+ sslKeyStorePassword: null
+ startupBrowser: true
+ theme: "grey"
+- updateCheckEnabled: true
++ updateCheckEnabled: false
+ updateAutomatically: false
+ updateToPrereleases: false
+ urlBase: "/"
diff --git a/nzbhydra2.service b/nzbhydra2.service
index ce09a09e9cc0..0728380b4485 100644
--- a/nzbhydra2.service
+++ b/nzbhydra2.service
@@ -1,3 +1,6 @@
+# Be sure to use `systemctl edit nzbhydra2` to modify this service with an override.conf because
+# direct changes will be overwritten by package updates.
+
[Unit]
Description=NZBHydra2 Daemon
Documentation=https://github.com/theotherp/nzbhydra2
@@ -7,8 +10,7 @@ After=network.target
User=nzbhydra2
Group=nzbhydra2
Type=simple
-WorkingDirectory=/usr/lib/nzbhydra2
-ExecStart=/usr/bin/python2 /usr/lib/nzbhydra2/nzbhydra2wrapper.py --nobrowser --datafolder /var/lib/nzbhydra2
+ExecStart=/usr/bin/nzbhydra2 --nobrowser --datafolder /var/lib/nzbhydra2
Restart=always
[Install]
diff --git a/nzbhydra2.sh b/nzbhydra2.sh
new file mode 100644
index 000000000000..357c9ca3f744
--- /dev/null
+++ b/nzbhydra2.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env sh
+
+export HYDRAWORKINGFOLDER=/usr/share/java/nzbhydra2
+export NZBHYDRA_DISABLE_UPDATE=true
+export NZBHYDRA_DISABLE_UPDATE_ON_SHUTDOWN=1
+export NZBHYDRA_DISABLE_WRAPPER_CHECK=1
+export NZBHYDRA_SKIP_BASE_PATH_CHECK=1
+export NZBHYDRA_USE_BASE_PATH_FOR_LIBS=1
+export NZBHYDRA_FORCE_GENERIC=generic
+
+exec /usr/lib/nzbhydra2/nzbhydra2wrapperPy3.py "$@"
diff --git a/nzbhydra2.tmpfiles b/nzbhydra2.tmpfiles
index 9d212b522c5e..51864bfae4ec 100644
--- a/nzbhydra2.tmpfiles
+++ b/nzbhydra2.tmpfiles
@@ -1,5 +1,4 @@
# Override this file with a modified version in /etc/tmpfiles.d/
-d /var/lib/nzbhydra2 0755 nzbhydra2 nzbhydra2
+d /var/lib/nzbhydra2 0750 nzbhydra2 nzbhydra2
Z /var/lib/nzbhydra2 - nzbhydra2 nzbhydra2
-Z /usr/lib/nzbhydra2 - nzbhydra2 nzbhydra2
L /var/log/nzbhydra2 - - - - /var/lib/nzbhydra2/logs/
diff --git a/skip-unneeded-builds.patch b/skip-unneeded-builds.patch
new file mode 100644
index 000000000000..d360e81a8447
--- /dev/null
+++ b/skip-unneeded-builds.patch
@@ -0,0 +1,15 @@
+diff --git a/other/pom.xml b/other/pom.xml
+index d0aa614c..87ba7c2f 100644
+--- a/other/pom.xml
++++ b/other/pom.xml
+@@ -10,10 +10,7 @@
+ <packaging>pom</packaging>
+
+ <modules>
+- <module>mockserver</module>
+ <module>sockslib</module>
+- <module>github-release-plugin</module>
+- <module>discord-releaser</module>
+ </modules>
+
+ <properties>