First complete
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
pkgbase = sabnzbd
|
||||
pkgdesc = A web-interface based binary newsgrabber with NZB file support
|
||||
pkgver = 0.7.20
|
||||
pkgrel = 1
|
||||
url = http://www.sabnzbd.org
|
||||
install = sabnzbd.install
|
||||
arch = any
|
||||
license = GPL
|
||||
depends = curl
|
||||
depends = par2cmdline
|
||||
depends = python2
|
||||
depends = python2-cheetah
|
||||
depends = python2-yenc
|
||||
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
|
||||
backup = etc/conf.d/sabnzbd
|
||||
backup = opt/sabnzbd/sabnzbd.ini
|
||||
source = http://downloads.sourceforge.net/sabnzbdplus/SABnzbd-0.7.20-src.tar.gz
|
||||
source = sabnzbd
|
||||
source = sabnzbd.desktop
|
||||
source = addnzb.sh
|
||||
source = nzb-2.png
|
||||
source = sab2_64.png
|
||||
source = x-nzb.xml
|
||||
source = sabnzbd.service
|
||||
source = sabnzbd.confd
|
||||
md5sums = 7972b2cdad0a3431262611c271ce5747
|
||||
md5sums = 48d60a1c626503c7fef1bc5374390513
|
||||
md5sums = f9bd5485072714b11f8c30a28024dc4d
|
||||
md5sums = 69b9bcbcf67ff3e7a4cdd9f26e001341
|
||||
md5sums = 2a49c07b1e3e6448eabe92644315f983
|
||||
md5sums = fdc878dd0f6f25617e627b04409abbbd
|
||||
md5sums = 11fb2cd1451e3725b08bfc2bd045be54
|
||||
md5sums = 7da9222f3b86abfed590950f48dc2e77
|
||||
md5sums = 8fc2607a7961fc643ef4f6640166322a
|
||||
|
||||
pkgname = sabnzbd
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
pkgbase = sabnzbd
|
||||
pkgdesc = A web-interface based binary newsgrabber with NZB file support
|
||||
pkgver = 1.1.0
|
||||
pkgrel = 1
|
||||
url = http://www.sabnzbd.org
|
||||
install = sabnzbd.install
|
||||
arch = any
|
||||
license = GPL
|
||||
depends = curl
|
||||
depends = par2cmdline
|
||||
depends = python2
|
||||
depends = python2-cheetah
|
||||
depends = python2-yenc
|
||||
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
|
||||
backup = etc/conf.d/sabnzbd
|
||||
backup = opt/sabnzbd/sabnzbd.ini
|
||||
source = https://github.com/sabnzbd/sabnzbd/releases/download/1.1.0/SABnzbd-1.1.0-src.tar.gz
|
||||
source = sabnzbd
|
||||
source = sabnzbd.desktop
|
||||
source = addnzb.sh
|
||||
source = nzb.png
|
||||
source = sabnzbd.png
|
||||
source = x-nzb.xml
|
||||
source = sabnzbd.service
|
||||
source = sabnzbd.confd
|
||||
md5sums = 03cec705efb742ab9a1d8d6dedbcee2f
|
||||
md5sums = 48d60a1c626503c7fef1bc5374390513
|
||||
md5sums = 36e5f0f60f28f67102682f80e33c6d4b
|
||||
md5sums = 69b9bcbcf67ff3e7a4cdd9f26e001341
|
||||
md5sums = 46fa8020fcfaad1e06d370fa3b0ea09a
|
||||
md5sums = b834ca5dfb63a5d06041c3174172ec09
|
||||
md5sums = 11fb2cd1451e3725b08bfc2bd045be54
|
||||
md5sums = da07971fa3790ea4824ed4ce611b38f3
|
||||
md5sums = 8fc2607a7961fc643ef4f6640166322a
|
||||
|
||||
pkgname = sabnzbd
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /etc/conf.d/sabnzbd
|
||||
curl -s -F apikey="$API_KEY" -F mode="addfile" -F name=@"$1" $URL/sabnzbd/api &> /dev/null
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
python2 /opt/sabnzbd/SABnzbd.py -f ${HOME}/.sabnzbd.ini "${@}"
|
||||
@@ -0,0 +1,8 @@
|
||||
# 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.
|
||||
|
||||
# The SABnzbd url. Make sure to add a username and password if required
|
||||
URL="http://127.0.0.1:8080"
|
||||
|
||||
# Put the API key from Config > General here
|
||||
API_KEY=""
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=SABnzbd+
|
||||
GenericName=Binary Newsreader
|
||||
Icon=/opt/sabnzbd/sabnzbd.png
|
||||
Exec=sh /opt/sabnzbd/addnzb.sh %u
|
||||
Terminal=false
|
||||
Categories=Network
|
||||
MimeType=application/x-nzb
|
||||
@@ -0,0 +1,69 @@
|
||||
# Change these to modify the ownership of sabnzbd
|
||||
# If you change this here, you also have to change
|
||||
# the user and group in the systemd service file.
|
||||
SABNZBD_USER="sabnzbd"
|
||||
SABNZBD_GROUP="sabnzbd"
|
||||
|
||||
SABNZBD_DIR="/opt/sabnzbd" # should not be changed
|
||||
|
||||
## arg 1: the new package version
|
||||
post_install() {
|
||||
# add x-nzb mimetype
|
||||
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
|
||||
|
||||
cat << "EOM"
|
||||
==> If you want to associate .nzb-files with SABnzbd, run 'xdg-mime default sabnzbd.desktop applications/x-nzb'
|
||||
EOM
|
||||
}
|
||||
|
||||
## arg 1: the new package version
|
||||
## arg 2: the old package version
|
||||
pre_upgrade() {
|
||||
PID="$(pgrep -f SABnzbd.py)"
|
||||
|
||||
if [ -n "${PID}" ];then
|
||||
systemctl stop sabnzbd.service
|
||||
fi
|
||||
}
|
||||
|
||||
## arg 1: the new package version
|
||||
## arg 2: the old package version
|
||||
post_upgrade() {
|
||||
# if the group or user already exists, the request will be denied
|
||||
# and all original settings will be retained
|
||||
if [ "$SABNZBD_GROUP" == "sabnzbd" ]; then
|
||||
groupadd -r sabnzbd &> /dev/null
|
||||
fi
|
||||
|
||||
if [ "$SABNZBD_USER" == "sabnzbd" ]; then
|
||||
useradd -s /sbin/nologin -c "SABnzbd user" -d "${SABNZBD_DIR}" \
|
||||
-g sabnzbd -r sabnzbd &> /dev/null
|
||||
fi
|
||||
|
||||
chown -R "${SABNZBD_USER}:${SABNZBD_GROUP}" "${SABNZBD_DIR}"
|
||||
}
|
||||
|
||||
## arg 1: the old package version
|
||||
pre_remove() {
|
||||
pre_upgrade
|
||||
|
||||
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
|
||||
post_remove() {
|
||||
# only delete if user is sabnzbd
|
||||
userdel sabnzbd &> /dev/null
|
||||
groupdel sabnzbd &> /dev/null || /bin/true
|
||||
echo "==> There may be some files left in ${SABNZBD_DIR}."
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=SABnzbd binary newsreader
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/sabnzbd/SABnzbd.py -l0 -f /opt/sabnzbd/sabnzbd.ini
|
||||
User=sabnzbd
|
||||
Group=sabnzbd
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/x-nzb">
|
||||
|
||||
<comment xml:lang='en'>An XML-based file format for retrieving posts from NNTP (Usenet) servers</comment>
|
||||
<sub-class-of type="application/xml"/>
|
||||
<glob pattern="*.nzb"/>
|
||||
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
Reference in New Issue
Block a user