diff options
author | Justin Bronder <jsbronder@gentoo.org> | 2015-11-12 00:50:38 -0500 |
---|---|---|
committer | Justin Bronder <jsbronder@gentoo.org> | 2015-11-12 00:50:38 -0500 |
commit | 35b62e4cf4ea1f95344279c71edc0c2c1bc0fd8d (patch) | |
tree | 435f0418263e67d2f39f214f502474aaddb47d44 /net-nntp | |
parent | x11-drivers/xf86-video-ati: Require xorg-server[glamor] for USE=glamor. (diff) | |
download | gentoo-35b62e4cf4ea1f95344279c71edc0c2c1bc0fd8d.tar.gz gentoo-35b62e4cf4ea1f95344279c71edc0c2c1bc0fd8d.tar.bz2 gentoo-35b62e4cf4ea1f95344279c71edc0c2c1bc0fd8d.zip |
net-nntp/sabnzbd: systemd support
https://bugs.gentoo.org/show_bug.cgi?id=564672
Thanks to Denis Romanchuk for the patches.
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'net-nntp')
-rw-r--r-- | net-nntp/sabnzbd/files/disable_growl_by_default.patch | 15 | ||||
-rw-r--r-- | net-nntp/sabnzbd/files/sabnzbd_at.service | 10 | ||||
-rw-r--r-- | net-nntp/sabnzbd/sabnzbd-0.7.20.ebuild | 9 |
3 files changed, 32 insertions, 2 deletions
diff --git a/net-nntp/sabnzbd/files/disable_growl_by_default.patch b/net-nntp/sabnzbd/files/disable_growl_by_default.patch new file mode 100644 index 000000000000..6761c726a3a4 --- /dev/null +++ b/net-nntp/sabnzbd/files/disable_growl_by_default.patch @@ -0,0 +1,15 @@ +diff --git a/sabnzbd/cfg.py b/sabnzbd/cfg.py +index 39e418b..509a962 100644 +--- a/sabnzbd/cfg.py ++++ b/sabnzbd/cfg.py +@@ -238,8 +238,8 @@ no_ipv6 = OptionBool('misc', 'no_ipv6', False) + + growl_server = OptionStr('growl', 'growl_server') + growl_password = OptionPassword('growl', 'growl_password') +-growl_enable = OptionBool('growl', 'growl_enable', not sabnzbd.DARWIN_ML) +-ntfosd_enable = OptionBool('growl', 'ntfosd_enable', not sabnzbd.WIN32 and not sabnzbd.DARWIN) ++growl_enable = OptionBool('growl', 'growl_enable', 0) ++ntfosd_enable = OptionBool('growl', 'ntfosd_enable', 0) + ncenter_enable = OptionBool('growl', 'ncenter_enable', sabnzbd.DARWIN) + notify_classes = OptionList('growl', 'notify_classes', NOTIFY_KEYS) + diff --git a/net-nntp/sabnzbd/files/sabnzbd_at.service b/net-nntp/sabnzbd/files/sabnzbd_at.service new file mode 100644 index 000000000000..e3e7a82bdb3e --- /dev/null +++ b/net-nntp/sabnzbd/files/sabnzbd_at.service @@ -0,0 +1,10 @@ +[Unit] +Description=SABnzbd binary newsreader + +[Service] +ExecStart=/usr/bin/sabnzbd --logging 1 --browser 0 +User=%I +Group=%I + +[Install] +WantedBy=multi-user.target diff --git a/net-nntp/sabnzbd/sabnzbd-0.7.20.ebuild b/net-nntp/sabnzbd/sabnzbd-0.7.20.ebuild index 4d8ee3bce7a4..67b063b4b240 100644 --- a/net-nntp/sabnzbd/sabnzbd-0.7.20.ebuild +++ b/net-nntp/sabnzbd/sabnzbd-0.7.20.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -8,7 +8,7 @@ EAPI="4" PYTHON_DEPEND="2:2.6" PYTHON_USE_WITH="sqlite" -inherit eutils python user +inherit eutils python user systemd MY_P="${P/sab/SAB}" @@ -66,6 +66,7 @@ src_prepare() { epatch "${FILESDIR}"/use-system-configobj-and-feedparser.patch epatch "${FILESDIR}"/growler-support-gntp-1.0.patch epatch "${FILESDIR}"/par2cmdline.patch + epatch "${FILESDIR}"/disable_growl_by_default.patch # remove bundled modules rm -r sabnzbd/utils/{feedparser,configobj}.py || die @@ -99,6 +100,8 @@ src_install() { doins "${FILESDIR}/${PN}.ini" dodoc {ABOUT,CHANGELOG,ISSUES,README}.txt Sample-PostProc.sh licenses/* + + systemd_newunit "${FILESDIR}"/sabnzbd_at.service 'sabnzbd@.service' } pkg_postinst() { @@ -110,6 +113,8 @@ pkg_postinst() { 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)." } pkg_postrm() { |