Skip to content

Commit

Permalink
Merge remote-tracking branch 'github/pr/603'.
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurp committed Jan 7, 2016
2 parents 8c8c0fe + f9760db commit 427e6dc
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 0 deletions.
1 change: 1 addition & 0 deletions net-nntp/nzbget/Manifest
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DIST nzbget-14.1.tar.gz 1332334 SHA256 a16b816b61f7035cc373e9b77094ca474d5b7b7f7ceff5fa8818249181db4b18 SHA512 fae938529bb3968c0161f63ec3af07f844a8128b61abf6298457a4878ac0d47541d76730c8a068509fa091b102de07c9d28dcd668a8192fcfac60980f69be56d WHIRLPOOL 9e9636b67d0af7780d2cc8f897465f5a2e23cd8695b3bd982e3e9f78d68adb34f84faf59253044c7b2f95db737cf59207b35cf312d1f1825fe4b9ecce2e4014f
DIST nzbget-14.2.tar.gz 1332612 SHA256 bb24afb47dc01766c5e5c02d7565190082c6e13ffed565969a2ec52e21104677 SHA512 0e1e9c1307927f6ac4772d9138901893a9782fad137756ca40617ea7e8dd7946f2927f3f5303d676d09920de0a005cb1313292fda0c5d0288d73fc8e0f949516 WHIRLPOOL 7fb9c5c44515e1ed4a02213af6f8a13e41452a85a710ba9e59483c8c95b9d9bc1f2c475f81d0a75ab982292fccd5ce797f2396fe09ec7339d31ea551f3c36a4e
DIST nzbget-15.0.tar.gz 1466814 SHA256 3ef13f3e5917e4cda19c4fc0cd37e79967a19b4e3448c239ff24e37712a6cc0a SHA512 7233bea56f99e541155eac3e1d31f2603a407aee7055492c2bf20efc9b40a58e9e5f3b7ee7dada9278cb4bdc8b30a0e62f377235e12ac43c88f9111864d3a706 WHIRLPOOL f8d53ef7637a09f1e98fe5866693bc99c96212f460b00072d5ac8164c59c9053ab8805262d97e136eccc14f6af9be220541b2ea22d01bd2ed191114cbfdcfac0
DIST nzbget-16.4-src.tar.gz 1585908 SHA256 8e9e3ee75d2d08a8e438b2809f504a627a9334ed239579a540b75fa97bff4d0f SHA512 12ebde277abac5f719f374861013fa391f4698d850ac57c55787609fec54490fb09437c6a803fc0ca935c482ed5ccd16c525e17ba40a514f7a54316dc04ee874 WHIRLPOOL 2d1c21d45a74eaea7dcb1c99c9b409f506547189c832b432331ae2b64ee67050245acb8ff1cd522bd64460d9d7ac806b344fd0f3bbc21de4bfca12dcc815692d
104 changes: 104 additions & 0 deletions net-nntp/nzbget/nzbget-16.4.ebuild
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 427e6dc

Please sign in to comment.