New package: sabnzbd

This commit is contained in:
Dominik Honnef 2014-07-02 12:45:24 +02:00
parent 927e0e2dc6
commit 8601d20e8a
3 changed files with 109 additions and 0 deletions

21
srcpkgs/sabnzbd/INSTALL Normal file
View File

@ -0,0 +1,21 @@
case "${ACTION}" in
post)
cat <<_EOF
=======================================================================
Some optional packages must be installed for additional functionality:
- unrar: for automatic extraction of rar archives
By default, SABnzbd will listen on 127.0.0.1:8080 - This can be
changed with the -s option. See 'sabnzbd --help' for more information
on configuration directives.
All SABnzbd settings are stored in \$HOME/.sabnzbd. Editing global
configuration files should not be necessary.
=======================================================================
_EOF
;;
esac

View File

@ -0,0 +1,46 @@
--- a/sabnzbd/config.py
+++ b/sabnzbd/config.py
@@ -23,10 +23,12 @@ import os
import logging
import threading
import shutil
+
+import configobj
+
import sabnzbd.misc
from sabnzbd.constants import CONFIG_VERSION, NORMAL_PRIORITY, DEFAULT_PRIORITY
from sabnzbd.utils import listquote
-from sabnzbd.utils import configobj
from sabnzbd.decorators import synchronized
CONFIG_LOCK = threading.Lock()
--- a/sabnzbd/rss.py
+++ b/sabnzbd/rss.py
@@ -35,7 +35,7 @@ from sabnzbd.misc import cat_convert, sanitize_foldername, wildcard_to_re, cat_t
import sabnzbd.emailer as emailer
from sabnzbd.encoding import latin1, unicoder, xml_name
-import sabnzbd.utils.feedparser as feedparser
+import feedparser
__RSS = None # Global pointer to RSS-scanner instance
--- a/sabnzbd/growler.py
+++ b/sabnzbd/growler.py
@@ -31,7 +31,14 @@ import sabnzbd
import sabnzbd.cfg
from sabnzbd.encoding import unicoder, latin1
from sabnzbd.constants import NOTIFY_KEYS
-from gntp import GNTPRegister
+
+try:
+ # <= version 0.6
+ from gntp import GNTPRegister
+except ImportError:
+ # >= version 1.0
+ from gntp.core import GNTPRegister
+
from gntp.notifier import GrowlNotifier
try:
import Growl

42
srcpkgs/sabnzbd/template Normal file
View File

@ -0,0 +1,42 @@
# Template file for 'sabnzbd'
pkgname=sabnzbd
version=0.7.17
revision=1
patch_args="-p1"
wrksrc="SABnzbd-${version}"
depends="par2cmdline python-cheetah python-configobj python-feedparser python-gntp python-openssl python-yenc python>=2.7 unzip"
maintainer="Dominik Honnef <dominik@honnef.co>"
# sabnzbd itself is GPL, but it bundles libraries that are covered by
# BSD, LGPL-2 and MIT. In combination, that makes this package GPL.
license="GPL"
homepage="http://sabnzbd.org/"
short_desc="SABnzbd is an Open Source Binary Newsreader written in Python"
distfiles="http://downloads.sourceforge.net/sabnzbdplus/SABnzbd-${version}-src.tar.gz"
checksum=a501517dbaf161deab2153118ff3b44512ee1d8984c3603bf17c593cf080eb09
pre_install() {
rm -rf gntp sabnzbd/utils/{feedparser,configobj}.py
rm -f licenses/License-{feedparser,configobj,gntp,Python}.txt
rm -rf solaris
# sabnzbd bundles a heavily modified version of cherrypy. It's
# uncertain what base version they use, or where each individual
# patch came from, so using upstream cherrypy isn't an option.
# sabnzbd also bundles a variety of small libraries, some of which
# haven't been maintained since 2006. There may be no point to
# packaging them separately.
}
do_install() {
vmkdir usr/share/licenses/${pkgname}
mv licenses/* ${DESTDIR}/usr/share/licenses/${pkgname}
mv COPYRIGHT.txt ${DESTDIR}/usr/share/licenses/${pkgname}
rmdir licenses
vmkdir usr/share/sabnzbd
mv * ${DESTDIR}/usr/share/sabnzbd/
mkdir -p ${DESTDIR}/usr/bin/
ln -fs /usr/share/sabnzbd/SABnzbd.py ${DESTDIR}/usr/bin/sabnzbd
}