summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBooster2017-05-05 15:26:52 +0200
committerBooster2017-05-05 15:26:52 +0200
commite01f17860cecfc65fab65933c36568b103830191 (patch)
treef4c3da0c74e552b29397aa4e4e6261147acc66f5
parent5bc251a7c3979c6319578d7fa1862a173e0510e3 (diff)
downloadaur-e01f17860cecfc65fab65933c36568b103830191.tar.gz
update
-rw-r--r--.SRCINFO38
-rw-r--r--[-rwxr-xr-x]PKGBUILD116
-rw-r--r--[-rwxr-xr-x]addnzb.sh16
-rwxr-xr-xnzb-2.pngbin2913 -> 0 bytes
-rw-r--r--nzb.pngbin0 -> 6298 bytes
-rw-r--r--[-rwxr-xr-x]sab2_64.pngbin2745 -> 2745 bytes
-rw-r--r--sabnzbd-shell3
-rw-r--r--[-rwxr-xr-x]sabnzbd.confd22
-rwxr-xr-xsabnzbd.desktop5
-rwxr-xr-xsabnzbd.init43
-rw-r--r--[-rwxr-xr-x]sabnzbd.install14
-rw-r--r--sabnzbd.pngbin0 -> 5724 bytes
-rw-r--r--[-rwxr-xr-x]sabnzbd.service3
-rwxr-xr-xsabnzbd.sh3
-rw-r--r--[-rwxr-xr-x]x-nzb.xml0
15 files changed, 92 insertions, 171 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 41b3b94d0a3f..47b7e4f75c61 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = sabnzbd-git
- pkgdesc = A web-interface based binary newsgrabber with NZB file support.
- pkgver = 0.7.0.r1013.g56a89ce
+ pkgdesc = A web-interface based binary newsgrabber with NZB file support
+ pkgver = 2.0.r5789
pkgrel = 1
- url = http://www.sabnzbd.org/
+ url = http://www.sabnzbd.org
install = sabnzbd.install
arch = any
license = GPL
@@ -11,37 +11,35 @@ pkgbase = sabnzbd-git
depends = par2cmdline
depends = python2
depends = python2-cheetah
- depends = python2-yenc
+ depends = python2-sabyenc
depends = sqlite
depends = unrar
depends = unzip
optdepends = xdg-utils: registration of .nzb files
optdepends = python2-feedparser: rss support
optdepends = python2-pyopenssl: ssl support
+ optdepends = par2cmdline-tbb: par2 multi-threading
conflicts = sabnzbd
- conflicts = sabnzbd-bzr
- conflicts = sabnzbd-develop-git
backup = etc/conf.d/sabnzbd
- source = git+https://github.com/sabnzbd/sabnzbd.git
- source = sabnzbd.sh
- source = sabnzbd.init
- source = sabnzbd.confd
+ backup = opt/sabnzbd/sabnzbd.ini
+ source = git://github.com/sabnzbd/sabnzbd.git
+ source = sabnzbd-shell
source = sabnzbd.desktop
source = addnzb.sh
- source = nzb-2.png
- source = sab2_64.png
+ source = nzb.png
+ source = sabnzbd.png
source = x-nzb.xml
source = sabnzbd.service
+ source = sabnzbd.confd
sha256sums = SKIP
- sha256sums = 411738ad4dcd761daeda3a97aedfbe39c71f70d7f91c29765f85fb2a5942522d
- sha256sums = 35c7ec1bdaadeb1db3c0794254f99e8e44323ef1665d5f4ae2832d5367bd937c
- sha256sums = 29190e47cf3140053b000b1bbc9a1f8f5a20e30db19fa065c03576bb5f8e15eb
- sha256sums = 6ffe460bebea63faea39e1131131711fdfa3f744fee129f0cc2b3dffff261289
- sha256sums = baea3351a40551a63b90b4a4c32719d4c27b5fff596e74e4a91f289964960eb6
- sha256sums = 7fec4494a04ffd6a94644c8ef499ec1c92998a613b1fde5c3a46f38c53dfbc43
- sha256sums = 099d625d6efc9e69e7c6a2833221928fb19e9e356e3aa8341c36ffdc281e567d
+ sha256sums = 82630edfc767a383843ffaae9d716e99010dad9e93bdee08d541faa74e694a65
+ sha256sums = 887f93942b78c0475009b1ce84b502c28e273c222451a4736cd4c37ff5454f04
+ sha256sums = 30ffff8b9c00e91358cd6c5dca89f9d9f8f12843e7b3c44c6d5b0f09b0ea424a
+ sha256sums = ef8f4fb1a3a0750c74b7addd302ab8733187ad370b5d27336afb2677d7154571
+ sha256sums = fce3e065d017ce3bc4548a766f25c95f982af4f6085263c72f3000f49d810409
sha256sums = f53261d7578c67fb9fd6a639df94cd53604bcf37b9b03a926cb03e5214b496fe
- sha256sums = 29e83913b7f66cb5ade8ab6682754c975323fc9905451a1e7147e04dc6ddcc12
+ sha256sums = 3de9c07d7731a9756a60691c56897b1cb0c802c5eb510a7bb68b9e1c82d7102c
+ sha256sums = 8462203454d488b5d4f7beb85e61da2efa42d3dffa465f3bf16a95abe0bc7c0a
pkgname = sabnzbd-git
diff --git a/PKGBUILD b/PKGBUILD
index 0488f78f3bdb..520885a5b701 100755..100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,75 +1,57 @@
-# Maintainer: Gereon Schomber <Gereon underscore Schomber at fastmail dot fm>
-# Contributor: dryes <joswiseman@gmail>
-# Contributor: Revelation60, Lucky <https://aur.archlinux.org/packages.php?ID=13691>
-# Contributor: Gordin <9ordin @t gmail dot com>
-pkgname="sabnzbd-git"
-_gitname='sabnzbd'
-pkgver=0.7.0.r1013.g56a89ce
+
+# Maintainer: boosterdev@linuxmail.org
+# Contributer: Ben Ruijl <benruyl@gmail.com> (sabnzbd)
+
+_pkgname=sabnzbd
+pkgname=sabnzbd-git
+pkgver=2.0.r5789
pkgrel=1
-pkgdesc='A web-interface based binary newsgrabber with NZB file support.'
-arch=('any')
-url='http://www.sabnzbd.org/'
-license=('GPL')
-depends=("curl" "par2cmdline"
- "python2" "python2-cheetah" "python2-yenc"
- "sqlite" "unrar" "unzip")
+pkgdesc="A web-interface based binary newsgrabber with NZB file support"
+url="http://www.sabnzbd.org"
+arch=("any")
+license=("GPL")
+depends=("curl" "par2cmdline" "python2" "python2-cheetah" "python2-sabyenc" "sqlite" "unrar" "unzip")
+optdepends=("xdg-utils: registration of .nzb files" "python2-feedparser: rss support" "python2-pyopenssl: ssl support" "par2cmdline-tbb: par2 multi-threading")
makedepends=('git')
-optdepends=("xdg-utils: registration of .nzb files"
- "python2-feedparser: rss support"
- "python2-pyopenssl: ssl support")
-source=("git+https://github.com/sabnzbd/sabnzbd.git"
- 'sabnzbd.sh'
- 'sabnzbd.init'
- 'sabnzbd.confd'
- 'sabnzbd.desktop'
- 'addnzb.sh'
- 'nzb-2.png'
- 'sab2_64.png'
- 'x-nzb.xml'
- 'sabnzbd.service'
- )
-backup=('etc/conf.d/sabnzbd')
-install=sabnzbd.install
-conflicts=('sabnzbd' 'sabnzbd-bzr' 'sabnzbd-develop-git')
+conflicts=('sabnzbd')
+install="sabnzbd.install"
+backup=("etc/conf.d/sabnzbd" "opt/sabnzbd/sabnzbd.ini")
+source=("git://github.com/sabnzbd/sabnzbd.git"
+ "$_pkgname-shell" "sabnzbd.desktop" "addnzb.sh" "nzb.png" "sabnzbd.png" "x-nzb.xml" "sabnzbd.service" "sabnzbd.confd")
+sha256sums=('SKIP'
+ '82630edfc767a383843ffaae9d716e99010dad9e93bdee08d541faa74e694a65'
+ '887f93942b78c0475009b1ce84b502c28e273c222451a4736cd4c37ff5454f04'
+ '30ffff8b9c00e91358cd6c5dca89f9d9f8f12843e7b3c44c6d5b0f09b0ea424a'
+ 'ef8f4fb1a3a0750c74b7addd302ab8733187ad370b5d27336afb2677d7154571'
+ 'fce3e065d017ce3bc4548a766f25c95f982af4f6085263c72f3000f49d810409'
+ 'f53261d7578c67fb9fd6a639df94cd53604bcf37b9b03a926cb03e5214b496fe'
+ '3de9c07d7731a9756a60691c56897b1cb0c802c5eb510a7bb68b9e1c82d7102c'
+ '8462203454d488b5d4f7beb85e61da2efa42d3dffa465f3bf16a95abe0bc7c0a')
-package() {
- mkdir -p "${pkgdir}/opt/${_gitname}"
- touch "${pkgdir}/opt/${_gitname}/${_gitname}.ini"
- cp -r "${srcdir}/${_gitname}/"* "${pkgdir}/opt/${_gitname}"
+pkgver() {
+ cd "$_pkgname"
+ echo -n "2.0.r"
+ git rev-list --count HEAD
+}
- # remove Windows and OS X files
- rm -r "${pkgdir}/opt/${_gitname}/win"
- rm -r "${pkgdir}/opt/${_gitname}/osx"
+package() {
+ cd "$_pkgname"
+ install -d -m755 "${pkgdir}/opt/${_pkgname}"
+ touch "${pkgdir}/opt/${_pkgname}/${_pkgname}.ini"
+ cp -r "${srcdir}/${_pkgname}/"* "${pkgdir}/opt/${_pkgname}"
# Fix for issues with Python 3
- find "${pkgdir}/opt/${_gitname}" -type f -exec sed -i 's/python/python2/g' {} \;
- find "${pkgdir}/opt/${_gitname}" -type d -exec chmod 755 {} \;
- find "${pkgdir}/opt/${_gitname}" -type f -exec chmod 644 {} \;
- chmod 755 "${pkgdir}/opt/${_gitname}/SABnzbd.py"
-
- install -Dm755 "${srcdir}/${_gitname}.sh" "${pkgdir}/usr/bin/${_gitname}"
- install -Dm644 "${srcdir}/${_gitname}.confd" "${pkgdir}/etc/conf.d/${_gitname}"
- install -Dm644 "${srcdir}/${_gitname}.service" "${pkgdir}/usr/lib/systemd/system/${_gitname}.service"
- install -Dm755 "${srcdir}/${_gitname}.desktop" \
- "${pkgdir}/usr/share/applications/${_gitname}.desktop"
- install -Dm755 "${srcdir}/addnzb.sh" "${pkgdir}/opt/${_gitname}/addnzb.sh"
- install -Dm644 "${srcdir}/nzb-2.png" "${pkgdir}/opt/${_gitname}/nzb-2.png"
- install -Dm644 "${srcdir}/sab2_64.png" "${pkgdir}/opt/${_gitname}/sab2_64.png"
- install -Dm770 "${srcdir}/x-nzb.xml" "${pkgdir}/opt/${_gitname}/x-nzb.xml"
-}
+ find "${pkgdir}/opt/${_pkgname}" -type f -exec sed -i 's/python/python2/g' {} \;
+ find "${pkgdir}/opt/${_pkgname}" -type d -exec chmod 755 {} \;
+ find "${pkgdir}/opt/${_pkgname}" -type f -exec chmod 644 {} \;
+ chmod 755 "${pkgdir}/opt/${_pkgname}/SABnzbd.py"
-pkgver() {
- cd "$srcdir/$_gitname"
- git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
+ install -Dm755 "${srcdir}/${_pkgname}-shell" "${pkgdir}/usr/bin/${_pkgname}"
+ install -Dm644 "${srcdir}/${_pkgname}.confd" "${pkgdir}/etc/conf.d/${_pkgname}"
+ install -Dm644 "${srcdir}/${_pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${_pkgname}.service"
+ install -Dm755 "${srcdir}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
+ install -Dm755 "${srcdir}/addnzb.sh" "${pkgdir}/opt/${_pkgname}/addnzb.sh"
+ install -Dm644 "${srcdir}/nzb.png" "${pkgdir}/opt/${_pkgname}/nzb.png"
+ install -Dm644 "${srcdir}/sabnzbd.png" "${pkgdir}/opt/${_pkgname}/sabnzbd.png"
+ install -Dm644 "${srcdir}/x-nzb.xml" "${pkgdir}/opt/${_pkgname}/x-nzb.xml"
}
-
-sha256sums=('SKIP'
- '411738ad4dcd761daeda3a97aedfbe39c71f70d7f91c29765f85fb2a5942522d'
- '35c7ec1bdaadeb1db3c0794254f99e8e44323ef1665d5f4ae2832d5367bd937c'
- '29190e47cf3140053b000b1bbc9a1f8f5a20e30db19fa065c03576bb5f8e15eb'
- '6ffe460bebea63faea39e1131131711fdfa3f744fee129f0cc2b3dffff261289'
- 'baea3351a40551a63b90b4a4c32719d4c27b5fff596e74e4a91f289964960eb6'
- '7fec4494a04ffd6a94644c8ef499ec1c92998a613b1fde5c3a46f38c53dfbc43'
- '099d625d6efc9e69e7c6a2833221928fb19e9e356e3aa8341c36ffdc281e567d'
- 'f53261d7578c67fb9fd6a639df94cd53604bcf37b9b03a926cb03e5214b496fe'
- '29e83913b7f66cb5ade8ab6682754c975323fc9905451a1e7147e04dc6ddcc12')
diff --git a/addnzb.sh b/addnzb.sh
index 47031c6da01c..e3b60513382c 100755..100644
--- a/addnzb.sh
+++ b/addnzb.sh
@@ -1,14 +1,4 @@
-#!/bin/bash
-set -a # export all variables
+#!/bin/sh
-. /etc/conf.d/sabnzbd
-
-# SABnzbd must be able to read the file, so we copy it to a directory where it
-# certainly has rights.
-nzbname=$(basename "$1")
-TEMP_NZB="/var/tmp/$nzbname"
-
-curl -s $(python2 -c 'import urlparse,urllib,sys; print sys.argv[1] if urlparse.urlparse(sys.argv[1]).scheme else urlparse.urlparse(urllib.pathname2url(sys.argv[1]),"file").geturl()' "$1") -o "$TEMP_NZB"
-curl -f $(python2 -c 'import urllib,os; print os.environ["SABNZBD_PROTOCOL"]+"://"+urllib.quote(os.environ["SABNZBD_USPW"]+os.environ["SABNZBD_IP"])+":"+os.environ["SABNZBD_PORT"]+"/sabnzbd/api?mode=addlocalfile&name="+urllib.quote(os.environ["TEMP_NZB"])+"&apikey="+urllib.quote(os.environ["NZB_KEY"])')
-rm "$TEMP_NZB"
-exit 0
+. /etc/conf.d/sabnzbd
+curl -s -F apikey="$API_KEY" -F mode="addfile" -F name=@"$1" $URL/sabnzbd/api &> /dev/null
diff --git a/nzb-2.png b/nzb-2.png
deleted file mode 100755
index 53adbf66f9f6..000000000000
--- a/nzb-2.png
+++ /dev/null
Binary files differ
diff --git a/nzb.png b/nzb.png
new file mode 100644
index 000000000000..f443c215e529
--- /dev/null
+++ b/nzb.png
Binary files differ
diff --git a/sab2_64.png b/sab2_64.png
index 2c6290006300..2c6290006300 100755..100644
--- a/sab2_64.png
+++ b/sab2_64.png
Binary files differ
diff --git a/sabnzbd-shell b/sabnzbd-shell
new file mode 100644
index 000000000000..0fa0d41ddddd
--- /dev/null
+++ b/sabnzbd-shell
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+python2 /opt/sabnzbd/SABnzbd.py -f ${HOME}/.sabnzbd.ini "${@}"
diff --git a/sabnzbd.confd b/sabnzbd.confd
index 8ccbd456b9af..389676c6196d 100755..100644
--- a/sabnzbd.confd
+++ b/sabnzbd.confd
@@ -1,18 +1,8 @@
-# Set to the protocol, IP and port
-SABNZBD_PROTOCOL="http"
-SABNZBD_IP="127.0.0.1"
-SABNZBD_PORT="8080"
+# This file is used to make association of .nzb files with SABnzbd possible.
+# If you do not want this feature, you do no have to fill in these settings.
-# Set your default user/group, startarguments and your configfile
-SABNZBD_USER="sabnzbd"
-SABNZBD_GROUP="sabnzbd"
-SABNZBD_CONF="/usr/share/sabnzbd/sabnzbd.ini"
-SABNZBD_ARGS="-f ${SABNZBD_CONF} -s ${SABNZBD_IP}:${SABNZBD_PORT} -d"
+# The SABnzbd url. Make sure to add a username and password if required
+URL="http://127.0.0.1:8080"
-# Put the session keys from Config > General here
-SABNZBD_KEY=""
-NZB_KEY=""
-
-# If you use a username and password, change the following variable to
-# "user:pass@"
-SABNZBD_USPW=""
+# Put the API key from Config > General here
+API_KEY=""
diff --git a/sabnzbd.desktop b/sabnzbd.desktop
index ab84e76ff9eb..4ce54a2a515e 100755
--- a/sabnzbd.desktop
+++ b/sabnzbd.desktop
@@ -1,10 +1,11 @@
+#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Version=1.0
Name=SABnzbd+
GenericName=Binary Newsreader
-Icon=/usr/share/sabnzbd/sab2_64.png
-Exec=sh /usr/share/sabnzbd/addnzb.sh %u
+Icon=/opt/sabnzbd/sabnzbd.png
+Exec=sh /opt/sabnzbd/addnzb.sh %u
Terminal=false
Categories=Network
MimeType=application/x-nzb
diff --git a/sabnzbd.init b/sabnzbd.init
deleted file mode 100755
index fd90197a1610..000000000000
--- a/sabnzbd.init
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /etc/conf.d/sabnzbd
-
-case "${1}" in
- start)
- stat_busy "Starting SABnzbd"
-
- if [ -f /run/daemons/sabnzbd ]; then
- echo -n "Sabnzbd is already running as a daemon! If you are certain it is not running, remove /run/daemons/sabnzbd."
- stat_fail
- else
- su - "${SABNZBD_USER}" -c "python2 /usr/share/sabnzbd/SABnzbd.py ${SABNZBD_ARGS}" -s /bin/sh
- if [ ${?} -gt 0 ]; then
- stat_fail
- else
- add_daemon sabnzbd
- stat_done
- fi
- fi
- ;;
- stop)
- stat_busy "Stopping SABnzbd"
-
- curl -f -k "${SABNZBD_PROTOCOL}://${SABNZBD_USPW}${SABNZBD_IP}:${SABNZBD_PORT}/sabnzbd/api?mode=shutdown&apikey=${SABNZBD_KEY}" &> /dev/null
- if [ ${?} -gt 0 ]; then
- stat_fail
- else
- rm_daemon sabnzbd
- stat_done
- fi
- ;;
- restart)
- "${0}" stop
- sleep 1
- "${0}" start
- ;;
- *)
- echo "usage: ${0} {start|stop|restart}"
-esac
-exit 0
diff --git a/sabnzbd.install b/sabnzbd.install
index 106252e8339a..cf84a4790565 100755..100644
--- a/sabnzbd.install
+++ b/sabnzbd.install
@@ -4,13 +4,15 @@
SABNZBD_USER="sabnzbd"
SABNZBD_GROUP="sabnzbd"
-SABNZBD_DIR="/usr/share/sabnzbd" # should not be changed
+SABNZBD_DIR="/opt/sabnzbd" # should not be changed
## arg 1: the new package version
post_install() {
# add x-nzb mimetype
- xdg-mime install --mode system "${SABNZBD_DIR}/x-nzb.xml"
- xdg-icon-resource install --context mimetypes --size 64 "${SABNZBD_DIR}/nzb-2.png" application-x-nzb
+ if [[ -f /usr/bin/xdg-mime ]]; then
+ xdg-mime install --mode system "${SABNZBD_DIR}/x-nzb.xml"
+ xdg-icon-resource install --context mimetypes --size 256 "${SABNZBD_DIR}/nzb.png" application-x-nzb
+ fi
post_upgrade
@@ -50,8 +52,10 @@ post_upgrade() {
pre_remove() {
pre_upgrade
- xdg-mime uninstall --mode system "${SABNZBD_DIR}/x-nzb.xml"
- xdg-icon-resource uninstall --context mimetypes --size 64 application-x-nzb
+ if [[ -f /usr/bin/xdg-mime ]]; then
+ xdg-mime uninstall --mode system "${SABNZBD_DIR}/x-nzb.xml"
+ xdg-icon-resource uninstall --context mimetypes --size 256 application-x-nzb
+ fi
}
## arg 1: the old package version
diff --git a/sabnzbd.png b/sabnzbd.png
new file mode 100644
index 000000000000..5770c0a9f96c
--- /dev/null
+++ b/sabnzbd.png
Binary files differ
diff --git a/sabnzbd.service b/sabnzbd.service
index 9890ebdd85ce..6806b9cef3d7 100755..100644
--- a/sabnzbd.service
+++ b/sabnzbd.service
@@ -3,8 +3,7 @@ Description=SABnzbd binary newsreader
After=network.target
[Service]
-Type=simple
-ExecStart=/bin/sh -c "python2 /opt/sabnzbd/SABnzbd.py -l0"
+ExecStart=/opt/sabnzbd/SABnzbd.py -l0 -f /opt/sabnzbd/sabnzbd.ini
User=sabnzbd
Group=sabnzbd
diff --git a/sabnzbd.sh b/sabnzbd.sh
deleted file mode 100755
index ab7470322ff7..000000000000
--- a/sabnzbd.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-python2 /opt/sabnzbd/SABnzbd.py -f "${HOME}/.sabnzbd.ini" "${@}"
diff --git a/x-nzb.xml b/x-nzb.xml
index e77d2841031d..e77d2841031d 100755..100644
--- a/x-nzb.xml
+++ b/x-nzb.xml