summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-nntp/sabnzbd
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-nntp/sabnzbd')
-rw-r--r--net-nntp/sabnzbd/Manifest5
-rw-r--r--net-nntp/sabnzbd/files/growler-support-gntp-1.0.patch33
-rw-r--r--net-nntp/sabnzbd/files/par2cmdline.patch12
-rw-r--r--net-nntp/sabnzbd/files/sabnzbd14
-rw-r--r--net-nntp/sabnzbd/files/sabnzbd.confd6
-rw-r--r--net-nntp/sabnzbd/files/sabnzbd.ini14
-rw-r--r--net-nntp/sabnzbd/files/sabnzbd.initd99
-rw-r--r--net-nntp/sabnzbd/files/use-system-configobj-and-feedparser.patch44
-rw-r--r--net-nntp/sabnzbd/metadata.xml16
-rw-r--r--net-nntp/sabnzbd/sabnzbd-0.7.16.ebuild117
-rw-r--r--net-nntp/sabnzbd/sabnzbd-0.7.17.ebuild117
-rw-r--r--net-nntp/sabnzbd/sabnzbd-0.7.18.ebuild117
-rw-r--r--net-nntp/sabnzbd/sabnzbd-0.7.19.ebuild117
-rw-r--r--net-nntp/sabnzbd/sabnzbd-0.7.20.ebuild117
14 files changed, 828 insertions, 0 deletions
diff --git a/net-nntp/sabnzbd/Manifest b/net-nntp/sabnzbd/Manifest
new file mode 100644
index 000000000000..4bfb2182cfb6
--- /dev/null
+++ b/net-nntp/sabnzbd/Manifest
@@ -0,0 +1,5 @@
+DIST SABnzbd-0.7.16-src.tar.gz 2275768 SHA256 2c50496c8be81ac4498944a5209b2c6b3bdfecc48cf4e0df54552c5d985e5772 SHA512 ae97f093c34a100ab92949eb25a48db4c7d7d06c1fc082d3e8390d84e15dbdbbe4e682f47532cb84571039caab9aed377957522fa07b6a0f49c368eb77d66144 WHIRLPOOL 470f300f9f7b5f833d14c8170aee8690cddcfb9e442c3d9a6d108b155d6b2f7afab19010a7bf650c31e4ade5ca680433245a9c226948b52d8301861f5dc35965
+DIST SABnzbd-0.7.17-src.tar.gz 2310300 SHA256 a501517dbaf161deab2153118ff3b44512ee1d8984c3603bf17c593cf080eb09 SHA512 5f8ad391f698f5c8c069ea9a4be59124096ebd24793889db215cbc678dfd572c974083acd0d21b8b776d55cb9ebd8553952147ec2cd1768f3aab66cfba4ebaf3 WHIRLPOOL 6ec6a531c683607d36b533a1ae078ef87e5afdaa02e08588c8b5f045e735a1aa64c234e71c5d7218d15fed0eb64ef12f1a280ef65ed208b0d7a5e1408997fbca
+DIST SABnzbd-0.7.18-src.tar.gz 2317137 SHA256 aa05697d901b3e334e92f274b2e8788973059840be656a1545e8f2a4b070b014 SHA512 db7606be913fc89cdea0c037594b614c16f3887b32d1133c5f7a6c92f3dac5bec2250972e35941cd462e65bb29e91db2a43ff1e6624d827223afb957ec7922fe WHIRLPOOL 313e74425555af3dc86e111440974fefef42531018faad14a2a39649cef21a2b2d1d5a917c4ec13089ef9a46a2c31fe56b544ae0fa72628497782be756e8014f
+DIST SABnzbd-0.7.19-src.tar.gz 2386744 SHA256 31ad0ae24db3873011db816e1b100f4429734b2260f4c669b7261d2f85717487 SHA512 383788d87a3ee4e69ba818f6614f6929aa328d1153b746e04736868de598ee35e556a07cced7c74bc89c54fe77c1e52c4cdde8ed37d536a09bd1c605c551b9e7 WHIRLPOOL fbf1ab129a403011bd6957272d348fd745621e9c13f46f3988362bb8bb7a6ceb26b57253978ec5f5ae97c2ea942ba80ff1cab0ca1d1f99d33a1c55fc03b0dad9
+DIST SABnzbd-0.7.20-src.tar.gz 2389762 SHA256 20b3a4613a0ecdede4fdfeb628ae806e458ac1a6fb684306328dd4ed1faf8742 SHA512 51ea888fcb7b49156cb719cb4fe75725d69acd726097d8b2526d6af87d0404bf08d0ab4b82f25dae7ac9a52d6c639e57a145bf5af6005fa435ad31f239a716d5 WHIRLPOOL 2686160be649c051ac1186481dae1e876650fbc91fe3ea1ab2d1569baea51f0ab7d0be6c7942b9facd6e5f856ab24ab36d1dc2f55dc645f06be275b2e43abb4b
diff --git a/net-nntp/sabnzbd/files/growler-support-gntp-1.0.patch b/net-nntp/sabnzbd/files/growler-support-gntp-1.0.patch
new file mode 100644
index 000000000000..560b88a18d49
--- /dev/null
+++ b/net-nntp/sabnzbd/files/growler-support-gntp-1.0.patch
@@ -0,0 +1,33 @@
+From 96b4891d2323cb44f479bc94d1410348b1468298 Mon Sep 17 00:00:00 2001
+From: Justin Bronder <jsbronder@gmail.com>
+Date: Mon, 24 Jun 2013 19:03:17 -0400
+Subject: [PATCH] growler: support >=gntp-1.0
+
+Fixes Gentoo bug https://bugs.gentoo.org/show_bug.cgi?id=474540
+---
+ sabnzbd/growler.py | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/sabnzbd/growler.py b/sabnzbd/growler.py
+index d250703..f39bb44 100644
+--- 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
+--
+1.8.1.5
+
diff --git a/net-nntp/sabnzbd/files/par2cmdline.patch b/net-nntp/sabnzbd/files/par2cmdline.patch
new file mode 100644
index 000000000000..d5648eb57aea
--- /dev/null
+++ b/net-nntp/sabnzbd/files/par2cmdline.patch
@@ -0,0 +1,12 @@
+--- sabnzbd/newsunpack.py.orig 2013-07-07 13:29:12.000000000 +0200
++++ sabnzbd/newsunpack.py 2013-08-02 20:16:22.286697000 +0200
+@@ -966,7 +966,7 @@
+
+ # Append the wildcard for this set
+ wildcard = '%s*' % os.path.join(os.path.split(parfile)[0], setname)
+- if single or len(globber(wildcard, None)) < 2:
++ if len(globber(wildcard, None)) < 2:
+ # Support bizarre naming conventions
+ wildcard = os.path.join(os.path.split(parfile)[0], '*')
+ command.append(wildcard)
+
diff --git a/net-nntp/sabnzbd/files/sabnzbd b/net-nntp/sabnzbd/files/sabnzbd
new file mode 100644
index 000000000000..ccc1a67fcf71
--- /dev/null
+++ b/net-nntp/sabnzbd/files/sabnzbd
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+pyexe=python2.7
+
+if [ ! -x /usr/bin/${pyexe} ]; then
+ pyexe=python2.6
+fi
+
+if [ ! -x /usr/bin/${pyexe} ]; then
+ echo "No suitable python executable found in /usr/sbin (python2.6 || python2.7)"
+ exit 1
+fi
+
+cd /usr/share/sabnzbd && /usr/bin/${pyexe} SABnzbd.py $*
diff --git a/net-nntp/sabnzbd/files/sabnzbd.confd b/net-nntp/sabnzbd/files/sabnzbd.confd
new file mode 100644
index 000000000000..ec40168657bd
--- /dev/null
+++ b/net-nntp/sabnzbd/files/sabnzbd.confd
@@ -0,0 +1,6 @@
+SABNZBD_CONFIGFILE=/etc/sabnzbd/sabnzbd.ini
+SABNZBD_USER=sabnzbd
+SABNZBD_GROUP=sabnzbd
+
+# 0 - error/warnings, 1 - info, 2 - debug
+SABNZBD_LOGGING=1
diff --git a/net-nntp/sabnzbd/files/sabnzbd.ini b/net-nntp/sabnzbd/files/sabnzbd.ini
new file mode 100644
index 000000000000..1ce776f86c18
--- /dev/null
+++ b/net-nntp/sabnzbd/files/sabnzbd.ini
@@ -0,0 +1,14 @@
+__version__ = 19
+[misc]
+log_dir = /var/log/sabnzbd
+admin_dir = /var/lib/sabnzbd/admin
+cache_dir = /var/lib/sabnzbd/cache
+complete_dir = /var/lib/sabnzbd/complete
+download_dir = /var/lib/sabnzbd/download
+dirscan_dir = /var/lib/sabnzbd/dirscan
+nzb_backup_dir = /var/lib/sabnzbd/backup
+auto_browser = 0
+host = 0.0.0.0
+port = 8080
+[growl]
+growl_enable = 0
diff --git a/net-nntp/sabnzbd/files/sabnzbd.initd b/net-nntp/sabnzbd/files/sabnzbd.initd
new file mode 100644
index 000000000000..5cfc91b9e70a
--- /dev/null
+++ b/net-nntp/sabnzbd/files/sabnzbd.initd
@@ -0,0 +1,99 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+RUNDIR=/var/run/sabnzbd
+
+depend() {
+ need net
+}
+
+get_var() {
+ echo $(sed -n \
+ '/^\[misc]/,/^'$1'/ s/^'$1' = \([[:alnum:].]\+\)[\r|\n|\r\n]*$/\1/p' \
+ "${SABNZBD_CONFIGFILE}")
+}
+
+get_port() {
+ if [ "$(get_var 'enable_https')" -eq 1 ]; then
+ echo $(get_var 'https_port')
+ else
+ echo $(get_var 'port')
+ fi
+}
+
+get_addr() {
+ local host=$(get_var 'host')
+ local protocol='http'
+
+ [ "${host}" == "0.0.0.0" ] && host=localhost
+ [ "$(get_var 'enable_https')" -eq 1 ] && protocol='https'
+
+ echo "${protocol}://${host}:$(get_port)"
+}
+
+get_pidfile() {
+ echo "${RUNDIR}/sabnzbd-$(get_port).pid"
+}
+
+start() {
+ ebegin "Starting SABnzbd"
+
+ checkpath -q -d -o ${SABNZBD_USER}:${SABNZBD_GROUP} -m 0770 "${RUNDIR}"
+
+ start-stop-daemon \
+ --quiet \
+ --start \
+ --user ${SABNZBD_USER} \
+ --group ${SABNZBD_GROUP} \
+ --name sabnzbd \
+ --background \
+ --pidfile "$(get_pidfile)" \
+ --exec /usr/bin/sabnzbd \
+ -- \
+ --config-file "${SABNZBD_CONFIGFILE}" \
+ --logging "${SABNZBD_LOGGING}" \
+ --daemon \
+ --pid "${RUNDIR}"
+
+ eend $?
+}
+
+start_pre() {
+ if [ "$RC_CMD" == "restart" ]; then
+ local pidfile=$(get_pidfile)
+ while [ -e ${pidfile} ]; do
+ sleep 1
+ done
+ fi
+
+ return 0
+}
+
+stop() {
+ local api_key=$(get_var 'api_key')
+ local addr=$(get_addr)
+ local rc=1
+
+ ebegin "Stopping SABnzbd @ ${addr}"
+ # This can only work if we have enabled the API
+ if [ -n "${api_key}" -a "$(get_var 'disable_api_key')" -ne 1 ]; then
+ local ret
+ einfo "Attempting web-based shutdown @ ${addr}"
+
+ # SABnzbd will return "ok" if shutdown is successful
+ ret=$(/usr/bin/curl -k -s "${addr}/sabnzbd/api?mode=shutdown&apikey=${api_key}")
+ [ "${ret}" == "ok" ] && rc=0
+ fi
+
+ if [ "${rc}" -ne 0 ]; then
+ einfo "Falling back to SIGTERM, this may not work if you restarted via the web interface"
+ start-stop-daemon \
+ --stop \
+ --pidfile $(get_pidfile) \
+ --retry SIGTERM/1/SIGKILL/5
+ rc=$?
+ fi
+
+ eend ${rc}
+}
diff --git a/net-nntp/sabnzbd/files/use-system-configobj-and-feedparser.patch b/net-nntp/sabnzbd/files/use-system-configobj-and-feedparser.patch
new file mode 100644
index 000000000000..a55a54a01093
--- /dev/null
+++ b/net-nntp/sabnzbd/files/use-system-configobj-and-feedparser.patch
@@ -0,0 +1,44 @@
+From 89cb8b86fb087bc4706478ce4ec3ad5fd19602e6 Mon Sep 17 00:00:00 2001
+From: Justin Bronder <jsbronder@gmail.com>
+Date: Thu, 3 Jan 2013 04:10:37 -0500
+Subject: [PATCH] use system configobj and feedparser
+
+---
+ sabnzbd/config.py | 4 +++-
+ sabnzbd/rss.py | 2 +-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/sabnzbd/config.py b/sabnzbd/config.py
+index c3fc54c..cce2b14 100644
+--- 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()
+diff --git a/sabnzbd/rss.py b/sabnzbd/rss.py
+index 6fe6f5b..19a5d0f 100644
+--- 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
+
+--
+1.7.3.4
+
diff --git a/net-nntp/sabnzbd/metadata.xml b/net-nntp/sabnzbd/metadata.xml
new file mode 100644
index 000000000000..3ae021381fad
--- /dev/null
+++ b/net-nntp/sabnzbd/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jsbronder@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="rar">Add support for extracting rar files</flag>
+ <flag name="ssl">Add support for SSL web interface</flag>
+ <flag name="unzip">Add support for extracting zip files</flag>
+ <flag name="yenc">Use yenc to speed up nntp encoding and decoding</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">sabnzbdplus</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-nntp/sabnzbd/sabnzbd-0.7.16.ebuild b/net-nntp/sabnzbd/sabnzbd-0.7.16.ebuild
new file mode 100644
index 000000000000..4d8ee3bce7a4
--- /dev/null
+++ b/net-nntp/sabnzbd/sabnzbd-0.7.16.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+# Require python-2 with sqlite USE flag
+PYTHON_DEPEND="2:2.6"
+PYTHON_USE_WITH="sqlite"
+
+inherit eutils python user
+
+MY_P="${P/sab/SAB}"
+
+DESCRIPTION="Binary newsgrabber with web-interface"
+HOMEPAGE="http://www.sabnzbd.org/"
+SRC_URI="mirror://sourceforge/sabnzbdplus/${MY_P}-src.tar.gz"
+
+# Sabnzbd is GPL-2 but bundles software with the following licenses.
+LICENSE="GPL-2 BSD LGPL-2 MIT BSD-1"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+rar +ssl unzip +yenc"
+
+# Sabnzbd is installed to /usr/share/ as upstream makes it clear they should not
+# be in python's sitedir. See: http://wiki.sabnzbd.org/unix-packaging
+
+# TODO: still bundled but not in protage:
+# kronos, rarfile, rsslib, ssmtplib, listquote, json-py, msgfmt
+# pynewsleecher
+#
+# Also note that cherrypy is still bundled. It's near impossible to find
+# out where the bundled and heavily patched version came from (pulled from
+# cherrypy subversion, patched somewhere, then imported to sabnzbd and patched
+# further. Upstream is planning on making this easier with 0.8.0.
+# https://github.com/sabnzbd/sabnzbd/issues/47
+
+RDEPEND="
+ >=app-arch/par2cmdline-0.4
+ >=dev-python/cheetah-2.0.1
+ dev-python/configobj
+ dev-python/feedparser
+ dev-python/gntp
+ dev-python/pythonutils
+ net-misc/wget
+ rar? ( || ( app-arch/unrar app-arch/rar ) )
+ ssl? ( dev-python/pyopenssl )
+ unzip? ( >=app-arch/unzip-5.5.2 )
+ yenc? ( dev-python/yenc )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ HOMEDIR="/var/lib/${PN}"
+ python_set_active_version 2
+ python_pkg_setup
+
+ # Create sabnzbd group
+ enewgroup ${PN}
+ # Create sabnzbd user, put in sabnzbd group
+ enewuser "${PN}" -1 -1 "${HOMEDIR}" "${PN}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/use-system-configobj-and-feedparser.patch
+ epatch "${FILESDIR}"/growler-support-gntp-1.0.patch
+ epatch "${FILESDIR}"/par2cmdline.patch
+
+ # remove bundled modules
+ rm -r sabnzbd/utils/{feedparser,configobj}.py || die
+ rm -r gntp || die
+ rm licenses/License-{feedparser,configobj,gntp}.txt || die
+}
+
+src_install() {
+ local d
+
+ dodir /usr/share/${PN}/sabnzbd
+ insinto /usr/share/${PN}/
+ doins SABnzbd.py
+ fperms +x /usr/share/${PN}/SABnzbd.py
+ dobin "${FILESDIR}"/sabnzbd
+
+ for d in cherrypy email icons interfaces locale po sabnzbd tools util; do
+ insinto /usr/share/${PN}/${d}
+ doins -r ${d}/*
+ done
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+
+ diropts -o ${PN} -g ${PN}
+ dodir /etc/${PN}
+ dodir /var/log/${PN}
+
+ insinto "/etc/${PN}"
+ insopts -m 0600 -o ${PN} -g ${PN}
+ doins "${FILESDIR}/${PN}.ini"
+
+ dodoc {ABOUT,CHANGELOG,ISSUES,README}.txt Sample-PostProc.sh licenses/*
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/share/${PN}
+
+ einfo "Default directory: ${HOMEDIR}"
+ einfo ""
+ einfo "Run: gpasswd -a <user> sabnzbd"
+ einfo "to add a user to the sabnzbd group so it can edit sabnzbd files"
+ einfo ""
+ einfo "By default sabnzbd will listen on 127.0.0.1:8080"
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/share/${PN}
+}
diff --git a/net-nntp/sabnzbd/sabnzbd-0.7.17.ebuild b/net-nntp/sabnzbd/sabnzbd-0.7.17.ebuild
new file mode 100644
index 000000000000..4d8ee3bce7a4
--- /dev/null
+++ b/net-nntp/sabnzbd/sabnzbd-0.7.17.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+# Require python-2 with sqlite USE flag
+PYTHON_DEPEND="2:2.6"
+PYTHON_USE_WITH="sqlite"
+
+inherit eutils python user
+
+MY_P="${P/sab/SAB}"
+
+DESCRIPTION="Binary newsgrabber with web-interface"
+HOMEPAGE="http://www.sabnzbd.org/"
+SRC_URI="mirror://sourceforge/sabnzbdplus/${MY_P}-src.tar.gz"
+
+# Sabnzbd is GPL-2 but bundles software with the following licenses.
+LICENSE="GPL-2 BSD LGPL-2 MIT BSD-1"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+rar +ssl unzip +yenc"
+
+# Sabnzbd is installed to /usr/share/ as upstream makes it clear they should not
+# be in python's sitedir. See: http://wiki.sabnzbd.org/unix-packaging
+
+# TODO: still bundled but not in protage:
+# kronos, rarfile, rsslib, ssmtplib, listquote, json-py, msgfmt
+# pynewsleecher
+#
+# Also note that cherrypy is still bundled. It's near impossible to find
+# out where the bundled and heavily patched version came from (pulled from
+# cherrypy subversion, patched somewhere, then imported to sabnzbd and patched
+# further. Upstream is planning on making this easier with 0.8.0.
+# https://github.com/sabnzbd/sabnzbd/issues/47
+
+RDEPEND="
+ >=app-arch/par2cmdline-0.4
+ >=dev-python/cheetah-2.0.1
+ dev-python/configobj
+ dev-python/feedparser
+ dev-python/gntp
+ dev-python/pythonutils
+ net-misc/wget
+ rar? ( || ( app-arch/unrar app-arch/rar ) )
+ ssl? ( dev-python/pyopenssl )
+ unzip? ( >=app-arch/unzip-5.5.2 )
+ yenc? ( dev-python/yenc )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ HOMEDIR="/var/lib/${PN}"
+ python_set_active_version 2
+ python_pkg_setup
+
+ # Create sabnzbd group
+ enewgroup ${PN}
+ # Create sabnzbd user, put in sabnzbd group
+ enewuser "${PN}" -1 -1 "${HOMEDIR}" "${PN}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/use-system-configobj-and-feedparser.patch
+ epatch "${FILESDIR}"/growler-support-gntp-1.0.patch
+ epatch "${FILESDIR}"/par2cmdline.patch
+
+ # remove bundled modules
+ rm -r sabnzbd/utils/{feedparser,configobj}.py || die
+ rm -r gntp || die
+ rm licenses/License-{feedparser,configobj,gntp}.txt || die
+}
+
+src_install() {
+ local d
+
+ dodir /usr/share/${PN}/sabnzbd
+ insinto /usr/share/${PN}/
+ doins SABnzbd.py
+ fperms +x /usr/share/${PN}/SABnzbd.py
+ dobin "${FILESDIR}"/sabnzbd
+
+ for d in cherrypy email icons interfaces locale po sabnzbd tools util; do
+ insinto /usr/share/${PN}/${d}
+ doins -r ${d}/*
+ done
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+
+ diropts -o ${PN} -g ${PN}
+ dodir /etc/${PN}
+ dodir /var/log/${PN}
+
+ insinto "/etc/${PN}"
+ insopts -m 0600 -o ${PN} -g ${PN}
+ doins "${FILESDIR}/${PN}.ini"
+
+ dodoc {ABOUT,CHANGELOG,ISSUES,README}.txt Sample-PostProc.sh licenses/*
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/share/${PN}
+
+ einfo "Default directory: ${HOMEDIR}"
+ einfo ""
+ einfo "Run: gpasswd -a <user> sabnzbd"
+ einfo "to add a user to the sabnzbd group so it can edit sabnzbd files"
+ einfo ""
+ einfo "By default sabnzbd will listen on 127.0.0.1:8080"
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/share/${PN}
+}
diff --git a/net-nntp/sabnzbd/sabnzbd-0.7.18.ebuild b/net-nntp/sabnzbd/sabnzbd-0.7.18.ebuild
new file mode 100644
index 000000000000..4d8ee3bce7a4
--- /dev/null
+++ b/net-nntp/sabnzbd/sabnzbd-0.7.18.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+# Require python-2 with sqlite USE flag
+PYTHON_DEPEND="2:2.6"
+PYTHON_USE_WITH="sqlite"
+
+inherit eutils python user
+
+MY_P="${P/sab/SAB}"
+
+DESCRIPTION="Binary newsgrabber with web-interface"
+HOMEPAGE="http://www.sabnzbd.org/"
+SRC_URI="mirror://sourceforge/sabnzbdplus/${MY_P}-src.tar.gz"
+
+# Sabnzbd is GPL-2 but bundles software with the following licenses.
+LICENSE="GPL-2 BSD LGPL-2 MIT BSD-1"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+rar +ssl unzip +yenc"
+
+# Sabnzbd is installed to /usr/share/ as upstream makes it clear they should not
+# be in python's sitedir. See: http://wiki.sabnzbd.org/unix-packaging
+
+# TODO: still bundled but not in protage:
+# kronos, rarfile, rsslib, ssmtplib, listquote, json-py, msgfmt
+# pynewsleecher
+#
+# Also note that cherrypy is still bundled. It's near impossible to find
+# out where the bundled and heavily patched version came from (pulled from
+# cherrypy subversion, patched somewhere, then imported to sabnzbd and patched
+# further. Upstream is planning on making this easier with 0.8.0.
+# https://github.com/sabnzbd/sabnzbd/issues/47
+
+RDEPEND="
+ >=app-arch/par2cmdline-0.4
+ >=dev-python/cheetah-2.0.1
+ dev-python/configobj
+ dev-python/feedparser
+ dev-python/gntp
+ dev-python/pythonutils
+ net-misc/wget
+ rar? ( || ( app-arch/unrar app-arch/rar ) )
+ ssl? ( dev-python/pyopenssl )
+ unzip? ( >=app-arch/unzip-5.5.2 )
+ yenc? ( dev-python/yenc )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ HOMEDIR="/var/lib/${PN}"
+ python_set_active_version 2
+ python_pkg_setup
+
+ # Create sabnzbd group
+ enewgroup ${PN}
+ # Create sabnzbd user, put in sabnzbd group
+ enewuser "${PN}" -1 -1 "${HOMEDIR}" "${PN}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/use-system-configobj-and-feedparser.patch
+ epatch "${FILESDIR}"/growler-support-gntp-1.0.patch
+ epatch "${FILESDIR}"/par2cmdline.patch
+
+ # remove bundled modules
+ rm -r sabnzbd/utils/{feedparser,configobj}.py || die
+ rm -r gntp || die
+ rm licenses/License-{feedparser,configobj,gntp}.txt || die
+}
+
+src_install() {
+ local d
+
+ dodir /usr/share/${PN}/sabnzbd
+ insinto /usr/share/${PN}/
+ doins SABnzbd.py
+ fperms +x /usr/share/${PN}/SABnzbd.py
+ dobin "${FILESDIR}"/sabnzbd
+
+ for d in cherrypy email icons interfaces locale po sabnzbd tools util; do
+ insinto /usr/share/${PN}/${d}
+ doins -r ${d}/*
+ done
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+
+ diropts -o ${PN} -g ${PN}
+ dodir /etc/${PN}
+ dodir /var/log/${PN}
+
+ insinto "/etc/${PN}"
+ insopts -m 0600 -o ${PN} -g ${PN}
+ doins "${FILESDIR}/${PN}.ini"
+
+ dodoc {ABOUT,CHANGELOG,ISSUES,README}.txt Sample-PostProc.sh licenses/*
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/share/${PN}
+
+ einfo "Default directory: ${HOMEDIR}"
+ einfo ""
+ einfo "Run: gpasswd -a <user> sabnzbd"
+ einfo "to add a user to the sabnzbd group so it can edit sabnzbd files"
+ einfo ""
+ einfo "By default sabnzbd will listen on 127.0.0.1:8080"
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/share/${PN}
+}
diff --git a/net-nntp/sabnzbd/sabnzbd-0.7.19.ebuild b/net-nntp/sabnzbd/sabnzbd-0.7.19.ebuild
new file mode 100644
index 000000000000..4d8ee3bce7a4
--- /dev/null
+++ b/net-nntp/sabnzbd/sabnzbd-0.7.19.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+# Require python-2 with sqlite USE flag
+PYTHON_DEPEND="2:2.6"
+PYTHON_USE_WITH="sqlite"
+
+inherit eutils python user
+
+MY_P="${P/sab/SAB}"
+
+DESCRIPTION="Binary newsgrabber with web-interface"
+HOMEPAGE="http://www.sabnzbd.org/"
+SRC_URI="mirror://sourceforge/sabnzbdplus/${MY_P}-src.tar.gz"
+
+# Sabnzbd is GPL-2 but bundles software with the following licenses.
+LICENSE="GPL-2 BSD LGPL-2 MIT BSD-1"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+rar +ssl unzip +yenc"
+
+# Sabnzbd is installed to /usr/share/ as upstream makes it clear they should not
+# be in python's sitedir. See: http://wiki.sabnzbd.org/unix-packaging
+
+# TODO: still bundled but not in protage:
+# kronos, rarfile, rsslib, ssmtplib, listquote, json-py, msgfmt
+# pynewsleecher
+#
+# Also note that cherrypy is still bundled. It's near impossible to find
+# out where the bundled and heavily patched version came from (pulled from
+# cherrypy subversion, patched somewhere, then imported to sabnzbd and patched
+# further. Upstream is planning on making this easier with 0.8.0.
+# https://github.com/sabnzbd/sabnzbd/issues/47
+
+RDEPEND="
+ >=app-arch/par2cmdline-0.4
+ >=dev-python/cheetah-2.0.1
+ dev-python/configobj
+ dev-python/feedparser
+ dev-python/gntp
+ dev-python/pythonutils
+ net-misc/wget
+ rar? ( || ( app-arch/unrar app-arch/rar ) )
+ ssl? ( dev-python/pyopenssl )
+ unzip? ( >=app-arch/unzip-5.5.2 )
+ yenc? ( dev-python/yenc )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ HOMEDIR="/var/lib/${PN}"
+ python_set_active_version 2
+ python_pkg_setup
+
+ # Create sabnzbd group
+ enewgroup ${PN}
+ # Create sabnzbd user, put in sabnzbd group
+ enewuser "${PN}" -1 -1 "${HOMEDIR}" "${PN}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/use-system-configobj-and-feedparser.patch
+ epatch "${FILESDIR}"/growler-support-gntp-1.0.patch
+ epatch "${FILESDIR}"/par2cmdline.patch
+
+ # remove bundled modules
+ rm -r sabnzbd/utils/{feedparser,configobj}.py || die
+ rm -r gntp || die
+ rm licenses/License-{feedparser,configobj,gntp}.txt || die
+}
+
+src_install() {
+ local d
+
+ dodir /usr/share/${PN}/sabnzbd
+ insinto /usr/share/${PN}/
+ doins SABnzbd.py
+ fperms +x /usr/share/${PN}/SABnzbd.py
+ dobin "${FILESDIR}"/sabnzbd
+
+ for d in cherrypy email icons interfaces locale po sabnzbd tools util; do
+ insinto /usr/share/${PN}/${d}
+ doins -r ${d}/*
+ done
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+
+ diropts -o ${PN} -g ${PN}
+ dodir /etc/${PN}
+ dodir /var/log/${PN}
+
+ insinto "/etc/${PN}"
+ insopts -m 0600 -o ${PN} -g ${PN}
+ doins "${FILESDIR}/${PN}.ini"
+
+ dodoc {ABOUT,CHANGELOG,ISSUES,README}.txt Sample-PostProc.sh licenses/*
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/share/${PN}
+
+ einfo "Default directory: ${HOMEDIR}"
+ einfo ""
+ einfo "Run: gpasswd -a <user> sabnzbd"
+ einfo "to add a user to the sabnzbd group so it can edit sabnzbd files"
+ einfo ""
+ einfo "By default sabnzbd will listen on 127.0.0.1:8080"
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/share/${PN}
+}
diff --git a/net-nntp/sabnzbd/sabnzbd-0.7.20.ebuild b/net-nntp/sabnzbd/sabnzbd-0.7.20.ebuild
new file mode 100644
index 000000000000..4d8ee3bce7a4
--- /dev/null
+++ b/net-nntp/sabnzbd/sabnzbd-0.7.20.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+# Require python-2 with sqlite USE flag
+PYTHON_DEPEND="2:2.6"
+PYTHON_USE_WITH="sqlite"
+
+inherit eutils python user
+
+MY_P="${P/sab/SAB}"
+
+DESCRIPTION="Binary newsgrabber with web-interface"
+HOMEPAGE="http://www.sabnzbd.org/"
+SRC_URI="mirror://sourceforge/sabnzbdplus/${MY_P}-src.tar.gz"
+
+# Sabnzbd is GPL-2 but bundles software with the following licenses.
+LICENSE="GPL-2 BSD LGPL-2 MIT BSD-1"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="+rar +ssl unzip +yenc"
+
+# Sabnzbd is installed to /usr/share/ as upstream makes it clear they should not
+# be in python's sitedir. See: http://wiki.sabnzbd.org/unix-packaging
+
+# TODO: still bundled but not in protage:
+# kronos, rarfile, rsslib, ssmtplib, listquote, json-py, msgfmt
+# pynewsleecher
+#
+# Also note that cherrypy is still bundled. It's near impossible to find
+# out where the bundled and heavily patched version came from (pulled from
+# cherrypy subversion, patched somewhere, then imported to sabnzbd and patched
+# further. Upstream is planning on making this easier with 0.8.0.
+# https://github.com/sabnzbd/sabnzbd/issues/47
+
+RDEPEND="
+ >=app-arch/par2cmdline-0.4
+ >=dev-python/cheetah-2.0.1
+ dev-python/configobj
+ dev-python/feedparser
+ dev-python/gntp
+ dev-python/pythonutils
+ net-misc/wget
+ rar? ( || ( app-arch/unrar app-arch/rar ) )
+ ssl? ( dev-python/pyopenssl )
+ unzip? ( >=app-arch/unzip-5.5.2 )
+ yenc? ( dev-python/yenc )
+"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ HOMEDIR="/var/lib/${PN}"
+ python_set_active_version 2
+ python_pkg_setup
+
+ # Create sabnzbd group
+ enewgroup ${PN}
+ # Create sabnzbd user, put in sabnzbd group
+ enewuser "${PN}" -1 -1 "${HOMEDIR}" "${PN}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/use-system-configobj-and-feedparser.patch
+ epatch "${FILESDIR}"/growler-support-gntp-1.0.patch
+ epatch "${FILESDIR}"/par2cmdline.patch
+
+ # remove bundled modules
+ rm -r sabnzbd/utils/{feedparser,configobj}.py || die
+ rm -r gntp || die
+ rm licenses/License-{feedparser,configobj,gntp}.txt || die
+}
+
+src_install() {
+ local d
+
+ dodir /usr/share/${PN}/sabnzbd
+ insinto /usr/share/${PN}/
+ doins SABnzbd.py
+ fperms +x /usr/share/${PN}/SABnzbd.py
+ dobin "${FILESDIR}"/sabnzbd
+
+ for d in cherrypy email icons interfaces locale po sabnzbd tools util; do
+ insinto /usr/share/${PN}/${d}
+ doins -r ${d}/*
+ done
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+
+ diropts -o ${PN} -g ${PN}
+ dodir /etc/${PN}
+ dodir /var/log/${PN}
+
+ insinto "/etc/${PN}"
+ insopts -m 0600 -o ${PN} -g ${PN}
+ doins "${FILESDIR}/${PN}.ini"
+
+ dodoc {ABOUT,CHANGELOG,ISSUES,README}.txt Sample-PostProc.sh licenses/*
+}
+
+pkg_postinst() {
+ python_mod_optimize /usr/share/${PN}
+
+ einfo "Default directory: ${HOMEDIR}"
+ einfo ""
+ einfo "Run: gpasswd -a <user> sabnzbd"
+ einfo "to add a user to the sabnzbd group so it can edit sabnzbd files"
+ einfo ""
+ einfo "By default sabnzbd will listen on 127.0.0.1:8080"
+}
+
+pkg_postrm() {
+ python_mod_cleanup /usr/share/${PN}
+}