Merge pull request #455 from dominikh/sabnzbd
New package: sabnzbd and dependencies
This commit is contained in:
commit
bfaa55af96
|
@ -0,0 +1,24 @@
|
|||
pkgname="python-configobj"
|
||||
version=5.0.5
|
||||
revision=1
|
||||
wrksrc="configobj-${version}"
|
||||
build_style=python-module
|
||||
python_versions="2.7 3.4"
|
||||
noarch=yes
|
||||
makedepends="python-devel python3.4-devel"
|
||||
depends="python python-six"
|
||||
maintainer="Dominik Honnef <dominik@honnef.co>"
|
||||
license="New BSD"
|
||||
homepage="https://github.com/DiffSK/configobj"
|
||||
short_desc="ConfigObj is a simple but powerful config file reader and writer"
|
||||
distfiles="https://github.com/DiffSK/configobj/archive/v5.0.5.tar.gz"
|
||||
checksum=2fdca2ddca5b01ecee61e2dc73ef13870327854abd5cb9f28784bbae25bc5cde
|
||||
|
||||
python3.4-configobj_package() {
|
||||
noarch=yes
|
||||
depends="python3.4 python3.4-six"
|
||||
pycompile_version="3.4"
|
||||
pkg_install() {
|
||||
vmove usr/lib/python3.4
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
pkgname="python-feedparser"
|
||||
version=5.1.3
|
||||
revision=1
|
||||
wrksrc="feedparser-${version}"
|
||||
build_style=python-module
|
||||
python_versions="2.7 3.4"
|
||||
noarch=yes
|
||||
hostmakedepends="python-setuptools python3.4-setuptools"
|
||||
makedepends="python-devel python3.4-devel"
|
||||
depends="python"
|
||||
maintainer="Dominik Honnef <dominik@honnef.co>"
|
||||
license="Simplified BSD"
|
||||
homepage="https://pypi.python.org/pypi/feedparser"
|
||||
short_desc="Parse Atom and RSS feeds in Python"
|
||||
distfiles="https://pypi.python.org/packages/source/f/feedparser/feedparser-5.1.3.tar.gz"
|
||||
checksum=ad543639e89d43685e2f1d3b6e48711562eec3be379e6958a920fbeaf4c63bce
|
||||
|
||||
python3.4-feedparser_package() {
|
||||
noarch=yes
|
||||
depends="python3.4"
|
||||
pycompile_version="3.4"
|
||||
pkg_install() {
|
||||
vmove usr/lib/python3.4
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
pkgname="python-gntp"
|
||||
version=1.0.2
|
||||
revision=1
|
||||
wrksrc="gntp-${version}"
|
||||
build_style=python-module
|
||||
python_versions="2.7 3.4"
|
||||
makedepends="python-devel python3.4-devel"
|
||||
depends="python"
|
||||
maintainer="Dominik Honnef <dominik@honnef.co>"
|
||||
license="MIT"
|
||||
homepage="https://github.com/kfdm/gntp"
|
||||
short_desc="A Python library for working with the Growl Notification Transport Protocol"
|
||||
distfiles="https://github.com/kfdm/gntp/archive/v1.0.2.tar.gz"
|
||||
checksum=c767142d0fd9540da84b34c7334da05f5c313e77a428be0e0412e62309c7d899
|
||||
|
||||
|
||||
python3.4-gntp_package() {
|
||||
depends="python3.4"
|
||||
pycompile_version="3.4"
|
||||
pkg_install() {
|
||||
vmove usr/lib/python3.4
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
pkgname="python-yenc"
|
||||
version=0.3
|
||||
revision=1
|
||||
wrksrc="yenc-${version}"
|
||||
build_style=python-module
|
||||
makedepends="python-devel"
|
||||
depends="python"
|
||||
short_desc="yEnc Module for Python"
|
||||
maintainer="Dominik Honnef <dominik@honnef.co>"
|
||||
license="GPL"
|
||||
homepage="http://sabnzbd.org/"
|
||||
distfiles="http://sabnzbd.sourceforge.net/yenc-${version}.tar.gz"
|
||||
checksum=fb04fea7c5821345608fa01728ce5356b6dfb2d3e469e59e3fd31b88f45fb313
|
|
@ -0,0 +1 @@
|
|||
python-configobj
|
|
@ -0,0 +1 @@
|
|||
python-feedparser
|
|
@ -0,0 +1 @@
|
|||
python-gntp
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue