diff options
author | Donald Webster | 2020-05-06 14:04:17 -0700 |
---|---|---|
committer | Donald Webster | 2020-07-19 11:35:45 -0700 |
commit | a287502ea2b3809f8ab0c23ea3917e8563f3ef9f (patch) | |
tree | 1b0d4669067d1a7a04c00563f335b82161a2fde4 | |
parent | b110556c8a0c2397dc3ef8e75c5b4e79955775dc (diff) | |
download | aur-a287502ea2b3809f8ab0c23ea3917e8563f3ef9f.tar.gz |
Update to v3.0.0 and move out of /opt, into /usr/lib and /var/lib.
-rw-r--r-- | .SRCINFO | 37 | ||||
-rw-r--r-- | PKGBUILD | 87 | ||||
-rw-r--r-- | sabnzbd.install | 24 | ||||
-rw-r--r-- | sabnzbd.service | 2 | ||||
-rw-r--r-- | sabnzbd.sysusers | 2 | ||||
-rw-r--r-- | sabnzbd.tmpfiles | 6 | ||||
-rw-r--r-- | sabnzbd@.service | 2 |
7 files changed, 104 insertions, 56 deletions
@@ -1,33 +1,42 @@ pkgbase = sabnzbd pkgdesc = A web-interface based binary newsgrabber with NZB file support - pkgver = 2.3.9 - pkgrel = 4 + pkgver = 3.0.0 + pkgrel = 1 url = http://www.sabnzbd.org + install = sabnzbd.install arch = any license = GPL depends = curl depends = par2cmdline - depends = python2 - depends = python2-cheetah3 - depends = python2-sabyenc + depends = python + depends = python-six + depends = python-cryptography + depends = python-feedparser + depends = python-configobj + depends = python-cherrypy + depends = python-portend + depends = python-chardet + depends = python-notify2 + depends = python-cheetah3 + depends = python-sabyenc3 depends = sqlite depends = unrar depends = unzip - optdepends = python2-feedparser: rss support - optdepends = python2-pyopenssl: ssl support + optdepends = python-pygobject: tray icon + optdepends = python-pyopenssl: ssl support optdepends = par2cmdline-tbb: par2 multi-threading optdepends = p7zip: for .7z support - backup = opt/sabnzbd/sabnzbd.ini - source = https://github.com/sabnzbd/sabnzbd/releases/download/2.3.9/SABnzbd-2.3.9-src.tar.gz + backup = var/lib/sabnzbd/sabnzbd.ini + source = https://github.com/sabnzbd/sabnzbd/releases/download/3.0.0RC2/SABnzbd-3.0.0RC2-src.tar.gz source = sabnzbd.service source = sabnzbd@.service source = sabnzbd.sysusers source = sabnzbd.tmpfiles - sha256sums = f3ab6dffba914e6ddf88f1a755ec3ebaa95f0bdbec6f04b7bf0f90822249bb0c - sha256sums = 3d48f2f4c2bcb6dac29cef13e21a91baec0fccb92d4e925033ade695df0a192f - sha256sums = 4bff79b2478a94acc9de10e63447364b5bf19acd7e6b0808b70c9b83337956f6 - sha256sums = 8cdeae7e8fa327bafc2fd1b19c1995f89f52b2ba231c8305b4e7269ab9e0738a - sha256sums = f86a23384e430b79b328167262216ad315ef89c4a2c49276e6d25c5f7b4cf5bf + sha256sums = 283ef96a001bfb1806b208102a73f2198d7c505d92430c96197da23c74d9fc71 + sha256sums = c1bcdb5ce7787aab5ab4f07508c1451441f42df0ec7be85a5dedda0a5ee70014 + sha256sums = 4c4ff2882de744d1b5435470ed829d58defcc84fafc56e6211d1298c0b22813f + sha256sums = 525f294372963fde09db08b0368c80078a16d4cefcb34f8179706336709afdf7 + sha256sums = 3a3c292020cca0251478c70a6499afa64aeca3dfcb6d5e32f6e21d5d4d94fa81 pkgname = sabnzbd @@ -1,49 +1,64 @@ # Maintainer: Donald Webster <fryfrog@gmail.com> pkgname=sabnzbd -pkgver=2.3.9 -pkgrel=4 +pkgver=3.0.0 +_subver='RC2' +pkgrel=1 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-cheetah3' - 'python2-sabyenc' - 'sqlite' - 'unrar' - 'unzip') - -optdepends=('python2-feedparser: rss support' - 'python2-pyopenssl: ssl support' - 'par2cmdline-tbb: par2 multi-threading' - 'p7zip: for .7z support') - -backup=('opt/sabnzbd/sabnzbd.ini') -source=("https://github.com/sabnzbd/sabnzbd/releases/download/${pkgver}/SABnzbd-${pkgver}-src.tar.gz" - 'sabnzbd.service' - 'sabnzbd@.service' - 'sabnzbd.sysusers' - 'sabnzbd.tmpfiles') +depends=( + 'curl' + 'par2cmdline' + 'python' + 'python-six' + 'python-cryptography' + 'python-feedparser' + 'python-configobj' + 'python-cherrypy' + 'python-portend' + 'python-chardet' + 'python-notify2' + 'python-cheetah3' + 'python-sabyenc3' + 'sqlite' + 'unrar' + 'unzip' +) + +optdepends=( + 'python-pygobject: tray icon' + 'python-pyopenssl: ssl support' + 'par2cmdline-tbb: par2 multi-threading' + 'p7zip: for .7z support' +) + +backup=('var/lib/sabnzbd/sabnzbd.ini') + +install='sabnzbd.install' + +source=( + "https://github.com/sabnzbd/sabnzbd/releases/download/${pkgver}${_subver}/SABnzbd-${pkgver}${_subver}-src.tar.gz" + 'sabnzbd.service' + 'sabnzbd@.service' + 'sabnzbd.sysusers' + 'sabnzbd.tmpfiles' +) -sha256sums=('f3ab6dffba914e6ddf88f1a755ec3ebaa95f0bdbec6f04b7bf0f90822249bb0c' - '3d48f2f4c2bcb6dac29cef13e21a91baec0fccb92d4e925033ade695df0a192f' - '4bff79b2478a94acc9de10e63447364b5bf19acd7e6b0808b70c9b83337956f6' - '8cdeae7e8fa327bafc2fd1b19c1995f89f52b2ba231c8305b4e7269ab9e0738a' - 'f86a23384e430b79b328167262216ad315ef89c4a2c49276e6d25c5f7b4cf5bf') +sha256sums=('283ef96a001bfb1806b208102a73f2198d7c505d92430c96197da23c74d9fc71' + 'c1bcdb5ce7787aab5ab4f07508c1451441f42df0ec7be85a5dedda0a5ee70014' + '4c4ff2882de744d1b5435470ed829d58defcc84fafc56e6211d1298c0b22813f' + '525f294372963fde09db08b0368c80078a16d4cefcb34f8179706336709afdf7' + '3a3c292020cca0251478c70a6499afa64aeca3dfcb6d5e32f6e21d5d4d94fa81') package() { - mkdir -p "${pkgdir}/opt/sabnzbd" - touch "${pkgdir}/opt/sabnzbd/sabnzbd.ini" - cp -r "${srcdir}/SABnzbd-${pkgver}/"* "${pkgdir}/opt/sabnzbd" - - # Fix for issues with Python 3 - find "${pkgdir}/opt/sabnzbd" -type f -exec sed -i 's/python/python2/g' {} \; - find "${pkgdir}/opt/sabnzbd" -type d -exec chmod 755 {} \; - find "${pkgdir}/opt/sabnzbd" -type f -exec chmod 644 {} \; - chmod 755 "${pkgdir}/opt/sabnzbd/SABnzbd.py" + mkdir -p "${pkgdir}/usr/lib/sabnzbd" + cp -r "${srcdir}/SABnzbd-${pkgver}${_subver}/"* "${pkgdir}/usr/lib/sabnzbd" + + find "${pkgdir}/usr/lib/sabnzbd" -type d -exec chmod 755 {} \; + find "${pkgdir}/usr/lib/sabnzbd" -type f -exec chmod 644 {} \; + chmod 755 "${pkgdir}/usr/lib/sabnzbd/SABnzbd.py" install -D -m 644 "${srcdir}/sabnzbd.service" "${pkgdir}/usr/lib/systemd/system/sabnzbd.service" install -D -m 644 "${srcdir}/sabnzbd@.service" "${pkgdir}/usr/lib/systemd/system/sabnzbd@.service" diff --git a/sabnzbd.install b/sabnzbd.install new file mode 100644 index 000000000000..6a59003c54b9 --- /dev/null +++ b/sabnzbd.install @@ -0,0 +1,24 @@ +post_upgrade() { + # Test for the *old* config file and *lack* of new config file, move if needed. + if [[ -f /opt/sabnzbd/sabnzbd.ini && ! -f /var/lib/sabnzbd/sabnzbd.ini ]]; then + mv /opt/sabnzbd/sabnzbd/ini /var/lib/sabnzbd/ + echo "Moved sabnzbd.ini from /opt/sabnzbd to /var/lib/sabnzbd." + fi + + # Test for old admin folder and *lack* of new admin folder, move if needed. + if [[ -d /opt/sabnzbd/admin && ! -d /var/lib/sabnzbd/admin ]]; then + mv /opt/sabnzbd/admin /var/lib/sabnzbd/ + echo "Moved admin folder from /opt/sabnzbd to /var/lib/sabnzbd/." + fi + + # Test for old logs folder and *lack* of new logs folder, move if needed. + if [[ -d /opt/sabnzbd/logs && ! -d /var/lib/sabnzbd/logs ]]; then + mv /opt/sabnzbd/logs /var/lib/sabnzbd/ + echo "Moved logs folder from /opt/sabnzbd to /var/lib/sabnzbd/." + fi + + # Test for old install location, suggest removal. + if [[ -d /opt/sabnzbd ]]; then + echo "Remove /opt/sabnzbd if everything is working correctly from /var/lib/sabnzbd now." + fi +} diff --git a/sabnzbd.service b/sabnzbd.service index dabfc651bfc2..d09214667d00 100644 --- a/sabnzbd.service +++ b/sabnzbd.service @@ -3,7 +3,7 @@ Description=SABnzbd binary newsreader After=network.target [Service] -ExecStart=/opt/sabnzbd/SABnzbd.py --logging 0 --config-file /opt/sabnzbd/sabnzbd.ini +ExecStart=/usr/lib/sabnzbd/SABnzbd.py --logging 0 --config-file /var/lib/sabnzbd/sabnzbd.ini User=sabnzbd Group=sabnzbd SyslogIdentifier=sabnzbd diff --git a/sabnzbd.sysusers b/sabnzbd.sysusers index fc46a6c0ed75..b41895c15467 100644 --- a/sabnzbd.sysusers +++ b/sabnzbd.sysusers @@ -1 +1 @@ -u sabnzbd - "SABnzbd daemon" /opt/sabnzbd +u sabnzbd - "SABnzbd daemon" /var/lib/sabnzbd diff --git a/sabnzbd.tmpfiles b/sabnzbd.tmpfiles index aa016100a5a0..493e976dda08 100644 --- a/sabnzbd.tmpfiles +++ b/sabnzbd.tmpfiles @@ -1,4 +1,4 @@ # Override this file with a modified version in /etc/tmpfiles.d/ -d /opt/sabnzbd 0755 sabnzbd sabnzbd -Z /opt/sabnzbd - sabnzbd sabnzbd -L /var/log/sabnzbd - - - - /opt/sabnzbd/logs/ +d /var/lib/sabnzbd 0755 sabnzbd sabnzbd +Z /var/lib/sabnzbd - sabnzbd sabnzbd +L /var/log/sabnzbd - - - - /var/lib/sabnzbd/logs/ diff --git a/sabnzbd@.service b/sabnzbd@.service index 37b573c8f49b..2377a578621d 100644 --- a/sabnzbd@.service +++ b/sabnzbd@.service @@ -18,7 +18,7 @@ After=network-online.target [Service] # Default location is ~/.sabnzbd/sabnzbd.ini, but package previously used ~/.sabnzbd.ini so default to that -ExecStart=/opt/sabnzbd/SABnzbd.py --logging 1 --browser 0 --config-file /home/%I/.sabnzbd.ini +ExecStart=/usr/lib/sabnzbd/SABnzbd.py --logging 1 --browser 0 --config-file /home/%I/.sabnzbd.ini User=%I Group=%I Type=simple |