On Wed, Jan 24, 2018 at 07:48:50AM +0100, Björn Ketelaars wrote:
> On Sat 20/01/2018 21:39, Klemens Nanni wrote:
> > On Sat, Jan 20, 2018 at 08:05:04PM +0100, Björn Ketelaars wrote:
> > > New port for NZBGet
> > >
> > > pkg/DESCR:
> > > NZBGet is a binary newsgrabber, which downloads files from usenet based on
> > > information given in nzb-files. NZBGet is written in C++ and is known for
> > > its
> > > extraordinary performance and efficiency.
> > >
> > >
> > > This port does the same thing as news/sabnzbd but is faster, lighter on
> > > resources, and has less dependencies.
> > >
> > > I used the first free id from infrastructure/db/user.list.
> > >
> > > Comments?
> > Looks good to me portwise except for:
> >
> > DISTNAME is not needed as it's generated by GH_* already. But since
> > upstream provides proper release tarballs, please use DISTNAME and
> > MASTER_SITES without GH_* here.
> >
> > HOMEPAGE has HTTPS.
> >
> > The example nzbget.conf should probably be installed under
> > share/examples/nzget/ instead of share/nzget/ as per our porting guide.
>
> Enclosed a new tarball which addresses, amongst others, the comments above.
> I only tested on amd64 as this platform is available to me. Is there someone
> interested in this port, and could give it a spin on a different platform?
Almost there:
PKGNAME and DISTNAME can be simplified.
Moved COMPILER up in place and added a comment for clarity.
Substituting variables should generally be done before configure to
avoid inconsistencies when configuring A but building B.
When using LOCALSTATEDIR in the example configuration, PLIST should be
tweaked accordingly for consistency reasons.
Their test target really just builds the source, so disable tests:
$ grep -C1 ^check: `mk show=WRKSRC`/Makefile.in
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) config.h
Diff ontop of your latest tarball below.
--- Makefile.orig
+++ Makefile
@@ -3,8 +3,8 @@
COMMENT = binary newsreader supporting NZB files
VERSION = 19.1
-DISTNAME = nzbget-${VERSION}-src
-PKGNAME = ${DISTNAME:S/-src//}
+PKGNAME = nzbget-${VERSION}
+DISTNAME = ${PKGNAME}-src
CATEGORIES = news
@@ -19,6 +19,9 @@ WANTLIB = ${COMPILER_LIBCXX} c crypto curses m ssl xml
MASTER_SITES = https://github.com/nzbget/nzbget/releases/download/v${VERSION}/
+# C++14
+COMPILER = base-clang ports-clang ports-gcc
+
RUN_DEPENDS = archivers/unrar \
archivers/p7zip
LIB_DEPENDS = textproc/libxml
@@ -31,11 +34,11 @@ CONFIGURE_STYLE = gnu
CONFIGURE_ARGS = --with-libcurses-includes=/usr/include \
--with-libcurses-libraries=/usr/lib
+NO_TEST = Yes
+
WRKDIST = ${WRKDIR}/${PKGNAME}
-COMPILER = base-clang ports-clang ports-gcc
-
-pre-build:
+pre-configure:
${SUBST_CMD} ${WRKSRC}/nzbget.conf
.include <bsd.port.mk>
--- pkg/PLIST.orig
+++ pkg/PLIST
@@ -1,6 +1,6 @@
@comment $OpenBSD$
@newgroup _nzbget:800
-@newuser _nzbget:800:800:daemon:NZBGet Account:/var/nzbget:/sbin/nologin
+@newuser _nzbget:800:800:daemon:NZBGet
Account:${LOCALSTATEDIR}/nzbget:/sbin/nologin
@bin bin/nzbget
share/doc/nzbget/
share/doc/nzbget/COPYING
@@ -54,4 +54,4 @@ share/nzbget/webui/util.js
@mode 750
@owner _nzbget
@group _nzbget
-@sample /var/nzbget/
+@sample ${LOCALSTATEDIR}/nzbget/