diff options
author | Daniel Egeberg | 2016-01-13 16:42:49 +0100 |
---|---|---|
committer | Daniel Egeberg | 2016-01-13 16:42:49 +0100 |
commit | 6d6522b60b1f347de30eb85f238707312392ea9e (patch) | |
tree | 2368fd429190fcf330ee36b92147b1c0bf23575a | |
download | aur-6d6522b60b1f347de30eb85f238707312392ea9e.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 37 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 67 | ||||
-rw-r--r-- | nzbhydra.install | 19 | ||||
-rw-r--r-- | nzbhydra.service | 13 | ||||
-rwxr-xr-x | nzbhydra.sh | 2 |
6 files changed, 142 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..6137be8a8a02 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,37 @@ +# Generated by mksrcinfo v8 +# Wed Jan 13 15:41:35 UTC 2016 +pkgbase = nzbhydra-git + pkgdesc = Meta search for NZB indexers + pkgver = r375.0b09898 + pkgrel = 1 + url = https://github.com/theotherp/nzbhydra + install = nzbhydra.install + arch = any + license = Apache + makedepends = git + depends = python2 + optdepends = python2-lxml: faster result processing + provides = nzbhydra + source = nzbhydra-git::git+https://github.com/theotherp/nzbhydra.git + source = nzbhydra.sh + source = nzbhydra.service + source = nzbhydra.install + md5sums = SKIP + md5sums = 1430b962bb52c75abee5a63347e61dbd + md5sums = 66ff80d1a9bc2079cd5fd44134467159 + md5sums = 4cb81156eb125cf6daefc2389ccf050a + sha1sums = SKIP + sha1sums = 9c928da41170ec913463347a833a0caad052b342 + sha1sums = 02e37e3aa125ed6a95b1cdcd36c265a81b4e8ec7 + sha1sums = 28d5f16cea5130ae7cc6844c486d001f18daba88 + sha256sums = SKIP + sha256sums = 91552953d0d956101136cd3165f217de4d14eb65042b7dd3e9a09c8657319436 + sha256sums = 9035c3c2a7d773ddadefb207cc0690629283f60903189ad595dd8de098c4457f + sha256sums = 4419c7faed911a03ea0c9ccafa69607d2038cf49a508aa5595d9732146204649 + sha512sums = SKIP + sha512sums = 83aacf4f4f33af8d8cb99f1063958b44773f04ba168aaba12a303d1944a74f8ca729c483c57e2e8b8cadb7fac706d7297fc2de505a1c5608a8c09ddeee7690bf + sha512sums = b7157d91508e8c4b07a47bd201bf93b69ef119d1090a9f66c8feeb4980028869a67c99c46a6a51bb8ef4dd774daf3a3cf97af83b7d3ee943f5404325032ce70f + sha512sums = b3605cb1e8fb70c6ca246e82a0c9e10a1659d6907f5e18f0a39e63ff33cbc55b57cfc8ee113be0ae07e0cee08859009346377ac5a51ac17dc48ff906fb6873c7 + +pkgname = nzbhydra-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..2be6aa2cf0ec --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +nzbhydra-git +nzbhydra-git-*.pkg.tar.xz +pkg +src diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..cd523994dfc7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,67 @@ +# Maintainer: Daniel Egeberg <daniel.egeberg@gmail.com> +pkgname="nzbhydra-git" +pkgver=r375.0b09898 +pkgrel=1 +pkgdesc="Meta search for NZB indexers" +arch=('any') +url="https://github.com/theotherp/nzbhydra" +license=('Apache') +depends=('python2') +optdepends=('python2-lxml: faster result processing') +makedepends=('git') +install='nzbhydra.install' +provides=('nzbhydra') +source=("nzbhydra-git::git+https://github.com/theotherp/nzbhydra.git" + "nzbhydra.sh" + "nzbhydra.service" + "nzbhydra.install") +md5sums=('SKIP' + '1430b962bb52c75abee5a63347e61dbd' + '66ff80d1a9bc2079cd5fd44134467159' + '4cb81156eb125cf6daefc2389ccf050a') +sha1sums=('SKIP' + '9c928da41170ec913463347a833a0caad052b342' + '02e37e3aa125ed6a95b1cdcd36c265a81b4e8ec7' + '28d5f16cea5130ae7cc6844c486d001f18daba88') +sha256sums=('SKIP' + '91552953d0d956101136cd3165f217de4d14eb65042b7dd3e9a09c8657319436' + '9035c3c2a7d773ddadefb207cc0690629283f60903189ad595dd8de098c4457f' + '4419c7faed911a03ea0c9ccafa69607d2038cf49a508aa5595d9732146204649') +sha512sums=('SKIP' + '83aacf4f4f33af8d8cb99f1063958b44773f04ba168aaba12a303d1944a74f8ca729c483c57e2e8b8cadb7fac706d7297fc2de505a1c5608a8c09ddeee7690bf' + 'b7157d91508e8c4b07a47bd201bf93b69ef119d1090a9f66c8feeb4980028869a67c99c46a6a51bb8ef4dd774daf3a3cf97af83b7d3ee943f5404325032ce70f' + 'b3605cb1e8fb70c6ca246e82a0c9e10a1659d6907f5e18f0a39e63ff33cbc55b57cfc8ee113be0ae07e0cee08859009346377ac5a51ac17dc48ff906fb6873c7') + +pkgver() { + cd "$pkgname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +package() { + cd "$srcdir" + + install -d -m 755 "${pkgdir}/usr/lib/nzbhydra" + cp -dpr --no-preserve=ownership "${srcdir}/nzbhydra-git/"* "${pkgdir}/usr/lib/nzbhydra" + + msg2 "Precompiling python files" + python2 -m compileall -q "${pkgdir}/usr/lib/nzbhydra" + + install -D -m 755 "${srcdir}/nzbhydra.sh" "${pkgdir}/usr/bin/nzbhydra" + + install -d -m 755 "${pkgdir}/var/lib/nzbhydra" + + mkdir -m 755 "${pkgdir}/var/lib/nzbhydra/flask_session" + touch "${pkgdir}/var/lib/nzbhydra/nzbhydra.log" + touch "${pkgdir}/var/lib/nzbhydra/nzbhydra.pid" + + chmod 644 "${pkgdir}/var/lib/nzbhydra/nzbhydra.log" + chmod 644 "${pkgdir}/var/lib/nzbhydra/nzbhydra.pid" + + ln -s "../../../var/lib/nzbhydra/nzbhydra.log" "${pkgdir}/usr/lib/nzbhydra/nzbhydra.log" + ln -s "../../../var/lib/nzbhydra/nzbhydra.pid" "${pkgdir}/usr/lib/nzbhydra/nzbhydra.pid" + ln -s "../../../var/lib/nzbhydra/flask_session" "${pkgdir}/usr/lib/nzbhydra/flask_session" + + install -d -m 750 "${pkgdir}/etc/nzbhydra" + + install -D -m 644 "${srcdir}/nzbhydra.service" "${pkgdir}/usr/lib/systemd/system/nzbhydra.service" +} diff --git a/nzbhydra.install b/nzbhydra.install new file mode 100644 index 000000000000..16d5c9371619 --- /dev/null +++ b/nzbhydra.install @@ -0,0 +1,19 @@ +post_install() { + if grep -v -q "^nzbhydra" /etc/group &> /dev/null; then + groupadd -r nzbhydra &> /dev/null + fi + + if grep -v -q "^nzbhydra" /etc/passwd &> /dev/null; then + useradd -r -s /bin/false -c "NZB Hydra" -d /var/lib/nzbhydra -g nzbhydra nzbhydra &> /dev/null + fi + + mkdir -p /var/lib/nzbhydra + chown -R nzbhydra: /var/lib/nzbhydra + + mkdir -p /etc/nzbhydra + chown -R nzbhydra /etc/nzbhydra +} + +post_upgrade() { + chown -R nzbhydra: /var/lib/nzbhydra +} diff --git a/nzbhydra.service b/nzbhydra.service new file mode 100644 index 000000000000..e90fb702a066 --- /dev/null +++ b/nzbhydra.service @@ -0,0 +1,13 @@ +[Unit] +Description=NZB Hydra Service +After=network.target + +[Service] +User=nzbhydra +Group=nzbhydra +ExecStart=/usr/bin/nzbhydra --nobrowser --daemon --config /etc/nzbhydra/settings.cfg --database /var/lib/nzbhydra/nzbhydra.db +Type=forking +TimeoutStopSec=20 + +[Install] +WantedBy=multi-user.target diff --git a/nzbhydra.sh b/nzbhydra.sh new file mode 100755 index 000000000000..8c7286ec8b3b --- /dev/null +++ b/nzbhydra.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec python2 /usr/lib/nzbhydra/nzbhydra.py "$@" |