mirror of
https://github.com/archlinux/aur.git
synced 2026-02-17 09:43:48 +01:00
Named per jkhsjdhjs from nzbhydra2-compiled, broken
This commit is contained in:
commit
b24a004884
9 changed files with 182 additions and 0 deletions
29
.SRCINFO
Normal file
29
.SRCINFO
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
pkgbase = nzbhydra2-nojava-bin
|
||||
pkgdesc = Search aggregator for newznab and torznab indexers.
|
||||
pkgver = 5.0.6
|
||||
pkgrel = 1
|
||||
url = https://github.com/theotherp/nzbhydra2
|
||||
arch = any
|
||||
license = Apache
|
||||
depends = python
|
||||
optdepends = jackett: torrent indexer proxy
|
||||
provides = nzbhydra2
|
||||
conflicts = nzbhydra2
|
||||
source = https://github.com/theotherp/nzbhydra2/releases/download/v5.0.6/nzbhydra2-5.0.6-linux.zip
|
||||
source = nzbhydra2.service
|
||||
source = nzbhydra2.tmpfiles
|
||||
source = nzbhydra2.sysusers
|
||||
source = nzbhydra2.sh
|
||||
source = wrapper-remove-base-path-checks.patch
|
||||
source = wrapper-remove-update-support.patch
|
||||
source = wrapper-remove-release-type-detection.patch
|
||||
sha256sums = 23251a8c72cbebd152b78931fed3d7edd2ebbec6e4a9817ed4875757c600b28a
|
||||
sha256sums = dc66acae9ec02f3e8a16653b1b8e1d35be6bfded46b1649a4db53541fbdd739f
|
||||
sha256sums = a9ceeed2b50d55c5e554c0d4c615e855fe4d3889eb118e37908fa04ffb7cb003
|
||||
sha256sums = 8f91eb4f98f7f5c11590b29b1394dfa7ca62ad115feeac4f402c9ac094fb925a
|
||||
sha256sums = 8127f92afb0f70b6f79c11db0219f8b2557cb7bcafa16fd6ddb2d61166d216fe
|
||||
sha256sums = 5660f26303826a0b8bf3f7c198c39e345e87b799e2304a79db5a77992d09cda4
|
||||
sha256sums = 35100f4e7ab5a480f5554d9abd32e8abac20d56f873f82ecbc906d0b3fdadc73
|
||||
sha256sums = defb77e7b19c6abfc8380cd175bc04062a0c52d1042b8e02173133367152c8e2
|
||||
|
||||
pkgname = nzbhydra2-nojava-bin
|
||||
53
PKGBUILD
Normal file
53
PKGBUILD
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# Maintainer: Gee
|
||||
|
||||
# From nzbhydra2-bin:
|
||||
# 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-nojava-bin"
|
||||
pkgver=5.0.6
|
||||
pkgrel=1
|
||||
pkgdesc="Search aggregator for newznab and torznab indexers."
|
||||
arch=('any')
|
||||
url="https://github.com/theotherp/nzbhydra2"
|
||||
license=('Apache')
|
||||
provides=('nzbhydra2')
|
||||
conflicts=('nzbhydra2')
|
||||
depends=('python')
|
||||
optdepends=('jackett: torrent indexer proxy')
|
||||
source=("https://github.com/theotherp/nzbhydra2/releases/download/v${pkgver}/${pkgname%-nojava-bin}-${pkgver}-linux.zip"
|
||||
'nzbhydra2.service'
|
||||
'nzbhydra2.tmpfiles'
|
||||
'nzbhydra2.sysusers'
|
||||
'nzbhydra2.sh'
|
||||
'wrapper-remove-base-path-checks.patch'
|
||||
'wrapper-remove-update-support.patch'
|
||||
'wrapper-remove-release-type-detection.patch')
|
||||
|
||||
sha256sums=('23251a8c72cbebd152b78931fed3d7edd2ebbec6e4a9817ed4875757c600b28a'
|
||||
'dc66acae9ec02f3e8a16653b1b8e1d35be6bfded46b1649a4db53541fbdd739f'
|
||||
'a9ceeed2b50d55c5e554c0d4c615e855fe4d3889eb118e37908fa04ffb7cb003'
|
||||
'8f91eb4f98f7f5c11590b29b1394dfa7ca62ad115feeac4f402c9ac094fb925a'
|
||||
'8127f92afb0f70b6f79c11db0219f8b2557cb7bcafa16fd6ddb2d61166d216fe'
|
||||
'5660f26303826a0b8bf3f7c198c39e345e87b799e2304a79db5a77992d09cda4'
|
||||
'35100f4e7ab5a480f5554d9abd32e8abac20d56f873f82ecbc906d0b3fdadc73'
|
||||
'defb77e7b19c6abfc8380cd175bc04062a0c52d1042b8e02173133367152c8e2')
|
||||
|
||||
prepare() {
|
||||
patch "${srcdir}/nzbhydra2wrapperPy3.py" < "${srcdir}/wrapper-remove-base-path-checks.patch"
|
||||
patch "${srcdir}/nzbhydra2wrapperPy3.py" < "${srcdir}/wrapper-remove-update-support.patch"
|
||||
patch "${srcdir}/nzbhydra2wrapperPy3.py" < "${srcdir}/wrapper-remove-release-type-detection.patch"
|
||||
}
|
||||
|
||||
package() {
|
||||
install -D -m 755 "${srcdir}/nzbhydra2.sh" "${pkgdir}/usr/bin/nzbhydra2.sh"
|
||||
install -D -m 755 "${srcdir}/nzbhydra2wrapperPy3.py" "${pkgdir}/usr/lib/nzbhydra2/nzbhydra2wrapperPy3.py"
|
||||
install -D -m 755 "${srcdir}/nzbhydra2" "${pkgdir}/usr/bin/nzbhydra2"
|
||||
install -D -m 755 "${srcdir}/core" "${pkgdir}/usr/bin/core"
|
||||
install -D -m 644 "${srcdir}/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"
|
||||
install -D -m 644 "${srcdir}/nzbhydra2.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/nzbhydra2.conf"
|
||||
}
|
||||
15
nzbhydra2.service
Normal file
15
nzbhydra2.service
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=NZBHydra2 Daemon
|
||||
Documentation=https://github.com/theotherp/nzbhydra2
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=nzbhydra2
|
||||
Group=nzbhydra2
|
||||
Type=simple
|
||||
WorkingDirectory=/usr/bin
|
||||
ExecStart=/usr/bin/nzbhydra2 --nobrowser --datafolder /var/lib/nzbhydra2
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
3
nzbhydra2.sh
Normal file
3
nzbhydra2.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env sh
|
||||
export NZBHYDRA_DISABLE_UPDATE=true
|
||||
exec /usr/lib/nzbhydra2/nzbhydra2wrapperPy3.py "$@"
|
||||
1
nzbhydra2.sysusers
Normal file
1
nzbhydra2.sysusers
Normal file
|
|
@ -0,0 +1 @@
|
|||
u nzbhydra2 - "nzbhydra2" /var/lib/nzbhydra2
|
||||
4
nzbhydra2.tmpfiles
Normal file
4
nzbhydra2.tmpfiles
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# Override this file with a modified version in /etc/tmpfiles.d/
|
||||
d /var/lib/nzbhydra2 0750 nzbhydra2 nzbhydra2
|
||||
Z /var/lib/nzbhydra2 - nzbhydra2 nzbhydra2
|
||||
L /var/log/nzbhydra2 - - - - /var/lib/nzbhydra2/logs/
|
||||
30
wrapper-remove-base-path-checks.patch
Normal file
30
wrapper-remove-base-path-checks.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
diff --git a/other/wrapper/nzbhydra2wrapperPy3.py b/other/wrapper/nzbhydra2wrapperPy3.py
|
||||
index e64c80d4..a9d8843c 100644
|
||||
--- a/other/wrapper/nzbhydra2wrapperPy3.py
|
||||
+++ b/other/wrapper/nzbhydra2wrapperPy3.py
|
||||
@@ -304,11 +304,6 @@ def startup():
|
||||
global jarFile, process, args, unknownArgs, consoleLines
|
||||
basePath = getBasePath()
|
||||
|
||||
- readme = os.path.join(basePath, "readme.md")
|
||||
- if not os.path.exists(readme):
|
||||
- logger.critical("Unable to determine base path correctly. Please make sure to run NZBHydra in the folder where its binary is located. Current base path: " + basePath)
|
||||
- sys.exit(-1)
|
||||
-
|
||||
releaseType = determineReleaseType()
|
||||
isWindows = platform.system().lower() == "windows"
|
||||
isWithTrayIcon = os.path.exists("isWindowsTrayMarkerFile")
|
||||
@@ -332,12 +327,8 @@ def startup():
|
||||
console_logger.setLevel("DEBUG")
|
||||
logger.info("Setting wrapper log level to DEBUG")
|
||||
|
||||
- libFolder = os.path.join(basePath, "lib")
|
||||
+ libFolder = basePath
|
||||
if releaseType == ReleaseType.GENERIC:
|
||||
- if not os.path.exists(libFolder):
|
||||
- logger.critical("Error: Lib folder %s not found. An update might've failed or the installation folder is corrupt", libFolder)
|
||||
- sys.exit(-1)
|
||||
-
|
||||
jarFiles = [os.path.join(libFolder, f) for f in os.listdir(libFolder) if os.path.isfile(os.path.join(libFolder, f)) and f.endswith(".jar")]
|
||||
if len(jarFiles) == 0:
|
||||
logger.critical("Error: No JAR files found in folder %s. An update might've failed or the installation folder is corrupt", libFolder)
|
||||
24
wrapper-remove-release-type-detection.patch
Normal file
24
wrapper-remove-release-type-detection.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
diff --git a/other/wrapper/nzbhydra2wrapperPy3.py b/other/wrapper/nzbhydra2wrapperPy3.py
|
||||
index e64c80d4..bd9e57ba 100644
|
||||
--- a/other/wrapper/nzbhydra2wrapperPy3.py
|
||||
+++ b/other/wrapper/nzbhydra2wrapperPy3.py
|
||||
@@ -491,18 +491,7 @@ def startup():
|
||||
|
||||
|
||||
def determineReleaseType():
|
||||
- if os.path.exists("lib"):
|
||||
- releaseType = ReleaseType.GENERIC
|
||||
- if os.path.exists("core") or os.path.exists("core.exe"):
|
||||
- logger.warning("lib folder and core(.exe) found. Either delete the executable to use the generic release type (using java and ignoring the executable) or delete the lib folder to use the executable and not require java")
|
||||
- elif os.path.exists("core") or os.path.exists("core.exe"):
|
||||
- releaseType = ReleaseType.NATIVE
|
||||
- else:
|
||||
- logger.critical(
|
||||
- "Unable to determine the release type. Neither lib folder nor core(.exe) found")
|
||||
- sys.exit(-1)
|
||||
- logger.info("Determined release type: " + releaseType)
|
||||
- return releaseType
|
||||
+ return ReleaseType.GENERIC
|
||||
|
||||
|
||||
def escape_parameter(is_windows, parameter):
|
||||
23
wrapper-remove-update-support.patch
Normal file
23
wrapper-remove-update-support.patch
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
diff --git a/other/wrapper/nzbhydra2wrapperPy3.py b/other/wrapper/nzbhydra2wrapperPy3.py
|
||||
index e64c80d4..50678569 100644
|
||||
--- a/other/wrapper/nzbhydra2wrapperPy3.py
|
||||
+++ b/other/wrapper/nzbhydra2wrapperPy3.py
|
||||
@@ -640,8 +640,7 @@ def main(arguments):
|
||||
global internalApiKey
|
||||
internalApiKey = args.internalApiKey
|
||||
if args.update:
|
||||
- logger.info("Executing update")
|
||||
- update()
|
||||
+ logger.error("Updating is not supported.")
|
||||
sys.exit(0)
|
||||
if "--version" in unknownArgs or "--help" in unknownArgs:
|
||||
# no fancy shit, just start the file
|
||||
@@ -693,7 +692,7 @@ def main(arguments):
|
||||
|
||||
if controlCode == 11:
|
||||
logger.info("NZBHydra main process has terminated for updating")
|
||||
- update()
|
||||
+ logger.warning("Updating is not supported. Restarting...")
|
||||
doStart = True
|
||||
elif controlCode == 22:
|
||||
logger.info("NZBHydra main process has terminated for restart")
|
||||
Loading…
Add table
Reference in a new issue