aboutsummaryrefslogtreecommitdiff
path: root/news
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2016-03-08 16:40:00 +0000
committerMark Felder <feld@FreeBSD.org>2016-03-08 16:40:00 +0000
commit1b6ced66c4ad6548c6c780ff01d68012e9461819 (patch)
tree3f9d9a923e33c22ec8c25b61d56ef9efef14cb22 /news
parent24c70acb7e46c7c1f0911225d19600c0b321f2e5 (diff)
downloadports-1b6ced66c4ad6548c6c780ff01d68012e9461819.tar.gz
ports-1b6ced66c4ad6548c6c780ff01d68012e9461819.zip
news/sabnzbdplus: Port cleanup
- Better define which versions of python sabnzbd can actually run with - Remove "+" sign from SUB_LIST - Modernize OPTION RUN_DEPENDS - Do not set PATH in rc script - Make patch and reinplace more logical by not replacing %%PREFIX%% with %%DATADIR%% - Remove creation of PREFIX/sabnzbd (sabznzbd's config directory) from install as it is already handled in start_precmd routine - Replace INSTALL_DATA with INSTALL_MAN for installing PORTDOCS - Hand off maintainership PR: 207583
Notes
Notes: svn path=/head/; revision=410634
Diffstat (limited to 'news')
-rw-r--r--news/sabnzbdplus/Makefile36
-rw-r--r--news/sabnzbdplus/files/patch-SABnzbd.py4
-rw-r--r--news/sabnzbdplus/files/sabnzbd.in1
-rw-r--r--news/sabnzbdplus/pkg-plist1
4 files changed, 13 insertions, 29 deletions
diff --git a/news/sabnzbdplus/Makefile b/news/sabnzbdplus/Makefile
index 5f39641a0791..7fddbdd7f286 100644
--- a/news/sabnzbdplus/Makefile
+++ b/news/sabnzbdplus/Makefile
@@ -2,11 +2,12 @@
PORTNAME= sabnzbdplus
PORTVERSION= 0.7.20
+PORTREVISION= 1
CATEGORIES= news
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}
DISTNAME= SABnzbd-${PORTVERSION}-src
-MAINTAINER= feld@FreeBSD.org
+MAINTAINER= joshruehlig@gmail.com
COMMENT= Web-interface based binary newsgrabber in python, with nzb support
LICENSE= BSD2CLAUSE BSD3CLAUSE GPLv2 GPLv3 ISCL MIT PSFL
@@ -16,12 +17,12 @@ RUN_DEPENDS= cheetah:${PORTSDIR}/devel/py-cheetah \
${PYTHON_SITELIBDIR}/pythonutils/configobj.py:${PORTSDIR}/devel/py-utils \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3
-USES= gettext python
+USES= gettext python:2.5-2.7
NO_BUILD= yes
WRKSRC= ${WRKDIR}/SABnzbd-${PORTVERSION}
PLIST_SUB= PORTNAME=${PORTNAME}
-SUB_LIST+= PORTNAME=${PORTNAME} PYTHON_CMD=${PYTHON_CMD}
+SUB_LIST= PORTNAME=${PORTNAME} PYTHON_CMD=${PYTHON_CMD}
SUB_FILES= pkg-message
USE_RC_SUBR= sabnzbd
@@ -44,30 +45,16 @@ YENC_DESC= yenc support
.include <bsd.port.pre.mk>
-.if ${PORT_OPTIONS:MPAR2CMDLINE}
-RUN_DEPENDS+= par2repair:${PORTSDIR}/archivers/par2cmdline-tbb
-.endif
-
-.if ${PORT_OPTIONS:MFEEDPARSER}
-RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}feedparser>=0:${PORTSDIR}/textproc/py-feedparser
-.endif
-
-.if ${PORT_OPTIONS:MYENC}
-RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}yenc>=0:${PORTSDIR}/news/py-yenc
-.endif
-
-.if ${PORT_OPTIONS:MOPENSSL}
-RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}openssl>=0:${PORTSDIR}/security/py-openssl
-.endif
-
-.if ${PORT_OPTIONS:MUNRAR}
-RUN_DEPENDS+= unrar:${PORTSDIR}/archivers/unrar
-.endif
+PAR2CMDLINE_RUN_DEPENDS= par2repair:${PORTSDIR}/archivers/par2cmdline-tbb
+FEEDPARSER_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}feedparser>=0:${PORTSDIR}/textproc/py-feedparser
+YENC_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}yenc>=0:${PORTSDIR}/news/py-yenc
+OPENSSL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}openssl>=0:${PORTSDIR}/security/py-openssl
+UNRAR_RUN_DEPENDS= unrar:${PORTSDIR}/archivers/unrar
post-patch:
@${REINPLACE_CMD} -e "s:/usr/bin/python:${PYTHON_CMD}:g" \
${WRKSRC}/SABnzbd.py
- @${REINPLACE_CMD} -e "s:%%PREFIX%%:'${DATADIR}':g" \
+ @${REINPLACE_CMD} -e "s:%%DATADIR%%:'${DATADIR}':g" \
${WRKSRC}/SABnzbd.py
# the NO_BUILD option stops execution after configure. This should really be
@@ -77,7 +64,6 @@ do-install:
${INSTALL} -d ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/sabnzbd
cd ${WRKSRC}/sabnzbd && ${COPYTREE_SHARE} \* ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/sabnzbd
${INSTALL} -d ${STAGEDIR}${DATADIR}
- ${INSTALL} -d ${STAGEDIR}${PREFIX}/sabnzbd
.for i in cherrypy gntp interfaces locale po tools util
${MKDIR} ${STAGEDIR}${DATADIR}/${i}
cd ${WRKSRC}/${i} && ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}/${i}
@@ -86,7 +72,7 @@ do-install:
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR}
.for i in ${PORTDOCS}
- ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_MAN} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
.endfor
.endif
diff --git a/news/sabnzbdplus/files/patch-SABnzbd.py b/news/sabnzbdplus/files/patch-SABnzbd.py
index d755d4754e84..5eb452b146a8 100644
--- a/news/sabnzbdplus/files/patch-SABnzbd.py
+++ b/news/sabnzbdplus/files/patch-SABnzbd.py
@@ -6,7 +6,7 @@
+# Force python to load the patched version of cherrypy included with the port,
+# instead of any version that may be installed otherwise.
-+sys.path.insert(0,%%PREFIX%%)
++sys.path.insert(0,%%DATADIR%%)
import cherrypy
if not cherrypy.__version__.startswith("3.2"):
print "Sorry, requires Python module Cherrypy 3.2 (use the included version)"
@@ -15,7 +15,7 @@
sabnzbd.MY_FULLNAME = os.path.normpath(os.path.abspath(sabnzbd.MY_FULLNAME))
sabnzbd.MY_NAME = os.path.basename(sabnzbd.MY_FULLNAME)
- sabnzbd.DIR_PROG = os.path.dirname(sabnzbd.MY_FULLNAME)
-+ sabnzbd.DIR_PROG = %%PREFIX%%
++ sabnzbd.DIR_PROG = %%DATADIR%%
sabnzbd.DIR_INTERFACES = real_path(sabnzbd.DIR_PROG, DEF_INTERFACES)
sabnzbd.DIR_LANGUAGE = real_path(sabnzbd.DIR_PROG, DEF_LANGUAGE)
org_dir = os.getcwd()
diff --git a/news/sabnzbdplus/files/sabnzbd.in b/news/sabnzbdplus/files/sabnzbd.in
index c00f110a683d..37625ffa54f8 100644
--- a/news/sabnzbdplus/files/sabnzbd.in
+++ b/news/sabnzbdplus/files/sabnzbd.in
@@ -46,7 +46,6 @@ command_args="--daemon -f ${sabnzbd_conf_dir}/sabnzbd.ini --pidfile ${pidfile}"
sabnzbd_prestart()
{
- PATH=${PATH}:/usr/local/bin:/usr/local/sbin
for sabdir in ${sabnzbd_conf_dir} ${pidfile%/*}; do
if [ ! -d "${sabdir}" ]; then
install -d -o ${sabnzbd_user} -g ${sabnzbd_group} ${sabdir}
diff --git a/news/sabnzbdplus/pkg-plist b/news/sabnzbdplus/pkg-plist
index 73e8078281a8..7adc3dc4e35a 100644
--- a/news/sabnzbdplus/pkg-plist
+++ b/news/sabnzbdplus/pkg-plist
@@ -422,4 +422,3 @@ bin/SABnzbd.py
%%DATADIR%%/util/apireg.py
%%DATADIR%%/util/mailslot.py
%%DATADIR%%/util/pystone.py
-@dir(_sabnzbd,_sabnzbd,755) sabnzbd