Date: Tue, 8 Mar 2016 16:40:00 +0000 (UTC) From: Mark Felder <feld@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r410634 - in head/news/sabnzbdplus: . files Message-ID: <201603081640.u28Ge0xn036374@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: feld Date: Tue Mar 8 16:40:00 2016 New Revision: 410634 URL: https://svnweb.freebsd.org/changeset/ports/410634 Log: 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 Modified: head/news/sabnzbdplus/Makefile head/news/sabnzbdplus/files/patch-SABnzbd.py head/news/sabnzbdplus/files/sabnzbd.in head/news/sabnzbdplus/pkg-plist Modified: head/news/sabnzbdplus/Makefile ============================================================================== --- head/news/sabnzbdplus/Makefile Tue Mar 8 16:28:54 2016 (r410633) +++ head/news/sabnzbdplus/Makefile Tue Mar 8 16:40:00 2016 (r410634) @@ -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/p ${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 Modified: head/news/sabnzbdplus/files/patch-SABnzbd.py ============================================================================== --- head/news/sabnzbdplus/files/patch-SABnzbd.py Tue Mar 8 16:28:54 2016 (r410633) +++ head/news/sabnzbdplus/files/patch-SABnzbd.py Tue Mar 8 16:40:00 2016 (r410634) @@ -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() Modified: head/news/sabnzbdplus/files/sabnzbd.in ============================================================================== --- head/news/sabnzbdplus/files/sabnzbd.in Tue Mar 8 16:28:54 2016 (r410633) +++ head/news/sabnzbdplus/files/sabnzbd.in Tue Mar 8 16:40:00 2016 (r410634) @@ -46,7 +46,6 @@ command_args="--daemon -f ${sabnzbd_conf 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} Modified: head/news/sabnzbdplus/pkg-plist ============================================================================== --- head/news/sabnzbdplus/pkg-plist Tue Mar 8 16:28:54 2016 (r410633) +++ head/news/sabnzbdplus/pkg-plist Tue Mar 8 16:40:00 2016 (r410634) @@ -422,4 +422,3 @@ bin/SABnzbd.py %%DATADIR%%/util/apireg.py %%DATADIR%%/util/mailslot.py %%DATADIR%%/util/pystone.py -@dir(_sabnzbd,_sabnzbd,755) sabnzbd
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603081640.u28Ge0xn036374>