From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2F7111395E3 for ; Sat, 19 Nov 2016 16:34:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8A424E0B08; Sat, 19 Nov 2016 16:34:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 62ED4E0B08 for ; Sat, 19 Nov 2016 16:34:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4DD993415A2 for ; Sat, 19 Nov 2016 16:34:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F282D332 for ; Sat, 19 Nov 2016 16:34:09 +0000 (UTC) From: "Justin Bronder" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Justin Bronder" Message-ID: <1479573192.84cae56635210521fc40abd949b19f119e82af6d.jsbronder@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-nntp/sabnzbd/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-nntp/sabnzbd/Manifest net-nntp/sabnzbd/sabnzbd-1.1.1.ebuild X-VCS-Directories: net-nntp/sabnzbd/ X-VCS-Committer: jsbronder X-VCS-Committer-Name: Justin Bronder X-VCS-Revision: 84cae56635210521fc40abd949b19f119e82af6d X-VCS-Branch: master Date: Sat, 19 Nov 2016 16:34:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 499d73bf-4f4d-4285-a679-499f5a0d5bf5 X-Archives-Hash: 43e8b12fa93904f85c3c201ce2c7f0a5 commit: 84cae56635210521fc40abd949b19f119e82af6d Author: Michał Kępień kempniu pl> AuthorDate: Fri Nov 18 13:23:56 2016 +0000 Commit: Justin Bronder gentoo org> CommitDate: Sat Nov 19 16:33:12 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84cae566 Bump version net-nntp/sabnzbd/Manifest | 1 + net-nntp/sabnzbd/sabnzbd-1.1.1.ebuild | 134 ++++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+) diff --git a/net-nntp/sabnzbd/Manifest b/net-nntp/sabnzbd/Manifest index ebed94c..4f70bf4 100644 --- a/net-nntp/sabnzbd/Manifest +++ b/net-nntp/sabnzbd/Manifest @@ -1 +1,2 @@ DIST SABnzbd-1.1.0-src.tar.gz 2736977 SHA256 3e86a897dea1c276c54ee38667a980f644f16d57df75612fe9eefa84b339ce9a SHA512 4fd4304253ec66c7bc6038fe8eb7bc08f0133cc4eda9efb28349242574744f262369fe43786da5a22eb90664cfa7fb91356941174787c4faef7d7624751a86d2 WHIRLPOOL f5ef42a01cd1c79f28bbd42c6970b9a1b66846af266c027354494cd103d03d14d2914a3d2b88b1aef740a6e849b9e3216c639323f41146553c5f2dcdeef182aa +DIST SABnzbd-1.1.1-src.tar.gz 2736427 SHA256 001f19c5a98de641da9fc69cff8ee885f3422d511a73e923dcb713aaca763d44 SHA512 77deebbbdb2286791d0d0615a1f438874bb85735279a7d8e1d553909ca1dba5ea84c66ed276023e7ccf9676fc13c25760f2bc191483195e7c47e2c03bd5c636a WHIRLPOOL 0693ecd8778ca9f47f89528b17ddeef0d9fa1c635acdcff881a4aac239834a4d14c0287e992f212b6be8e993f28a7c774d4a47b5beb716b7ebbc64dcd635f2a8 diff --git a/net-nntp/sabnzbd/sabnzbd-1.1.1.ebuild b/net-nntp/sabnzbd/sabnzbd-1.1.1.ebuild new file mode 100644 index 00000000..e5f0860 --- /dev/null +++ b/net-nntp/sabnzbd/sabnzbd-1.1.1.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +# Require python-2 with sqlite USE flag +PYTHON_DEPEND="2:2.7" +PYTHON_USE_WITH="sqlite" + +inherit eutils python user systemd versionator + +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, 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 + dev-python/rarfile + 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}"/1.1.x/0001-use-system-configobj-and-feedparser.patch + epatch "${FILESDIR}"/1.1.x/0002-assume-gntp-1.0.patch + epatch "${FILESDIR}"/1.1.x/0003-cfg-disable-growl-by-default.patch + epatch "${FILESDIR}"/1.1.x/0004-use-system-rarfile.patch + + # remove bundled modules + rm -r sabnzbd/utils/{feedparser,configobj,rarfile}.py || die + rm -r gntp || die + rm licenses/License-{feedparser,configobj,gntp,rarfile}.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,ISSUES,README}.txt licenses/* + + systemd_newunit "${FILESDIR}"/sabnzbd_at.service 'sabnzbd@.service' +} + +pkg_postinst() { + python_mod_optimize /usr/share/${PN} + + einfo "Default directory: ${HOMEDIR}" + einfo "" + einfo "Run: gpasswd -a 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" + einfo "As growl isn't default notification system on gentoo we disable it." + einfo "By default notifications are forwarded to the 23053 port(gntp)." + + local replacing + for replacing in ${REPLACING_VERSIONS}; do + if [ "$(get_major_version ${replacing})" == "0" ]; then + echo + ewarn "Upgrading from ${PN}-0.x.y to ${PN}-1.x.y introduces incompatible changes" + ewarn "See http://wiki.sabnzbd.org/introducing-1-0-0." + ewarn "In particular, you need to let your queue complete before restarting ${PN}" + break + fi + done +} + +pkg_postrm() { + python_mod_cleanup /usr/share/${PN} +}