From 3c20bf52b935990b558aeb42457dca34e00eed91 Mon Sep 17 00:00:00 2001 From: Dominik Honnef Date: Wed, 2 Jul 2014 10:52:26 +0200 Subject: [PATCH 1/5] New package: python-yenc --- srcpkgs/python-yenc/template | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 srcpkgs/python-yenc/template diff --git a/srcpkgs/python-yenc/template b/srcpkgs/python-yenc/template new file mode 100644 index 00000000000..0a71ca80afc --- /dev/null +++ b/srcpkgs/python-yenc/template @@ -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 " +license="GPL" +homepage="http://sabnzbd.org/" +distfiles="http://sabnzbd.sourceforge.net/yenc-${version}.tar.gz" +checksum=fb04fea7c5821345608fa01728ce5356b6dfb2d3e469e59e3fd31b88f45fb313 From cc1c5bae794ac565b6650e25592e43057225e5b3 Mon Sep 17 00:00:00 2001 From: Dominik Honnef Date: Wed, 2 Jul 2014 12:10:08 +0200 Subject: [PATCH 2/5] New package: python-configobj --- srcpkgs/python-configobj/template | 24 ++++++++++++++++++++++++ srcpkgs/python3.4-configobj | 1 + 2 files changed, 25 insertions(+) create mode 100644 srcpkgs/python-configobj/template create mode 120000 srcpkgs/python3.4-configobj diff --git a/srcpkgs/python-configobj/template b/srcpkgs/python-configobj/template new file mode 100644 index 00000000000..474d3a0c30e --- /dev/null +++ b/srcpkgs/python-configobj/template @@ -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 " +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 + } +} diff --git a/srcpkgs/python3.4-configobj b/srcpkgs/python3.4-configobj new file mode 120000 index 00000000000..ea795c8535e --- /dev/null +++ b/srcpkgs/python3.4-configobj @@ -0,0 +1 @@ +python-configobj \ No newline at end of file From 8f7d448a6233b8c9752c8d8336a41145c7c8e669 Mon Sep 17 00:00:00 2001 From: Dominik Honnef Date: Wed, 2 Jul 2014 12:11:16 +0200 Subject: [PATCH 3/5] New package: python-feedparser --- srcpkgs/python-feedparser/template | 25 +++++++++++++++++++++++++ srcpkgs/python3.4-feedparser | 1 + 2 files changed, 26 insertions(+) create mode 100644 srcpkgs/python-feedparser/template create mode 120000 srcpkgs/python3.4-feedparser diff --git a/srcpkgs/python-feedparser/template b/srcpkgs/python-feedparser/template new file mode 100644 index 00000000000..1c88107f5d4 --- /dev/null +++ b/srcpkgs/python-feedparser/template @@ -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 " +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 + } +} diff --git a/srcpkgs/python3.4-feedparser b/srcpkgs/python3.4-feedparser new file mode 120000 index 00000000000..1e305c4f3d7 --- /dev/null +++ b/srcpkgs/python3.4-feedparser @@ -0,0 +1 @@ +python-feedparser \ No newline at end of file From 927e0e2dc6a0641b6015c93ceab36ea0c36fbf52 Mon Sep 17 00:00:00 2001 From: Dominik Honnef Date: Wed, 2 Jul 2014 12:13:36 +0200 Subject: [PATCH 4/5] New package: python-gntp --- srcpkgs/python-gntp/template | 23 +++++++++++++++++++++++ srcpkgs/python3.4-gntp | 1 + 2 files changed, 24 insertions(+) create mode 100644 srcpkgs/python-gntp/template create mode 120000 srcpkgs/python3.4-gntp diff --git a/srcpkgs/python-gntp/template b/srcpkgs/python-gntp/template new file mode 100644 index 00000000000..5477106f43e --- /dev/null +++ b/srcpkgs/python-gntp/template @@ -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 " +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 + } +} diff --git a/srcpkgs/python3.4-gntp b/srcpkgs/python3.4-gntp new file mode 120000 index 00000000000..34e4aaa0fa9 --- /dev/null +++ b/srcpkgs/python3.4-gntp @@ -0,0 +1 @@ +python-gntp \ No newline at end of file From 8601d20e8a6d11e5ad6d06dfb658bd7a83194371 Mon Sep 17 00:00:00 2001 From: Dominik Honnef Date: Wed, 2 Jul 2014 12:45:24 +0200 Subject: [PATCH 5/5] New package: sabnzbd --- srcpkgs/sabnzbd/INSTALL | 21 +++++++++ ...-00-system-configobj-feedparser-gntp.patch | 46 +++++++++++++++++++ srcpkgs/sabnzbd/template | 42 +++++++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 srcpkgs/sabnzbd/INSTALL create mode 100644 srcpkgs/sabnzbd/patches/sabnzbd-00-system-configobj-feedparser-gntp.patch create mode 100644 srcpkgs/sabnzbd/template diff --git a/srcpkgs/sabnzbd/INSTALL b/srcpkgs/sabnzbd/INSTALL new file mode 100644 index 00000000000..c2f61dcb868 --- /dev/null +++ b/srcpkgs/sabnzbd/INSTALL @@ -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 diff --git a/srcpkgs/sabnzbd/patches/sabnzbd-00-system-configobj-feedparser-gntp.patch b/srcpkgs/sabnzbd/patches/sabnzbd-00-system-configobj-feedparser-gntp.patch new file mode 100644 index 00000000000..48962f771f5 --- /dev/null +++ b/srcpkgs/sabnzbd/patches/sabnzbd-00-system-configobj-feedparser-gntp.patch @@ -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 diff --git a/srcpkgs/sabnzbd/template b/srcpkgs/sabnzbd/template new file mode 100644 index 00000000000..4fff65ccc9d --- /dev/null +++ b/srcpkgs/sabnzbd/template @@ -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 " +# 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 +}