diff options
author | Justin Bronder <jsbronder@gentoo.org> | 2013-01-03 20:02:41 +0000 |
---|---|---|
committer | Justin Bronder <jsbronder@gentoo.org> | 2013-01-03 20:02:41 +0000 |
commit | e1daccb874326fd601f232b7a22634efa1ae2b46 (patch) | |
tree | 8b180e97bb4cdcd3b874c8d71bbbf2719fc589fd /net-nntp | |
parent | Version bump to the latest. (diff) | |
download | historical-e1daccb874326fd601f232b7a22634efa1ae2b46.tar.gz historical-e1daccb874326fd601f232b7a22634efa1ae2b46.tar.bz2 historical-e1daccb874326fd601f232b7a22634efa1ae2b46.zip |
add net-nntp/sabnzbd
Package-Manager: portage-2.1.11.37/cvs/Linux x86_64
Manifest-Sign-Key: 0x4D7043C9
Diffstat (limited to 'net-nntp')
-rw-r--r-- | net-nntp/sabnzbd/ChangeLog | 11 | ||||
-rw-r--r-- | net-nntp/sabnzbd/Manifest | 18 | ||||
-rw-r--r-- | net-nntp/sabnzbd/files/sabnzbd | 3 | ||||
-rw-r--r-- | net-nntp/sabnzbd/files/sabnzbd.confd | 8 | ||||
-rw-r--r-- | net-nntp/sabnzbd/files/sabnzbd.initd | 41 | ||||
-rw-r--r-- | net-nntp/sabnzbd/files/use-system-configobj-and-feedparser.patch | 44 | ||||
-rw-r--r-- | net-nntp/sabnzbd/metadata.xml | 12 | ||||
-rw-r--r-- | net-nntp/sabnzbd/sabnzbd-0.7.7.ebuild | 104 |
8 files changed, 241 insertions, 0 deletions
diff --git a/net-nntp/sabnzbd/ChangeLog b/net-nntp/sabnzbd/ChangeLog new file mode 100644 index 000000000000..2e52f3a15550 --- /dev/null +++ b/net-nntp/sabnzbd/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for net-nntp/sabnzbd +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-nntp/sabnzbd/ChangeLog,v 1.1 2013/01/03 20:02:32 jsbronder Exp $ + +*sabnzbd-0.7.7 (03 Jan 2013) + + 03 Jan 2013; Justin Bronder <jsbronder@gentoo.org> +sabnzbd-0.7.7.ebuild, + +files/sabnzbd, +files/sabnzbd.confd, +files/sabnzbd.initd, + +files/use-system-configobj-and-feedparser.patch, +metadata.xml: + add net-nntp/sabnzbd + diff --git a/net-nntp/sabnzbd/Manifest b/net-nntp/sabnzbd/Manifest new file mode 100644 index 000000000000..fd52cb9d4cfa --- /dev/null +++ b/net-nntp/sabnzbd/Manifest @@ -0,0 +1,18 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX sabnzbd 57 SHA256 923c9ebd69763b0b8d1012b63113d8c48ce2e2a5a79f027064d09fe17738f86f SHA512 91839a8f85b2b95d86a196ed1e430210b8af75f2f203243ec9c279237f316a4c351d7809b548289becb3d7e438287ced0045a532b3b62fd0b1791da3b150d84c WHIRLPOOL d9a7e8049db9a4dac85912ed2d0cf9cc0d800ac663f21de0147aac65681c04b9581ebcfa182eed35df0faa47e050dc6153dabfbb70f93e04ed81ca6f69be85a1 +AUX sabnzbd.confd 189 SHA256 684877bf6d36927b5e51a66c5f4bf539cdbb407d570ce4a35bdd309634bd5b11 SHA512 d62a867adca670d1679a2679b038bece85618083db4b7b3cc41bb86b389ce1e12f1d003499e93be94b1046228751f8424349847acc68e35165f0e64464c157c9 WHIRLPOOL 3ea13bbea28f4b78ad35f0efdfcaed44a2748e6b58bde5156feb643027a8adca7aaf42d55cbdcb08bdaa536fac90f429dfe361ef71e6f16716c6ac1f87c208a0 +AUX sabnzbd.initd 1039 SHA256 c702dc57f31bd03b5c2bb659c0f3ca0253b38f6c9ba3e339aefbe952887caedb SHA512 98ea7573ff3b76406f207a23e062f0493fe1bdf2f1dc79f27fe09c91a1a72cf6568fcb33662f39731666de6ded11be75de99b2b5645f59101ef6b67d3cd2f646 WHIRLPOOL 5bec10dd4e87e03ec13ab05bf5456afa680b682ffcec0272f6e9aaef480b52671d5a01ed8e5cb67472ba9304cb40e1b514cfef94f59a2047999fc72f8c41403d +AUX use-system-configobj-and-feedparser.patch 1254 SHA256 39e01c79058f37257e6f873f0e2643631d0f7c207fad058f227cfd0833f9ca9a SHA512 c2cf92909bd171d63179e4c2cbedf3f61b26bde2944e455b9ca798dd11aca5cccb85830df9d2f5800e5a0757e5ca9b14c78a275a025838a9ade52b6219a0af27 WHIRLPOOL df4221e3322d7c48e338e6cc80ef207f1dddcdc477e2a428825d3bf9c37772c545b94bebabb86e507ecece19a6a20bfc34356f6114dad521d3ee6e75a88ba2f5 +DIST SABnzbd-0.7.7-src.tar.gz 2263992 SHA256 8f972449e6033414ac5fe10d97b31ffdc49488239e04a88c6aff4231e8d4a0b7 SHA512 6ab065b1112ff71305873d2c6cb8425af998f7fcd968d80860b3e625615f3d5d989e76334bb922371ef77d1bbef7d9223575ccc3d54b97c1af3fea0a02f35b91 WHIRLPOOL 2da76c52c63c018345fd8b806cf9a3b482f212745b2374ede8955e226ddf9ba804565cb2c2f3a210f10b67d2119173809ad186253d3ffbac2ef5e160cfc583b5 +EBUILD sabnzbd-0.7.7.ebuild 2666 SHA256 95dd31750eabd57067c5af46b416c477d573c19d3ec7c002821a4282d5fea01f SHA512 6f0f976bcaf8b1ec10081fbb3ec69c85c39d3697622f740167aed549067fdd0aad2df8e1167cfc29e72d20c45c61526aa288632d2b2ad0ca7bcd7bb45b5b3f62 WHIRLPOOL 034cdc2470742ed7c7a19b2c7854500b9ad800237f146edd5feb485ad5f23132986c645f8836dd03a02dfd7370c9c1e925bc45b465f1f01c2946214d61fcc584 +MISC ChangeLog 467 SHA256 9ece5a6f1de8f86cef1f9c4b415a5b5140d4b3f74fb952f22eb50ce4e4f87b14 SHA512 aa6e4687eae19976e98f1142d8e86550610c50119b517f3f182edd7184c8f537d401acab6175f45509df72f5d0bc44b52752e226ecc079748fbd04bdb1b3fd1c WHIRLPOOL 7e4f942f5bc220bea901a567a928fc04a3f1ae4b7266b9d0472e06c38724ed20ad522218563e72150b0ceb1908029de33301bd845630b43d50290baa4549f823 +MISC metadata.xml 409 SHA256 1e9383805bb1e2c39011ad3ec453c2609ae5d1ae29b13b03344c821acb5d74e8 SHA512 8b9e3000938add2ce4af91dcd52de5b60fe4ad4990228a2e81323fcebad295a7a2da424ee40d9da33d7020083c0d46f1ef1c40920b31e2eb916d70deb59788c3 WHIRLPOOL f4a1565698b34d4e74e48805b5a5bad225fe9926595b080e1373daee919b16feb5c614aa55a82d55c932a5625eaaf76bed62334588a7e3bbb23bf4b35af822f8 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iEYEAREIAAYFAlDl490ACgkQ4MrvBE1wQ8kuGACfTykEYWevdhM/4gNKkWkzuuHI ++jcAniMQ02yTPB3R8FCejCyUUETlXoap +=7711 +-----END PGP SIGNATURE----- diff --git a/net-nntp/sabnzbd/files/sabnzbd b/net-nntp/sabnzbd/files/sabnzbd new file mode 100644 index 000000000000..33aaf7bcbc2a --- /dev/null +++ b/net-nntp/sabnzbd/files/sabnzbd @@ -0,0 +1,3 @@ +#!/bin/sh + +cd /usr/share/sabnzbd && python SABnzbd.py $* diff --git a/net-nntp/sabnzbd/files/sabnzbd.confd b/net-nntp/sabnzbd/files/sabnzbd.confd new file mode 100644 index 000000000000..1dcaa94b8384 --- /dev/null +++ b/net-nntp/sabnzbd/files/sabnzbd.confd @@ -0,0 +1,8 @@ +SABNZBD_SERVER=0.0.0.0 +SABNZBD_PORT=8080 +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.initd b/net-nntp/sabnzbd/files/sabnzbd.initd new file mode 100644 index 000000000000..b3e0af0ef4fc --- /dev/null +++ b/net-nntp/sabnzbd/files/sabnzbd.initd @@ -0,0 +1,41 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-nntp/sabnzbd/files/sabnzbd.initd,v 1.1 2013/01/03 20:02:32 jsbronder Exp $ + + +depend() { + need net +} + +start() { + ebegin "Starting SABnzbd" + + start-stop-daemon \ + --quiet \ + --start \ + --user ${SABNZBD_USER} \ + --group ${SABNZBD_GROUP} \ + --name sabnzbd \ + --exec /usr/bin/sabnzbd \ + -- \ + --server ${SABNZBD_SERVER}:${SABNZBD_PORT} \ + --config-file ${SABNZBD_CONFIGFILE} \ + --daemon + eend $? +} + +stop() { + local api_key=$(awk '/^api_key =/{print $3}' ${SABNZBD_CONFIGFILE}) + local hostname=${SABNZBD_SERVER} + + ebegin "Stopping SABnzbd" + + if [ -z "${hostname}" -o "${hostname}" == "0.0.0.0" ]; then + hostname="localhost" + fi + /usr/bin/wget -q --delete-after \ + "http://${SABNZBD_SERVER}:${SABNZBD_PORT}/sabnzbd/api?mode=shutdown&apikey=${api_key}" + eend $? +} + 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..7b74c11c3766 --- /dev/null +++ b/net-nntp/sabnzbd/metadata.xml @@ -0,0 +1,12 @@ +<?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> + </use> +</pkgmetadata> diff --git a/net-nntp/sabnzbd/sabnzbd-0.7.7.ebuild b/net-nntp/sabnzbd/sabnzbd-0.7.7.ebuild new file mode 100644 index 000000000000..b1a129309d49 --- /dev/null +++ b/net-nntp/sabnzbd/sabnzbd-0.7.7.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-nntp/sabnzbd/sabnzbd-0.7.7.ebuild,v 1.1 2013/01/03 20:02:32 jsbronder Exp $ + +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" + +# We actually depend on dev-python/cherrypy as well but upstream has decided +# to bundle a custom cut of the 3.2.0 branch. Also, 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: kronos, rarfile, rsslib, ssmtplib, listquote, jso +# Probably others, see licenses/ + +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/rar ) + ssl? ( dev-python/pyopenssl ) + unzip? ( >=app-arch/unzip-5.5.2 ) +" + +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 + + # remove bundled modules + rm sabnzbd/utils/{feedparser,configobj,gntp}.py + rm licenses/License-{feedparser,configobj,gntp}.txt +} + +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} + + 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 an 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} +} |