summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Brewer <tomboy64@sina.cn>2016-01-03 18:45:48 +0100
committerMatthew Brewer <tomboy64@sina.cn>2016-01-05 11:34:52 +0100
commitf9760db4c9568733b6e25ca46b0a475ec08424e5 (patch)
treeb4a8e72a0bc86b32f06aabb8cf096c9daacf7c76 /net-nntp/nzbget/nzbget-16.4.ebuild
parentmedia-libs/sdl2-ttf: remove unused autotools eclass (diff)
downloadgentoo-f9760db4c9568733b6e25ca46b0a475ec08424e5.tar.gz
gentoo-f9760db4c9568733b6e25ca46b0a475ec08424e5.tar.bz2
gentoo-f9760db4c9568733b6e25ca46b0a475ec08424e5.zip
net-nntp/nzbget: version bump to v16.4 and some cosmetic fixes
... to make repoman happy regarding ncurses/openssl slots.
Diffstat (limited to 'net-nntp/nzbget/nzbget-16.4.ebuild')
-rw-r--r--net-nntp/nzbget/nzbget-16.4.ebuild104
1 files changed, 104 insertions, 0 deletions
diff --git a/net-nntp/nzbget/nzbget-16.4.ebuild b/net-nntp/nzbget/nzbget-16.4.ebuild
new file mode 100644
index 000000000000..a663849408ca
--- /dev/null
+++ b/net-nntp/nzbget/nzbget-16.4.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils user
+
+MY_P=${P/_pre/-testing-r}
+
+DESCRIPTION="A command-line based binary newsgrapper supporting .nzb files"
+HOMEPAGE="http://nzbget.net/"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}-src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug gnutls ncurses parcheck ssl zlib"
+
+RDEPEND="dev-libs/libxml2
+ ncurses? ( sys-libs/ncurses:0 )
+ parcheck? (
+ app-arch/libpar2
+ dev-libs/libsigc++:2
+ )
+ ssl? (
+ gnutls? ( net-libs/gnutls )
+ !gnutls? ( dev-libs/openssl:0 )
+ )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( ChangeLog README nzbget.conf )
+
+S=${WORKDIR}/${P/_pre*/-testing}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-14.0_pre1145-tinfo.patch"
+
+ sed -i 's:^ScriptDir=.*:ScriptDir=/usr/share/nzbget/ppscripts:' nzbget.conf || die
+
+ sed \
+ -e 's:^MainDir=.*:MainDir=/var/lib/nzbget:' \
+ -e 's:^LockFile=.*:LockFile=/run/nzbget/nzbget.pid:' \
+ -e 's:^LogFile=.*:LogFile=/var/log/nzbget/nzbget.log:' \
+ -e 's:^WebDir=.*:WebDir=/usr/share/nzbget/webui:' \
+ -e 's:^ConfigTemplate=.*:ConfigTemplate=/usr/share/nzbget/nzbget.conf:' \
+ -e 's:^DaemonUsername=.*:DaemonUsername=nzbget:' \
+ "${S}"/nzbget.conf > "${S}"/nzbgetd.conf || die
+
+ sed -i "/^dist_doc_DATA/d" Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable ncurses curses) \
+ $(use_enable parcheck) \
+ $(use_enable ssl tls) \
+ $(use_enable zlib gzip) \
+ --with-tlslib=$(usex gnutls GnuTLS OpenSSL)
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ doins nzbget.conf
+ doins nzbgetd.conf
+
+ keepdir /var/lib/nzbget/{dst,nzb,queue,tmp}
+ keepdir /var/log/nzbget
+
+ newinitd "${FILESDIR}"/nzbget.initd nzbget
+ newconfd "${FILESDIR}"/nzbget.confd nzbget
+}
+
+pkg_preinst() {
+ enewgroup nzbget
+ enewuser nzbget -1 -1 /var/lib/nzbget nzbget
+
+ fowners nzbget:nzbget /var/lib/nzbget/{dst,nzb,queue,tmp}
+ fperms 750 /var/lib/nzbget/{queue,tmp}
+ fperms 770 /var/lib/nzbget/{dst,nzb}
+
+ fowners nzbget:nzbget /var/log/nzbget
+ fperms 750 /var/log/nzbget
+
+ fowners nzbget:nzbget /etc/nzbgetd.conf
+ fperms 640 /etc/nzbgetd.conf
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ elog
+ elog "Please add users that you want to be able to use the system-wide"
+ elog "nzbget daemon to the nzbget group. To access the daemon run nzbget"
+ elog "with the --configfile /etc/nzbgetd.conf option."
+ elog
+ fi
+}