Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Feb 2013 18:51:34 -0600
From:      Mark Felder <feld@feld.me>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        toxic@doobie.com
Subject:   ports/175851: [PATCH] news/nzbget: update to 9.1
Message-ID:  <E1U2Wl4-000K8E-Hu@feld.me>
Resent-Message-ID: <201302050100.r15100qi095706@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         175851
>Category:       ports
>Synopsis:       [PATCH] news/nzbget: update to 9.1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 05 01:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     feld
>Release:        FreeBSD 9.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD mwi1.coffeenet.org 9.1-RELEASE FreeBSD 9.1-RELEASE #6 r243808: Mon Dec  3 07:51:34
>Description:
- Update to 9.1
- added rc script
- OptionsNG

Requires libpar2 improvements submitted in pr 175846

Added file(s):
- files/nzbget.in
- pkg-plist

Removed file(s):
- files/patch-TLS.cpp

Port maintainer (toxic@doobie.com) is cc'd.

Generated with FreeBSD Port Tools 0.99_6 (mode: update, diff: suffix)
>How-To-Repeat:
>Fix:

--- nzbget-9.1.patch begins here ---
diff -ruN --exclude=CVS ../nzbget.orig/Makefile ./Makefile
--- ../nzbget.orig/Makefile	2013-02-04 14:42:05.000000000 -0600
+++ ./Makefile	2013-02-04 18:49:22.833354865 -0600
@@ -1,12 +1,7 @@
-# New ports collection makefile for:	nzbget
-# Date created:				13 April 2004
-# Whom:					Lewis Thompson <purple@lewiz.net>
-#
 # $FreeBSD: ports/news/nzbget/Makefile,v 1.21 2012/11/17 06:00:43 svnexp Exp $
-#
 
 PORTNAME=	nzbget
-PORTVERSION=	0.8.0
+PORTVERSION=	9.1
 CATEGORIES=	news
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-stable/${PORTVERSION}
 
@@ -19,6 +14,7 @@
 LIB_DEPENDS=	xml2.5:${PORTSDIR}/textproc/libxml2 \
 		sigc-2:${PORTSDIR}/devel/libsigc++20
 
+USE_RC_SUBR=	nzbget
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	LOCALBASE="${LOCALBASE}"
 MAKE_JOBS_UNSAFE=yes
@@ -27,41 +23,35 @@
 CFLAGS+=	${PTHREAD_CFLAGS}
 USE_GMAKE=	yes
 
-OPTIONS=	PARCHECK "Enable autopar/parcheck (Requires libpar2)" On
-OPTIONS+=	TLSCHECK "Use GNUTLS for SSL" On
-OPTIONS+=	OSSLCHECK "Use OpenSSL for SSL" Off
+OPTIONS_DEFINE=	PARCHECK GNUTLS OPENSSL
+OPTIONS_DEFAULT=	PARCHECK GNUTLS
+PARCHECK_DESC=	Enable autopar/parcheck
 
-PLIST_FILES=	bin/nzbget
 PORTDOCS=	README
-PORTEXAMPLES=	nzbget.conf.example
 
 .include <bsd.port.pre.mk>
 
-.if defined (WITHOUT_PARCHECK)
-CONFIGURE_ARGS+=	--disable-parcheck
-.else
+.if ${PORT_OPTIONS:MPARCHECK}
 CONFIGURE_ARGS+=	--enable-parcheck
 LIB_DEPENDS+=	par2:${PORTSDIR}/archivers/libpar2
+.else
+CONFIGURE_ARGS+=	--without-parcheck
 .endif
 
-.if defined (WITH_OSSLCHECK)
+.if ${PORT_OPTIONS:MOPENSSL}
 CONFIGURE_ARGS+=	--with-tlslib=OpenSSL
 .endif
 
-.if defined (WITH_TLSCHECK)
+.if ${PORT_OPTIONS:MGNUTLS}
 CONFIGURE_ARGS+=	--with-tlslib=GnuTLS
 LIB_DEPENDS+=	gnutls:${PORTSDIR}/security/gnutls
 LIB_DEPENDS+=	gcrypt:${PORTSDIR}/security/libgcrypt
 .endif
 
 post-install:
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	${MKDIR} ${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
 .endif
-.if !defined(NOPORTEXAMPLES)
-	${MKDIR} ${EXAMPLESDIR}
-	${INSTALL_DATA} ${WRKSRC}/nzbget.conf.example ${EXAMPLESDIR}
-.endif
 
 .include <bsd.port.post.mk>
diff -ruN --exclude=CVS ../nzbget.orig/distinfo ./distinfo
--- ../nzbget.orig/distinfo	2012-05-16 02:39:27.000000000 -0500
+++ ./distinfo	2013-02-04 14:42:40.034304131 -0600
@@ -1,2 +1,2 @@
-SHA256 (nzbget-0.8.0.tar.gz) = 646939596097fafdeb0b4064b433463419e7d0d9af7fe32f6689d6b95ad77d95
-SIZE (nzbget-0.8.0.tar.gz) = 321351
+SHA256 (nzbget-9.1.tar.gz) = 0cd20e1c78359c720862c19c5fd908dc10d6b54658441b86f9caaa71f66e5633
+SIZE (nzbget-9.1.tar.gz) = 658935
diff -ruN --exclude=CVS ../nzbget.orig/files/nzbget.in ./files/nzbget.in
--- ../nzbget.orig/files/nzbget.in	1969-12-31 18:00:00.000000000 -0600
+++ ./files/nzbget.in	2013-02-04 17:35:22.683310734 -0600
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# PROVIDE: nzbget
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# nzbget_enable (bool):	Set to NO by default.
+#			Set it to YES to enable it.
+
+. /etc/rc.subr
+
+name="nzbget"
+rcvar=nzbget_enable
+
+load_rc_config ${name}
+
+: ${nzbget_enable:="NO"}
+
+start_cmd="${name}_start"
+status_cmd="${name}_status"
+stop_cmd="${name}_stop"
+command=%%PREFIX%%/sbin/nzbgetd
+
+nzbget_start()
+{
+	echo "Starting ${name}."
+	# artificial sleep because it doesnt want to start
+	# after a restart without it
+	sleep .5
+	${command} start
+}
+
+nzbget_stop()
+{
+	echo "Stopping ${name}."
+	${command} stop
+}
+
+nzbget_status()
+{
+	${command} status
+}
+
+run_rc_command "$1"
diff -ruN --exclude=CVS ../nzbget.orig/files/patch-TLS.cpp ./files/patch-TLS.cpp
--- ../nzbget.orig/files/patch-TLS.cpp	2012-09-07 16:11:32.000000000 -0500
+++ ./files/patch-TLS.cpp	1969-12-31 18:00:00.000000000 -0600
@@ -1,32 +0,0 @@
---- TLS.cpp.orig	2011-06-14 23:47:22.000000000 +0200
-+++ TLS.cpp	2012-08-31 09:27:41.000000000 +0200
-@@ -908,7 +908,7 @@
-     char *buf;
-     int bufsize;
-     /* needed to get the DNS subjectAltNames: */
--    STACK *subj_alt_names;
-+    STACK_OF(GENERAL_NAME) *subj_alt_names;
-     int subj_alt_names_count;
-     GENERAL_NAME *subj_alt_name;
-     /* did we find a name matching hostname? */
-@@ -960,7 +960,7 @@
-     /* Try the DNS subjectAltNames. */
-     match_found = 0;
-     if ((subj_alt_names =
--		(STACK*)X509_get_ext_d2i(x509cert, NID_subject_alt_name, NULL, NULL)))
-+		(STACK_OF(GENERAL_NAME) *)X509_get_ext_d2i(x509cert, NID_subject_alt_name, NULL, NULL)))
-     {
- 	subj_alt_names_count = sk_GENERAL_NAME_num(subj_alt_names);
- 	for (i = 0; i < subj_alt_names_count; i++) 
-@@ -1105,7 +1105,11 @@
- 
- #ifdef HAVE_OPENSSL
-     
-+    #if OPENSSL_VERSION_NUMBER >= 0x10000000L
-+    const SSL_METHOD *ssl_method = NULL;
-+    #else
-     SSL_METHOD *ssl_method = NULL;
-+    #endif
-     
-     ssl_method = force_sslv3 ? SSLv3_client_method() : SSLv23_client_method();
-     if (!ssl_method)
diff -ruN --exclude=CVS ../nzbget.orig/pkg-plist ./pkg-plist
--- ../nzbget.orig/pkg-plist	1969-12-31 18:00:00.000000000 -0600
+++ ./pkg-plist	2013-02-04 15:57:32.063328224 -0600
@@ -0,0 +1,39 @@
+bin/nzbget
+bin/nzbget-postprocess.sh
+sbin/nzbgetd
+%%DATADIR%%/nzbget.conf
+%%DATADIR%%/nzbget-postprocess.conf
+%%DATADIR%%/webui/config.js
+%%DATADIR%%/webui/downloads.js
+%%DATADIR%%/webui/edit.js
+%%DATADIR%%/webui/fasttable.js
+%%DATADIR%%/webui/history.js
+%%DATADIR%%/webui/img/download-anim-green-2x.png
+%%DATADIR%%/webui/img/download-anim-orange-2x.png
+%%DATADIR%%/webui/img/favicon.ico
+%%DATADIR%%/webui/img/icons-2x.png
+%%DATADIR%%/webui/img/icons.png
+%%DATADIR%%/webui/img/transmit-file.gif
+%%DATADIR%%/webui/img/transmit-reload-2x.gif
+%%DATADIR%%/webui/img/transmit.gif
+%%DATADIR%%/webui/index.html
+%%DATADIR%%/webui/index.js
+%%DATADIR%%/webui/lib/bootstrap.css
+%%DATADIR%%/webui/lib/bootstrap.js
+%%DATADIR%%/webui/lib/bootstrap.min.js
+%%DATADIR%%/webui/lib/jquery.js
+%%DATADIR%%/webui/lib/jquery.min.js
+%%DATADIR%%/webui/messages.js
+%%DATADIR%%/webui/nzbget-postprocess.conf
+%%DATADIR%%/webui/nzbget.conf
+%%DATADIR%%/webui/status.js
+%%DATADIR%%/webui/style.css
+%%DATADIR%%/webui/upload.js
+%%DATADIR%%/webui/util.js
+%%PORTDOCS%%%%DOCSDIR%%/COPYING
+%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@dirrm %%DATADIR%%
+@dirrm %%DATADIR%%/webui
+@dirrm %%DATADIR%%/webui/img
+@dirrm %%DATADIR%%/webui/lib
--- nzbget-9.1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1U2Wl4-000K8E-Hu>