diff options
author | Julien Laffaye <jlaffaye@FreeBSD.org> | 2011-09-22 17:00:30 +0000 |
---|---|---|
committer | Julien Laffaye <jlaffaye@FreeBSD.org> | 2011-09-22 17:00:30 +0000 |
commit | f84f7dda716f900bc81361bb575b839ecc5cbeba (patch) | |
tree | 8dc5ff319da12a68a349fbc55f4512c02c87bf5c | |
parent | f0aeaaaf4fd1be64660e7fa44aef2a41a06f9df6 (diff) | |
download | ports-f84f7dda716f900bc81361bb575b839ecc5cbeba.tar.gz ports-f84f7dda716f900bc81361bb575b839ecc5cbeba.zip |
Notes
-rw-r--r-- | news/sabnzbdplus/Makefile | 10 | ||||
-rw-r--r-- | news/sabnzbdplus/distinfo | 4 | ||||
-rw-r--r-- | news/sabnzbdplus/files/patch-SABnzbd.py | 16 | ||||
-rw-r--r-- | news/sabnzbdplus/files/sabnzbd.in | 54 | ||||
-rw-r--r-- | news/sabnzbdplus/pkg-plist | 51 |
5 files changed, 107 insertions, 28 deletions
diff --git a/news/sabnzbdplus/Makefile b/news/sabnzbdplus/Makefile index 88398ccc851a..b8d658afe49d 100644 --- a/news/sabnzbdplus/Makefile +++ b/news/sabnzbdplus/Makefile @@ -6,7 +6,7 @@ # PORTNAME= sabnzbdplus -PORTVERSION= 0.6.8 +PORTVERSION= 0.6.9 CATEGORIES= news MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/sabnzbd-${PORTVERSION} DISTNAME= SABnzbd-${PORTVERSION}-src @@ -16,10 +16,9 @@ COMMENT= A web-interface based binary newsgrabber in python, with nzb support LICENSE= GPLv2 -RUN_DEPENDS= cheetah:${PORTSDIR}/devel/py-cheetah \ - ${PYTHON_PKGNAMEPREFIX}cherrypy>=3.2.0:${PORTSDIR}/www/py-cherrypy \ - ${PYTHON_SITELIBDIR}/pythonutils/configobj.py:${PORTSDIR}/devel/py-utils \ - ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3 +RUN_DEPENDS= cheetah:${PORTSDIR}/devel/py-cheetah \ + ${PYTHON_SITELIBDIR}/pythonutils/configobj.py:${PORTSDIR}/devel/py-utils \ + ${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3 USE_PYTHON= 2.5+ @@ -75,6 +74,7 @@ do-install: ${INSTALL} -d ${PYTHONPREFIX_SITELIBDIR}/ ${CP} -rp ${WRKSRC}/sabnzbd ${PYTHONPREFIX_SITELIBDIR}/ ${INSTALL} -d ${DATADIR} + ${CP} -rp ${WRKSRC}/cherrypy ${DATADIR} ${CP} -rp ${WRKSRC}/interfaces ${DATADIR} ${CP} -rp ${WRKSRC}/locale ${DATADIR} ${CP} -rp ${WRKSRC}/po ${DATADIR} diff --git a/news/sabnzbdplus/distinfo b/news/sabnzbdplus/distinfo index a95b20585de8..df677338b508 100644 --- a/news/sabnzbdplus/distinfo +++ b/news/sabnzbdplus/distinfo @@ -1,2 +1,2 @@ -SHA256 (SABnzbd-0.6.8-src.tar.gz) = 43b57e5e435e6af884f930fee6dc8993e443c407ab83eb0e289c20c88323dc27 -SIZE (SABnzbd-0.6.8-src.tar.gz) = 1900995 +SHA256 (SABnzbd-0.6.9-src.tar.gz) = 2c304daf22ffc68c8b77819a9e12322473cf245e6f66de314ee85ed830e24fe9 +SIZE (SABnzbd-0.6.9-src.tar.gz) = 1936582 diff --git a/news/sabnzbdplus/files/patch-SABnzbd.py b/news/sabnzbdplus/files/patch-SABnzbd.py index 494b23e21eb4..db2bc6a88893 100644 --- a/news/sabnzbdplus/files/patch-SABnzbd.py +++ b/news/sabnzbdplus/files/patch-SABnzbd.py @@ -1,6 +1,16 @@ ---- SABnzbd.py 2011-07-26 14:57:12.000000000 -0400 -+++ SABnzbd.py.new 2011-08-01 22:47:35.614282615 -0400 -@@ -928,7 +928,7 @@ +--- SABnzbd.py.orig 2011-09-10 05:04:42.000000000 -0400 ++++ SABnzbd.py 2011-09-14 23:17:08.387342710 -0400 +@@ -40,6 +40,9 @@ + print "The Python module Cheetah is required" + sys.exit(1) + ++# 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%%) + import cherrypy + if not cherrypy.__version__.startswith("3.2"): + print "Sorry, requires Python module Cherrypy 3.2 (use the included version)" +@@ -932,7 +935,7 @@ sabnzbd.MY_FULLNAME = os.path.normpath(os.path.abspath(sabnzbd.MY_FULLNAME)) sabnzbd.MY_NAME = os.path.basename(sabnzbd.MY_FULLNAME) diff --git a/news/sabnzbdplus/files/sabnzbd.in b/news/sabnzbdplus/files/sabnzbd.in index bf0e9c139c75..98e37318111e 100644 --- a/news/sabnzbdplus/files/sabnzbd.in +++ b/news/sabnzbdplus/files/sabnzbd.in @@ -6,19 +6,19 @@ # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # -# sabnzbd_enable (bool): Set to NO by default. -# Set it to YES to enable it. -# sabnzbd_conf_dir: Directory where sabnzbd configuration -# data is stored. -# Default: %%PREFIX%%/sabnzbd -# sabnzbd_user: The user account sabnzbd daemon runs as what -# you want it to be. It uses '_sabnzbd' user by -# default. Do not sets it as empty or it will run -# as root. -# sabnzbd_group: The group account sabnzbd daemon runs as what -# you want it to be. It uses '_sabnzbd' group by -# default. Do not sets it as empty or it will run -# as wheel. +# sabnzbd_enable (bool): Set to NO by default. +# Set it to YES to enable it. +# sabnzbd_conf_dir: Directory where sabnzbd configuration +# data is stored. +# Default: %%PREFIX%%/sabnzbd +# sabnzbd_user: The user account sabnzbd daemon runs as what +# you want it to be. It uses '_sabnzbd' user by +# default. Do not sets it as empty or it will run +# as root. +# sabnzbd_group: The group account sabnzbd daemon runs as what +# you want it to be. It uses '_sabnzbd' group by +# default. Do not sets it as empty or it will run +# as wheel. . /etc/rc.subr @@ -34,12 +34,36 @@ load_rc_config ${name} required_dirs=${sabnzbd_conf_dir} +start_cmd="${name}_start" +#start_postcmd="${name}_poststart" status_cmd="${name}_status" stop_cmd="${name}_stop" start_precmd=sabnzbd_check_dir -command="/usr/sbin/daemon" -command_args="-f %%PREFIX%%/bin/SABnzbd.py ${sabnzbd_flags} --daemon -b 0 -w 0 -l 0 -f ${sabnzbd_conf_dir}" + + +sabnzbd_start() +{ +if [ ! -f "${sabnzbd_pid}" ]; then + su -m ${sabnzbd_user} -c "%%PREFIX%%/bin/SABnzbd.py --daemon -f ${sabnzbd_conf_dir}/sabnzbd.ini" + echo "Starting ${name}." +else + GETPROCESSPID=`/bin/ps -auxw | /usr/bin/awk '/SABnzbd.py/ && !/awk/ && !/sh/ {print $2}'` + PIDFROMFILE=`cat ${sabnzbd_pid}` + if [ "$GETPROCESSPID" = "$PIDFROMFILE" ]; then + echo "${name} already running with PID: ${PIDFROMFILE} ?" + echo "Remove ${sabnzbd_pid} manually if needed." + else + rm -f ${sabnzbd_pid} + su -m ${sabnzbd_user} -c "%%PREFIX%%/bin/SABnzbd.py --daemon -f ${sabnzbd_conf_dir}/sabnzbd.ini" + echo "Starting ${name}." + fi +fi +} + +#sabnzbd_poststart() { +# echo `/bin/ps -auxw | /usr/bin/awk '/SABnzbd.py/ && !/awk/ {print $2}'` > $sabnzbd_pid +#} # SABnzbd can only be cleanly stopped by calling the http api sabnzbd_stop() { diff --git a/news/sabnzbdplus/pkg-plist b/news/sabnzbdplus/pkg-plist index 6ca5a1f2402a..e5a26928d5c3 100644 --- a/news/sabnzbdplus/pkg-plist +++ b/news/sabnzbdplus/pkg-plist @@ -48,6 +48,7 @@ bin/SABnzbd.py %%PYTHON_SITELIBDIR%%/sabnzbd/utils/upload.py %%PYTHON_SITELIBDIR%%/sabnzbd/version.py %%PYTHON_SITELIBDIR%%/sabnzbd/wizard.py +%%PORTDOCS%%%%DOCSDIR%%/ABOUT.txt %%PORTDOCS%%%%DOCSDIR%%/CHANGELOG.txt %%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT.txt %%PORTDOCS%%%%DOCSDIR%%/GPL2.txt @@ -67,6 +68,46 @@ bin/SABnzbd.py %%PORTDOCS%%%%DOCSDIR%%/License-rsslib.txt %%PORTDOCS%%%%DOCSDIR%%/License-ssmtplib.txt %%PORTDOCS%%%%DOCSDIR%%/README.txt +%%DATADIR%%/cherrypy/LICENSE.txt +%%DATADIR%%/cherrypy/VERSION.txt +%%DATADIR%%/cherrypy/__init__.py +%%DATADIR%%/cherrypy/_cpcgifs.py +%%DATADIR%%/cherrypy/_cpchecker.py +%%DATADIR%%/cherrypy/_cpconfig.py +%%DATADIR%%/cherrypy/_cpdispatch.py +%%DATADIR%%/cherrypy/_cperror.py +%%DATADIR%%/cherrypy/_cplogging.py +%%DATADIR%%/cherrypy/_cpmodpy.py +%%DATADIR%%/cherrypy/_cprequest.py +%%DATADIR%%/cherrypy/_cpserver.py +%%DATADIR%%/cherrypy/_cpthreadinglocal.py +%%DATADIR%%/cherrypy/_cptools.py +%%DATADIR%%/cherrypy/_cptree.py +%%DATADIR%%/cherrypy/_cpwsgi.py +%%DATADIR%%/cherrypy/_cpwsgi_server.py +%%DATADIR%%/cherrypy/cherryd +%%DATADIR%%/cherrypy/favicon.ico +%%DATADIR%%/cherrypy/lib/__init__.py +%%DATADIR%%/cherrypy/lib/auth.py +%%DATADIR%%/cherrypy/lib/caching.py +%%DATADIR%%/cherrypy/lib/covercp.py +%%DATADIR%%/cherrypy/lib/cptools.py +%%DATADIR%%/cherrypy/lib/encoding.py +%%DATADIR%%/cherrypy/lib/http.py +%%DATADIR%%/cherrypy/lib/httpauth.py +%%DATADIR%%/cherrypy/lib/profiler.py +%%DATADIR%%/cherrypy/lib/safemime.py +%%DATADIR%%/cherrypy/lib/sessions.py +%%DATADIR%%/cherrypy/lib/static.py +%%DATADIR%%/cherrypy/lib/tidy.py +%%DATADIR%%/cherrypy/lib/wsgiapp.py +%%DATADIR%%/cherrypy/lib/xmlrpc.py +%%DATADIR%%/cherrypy/process/__init__.py +%%DATADIR%%/cherrypy/process/plugins.py +%%DATADIR%%/cherrypy/process/servers.py +%%DATADIR%%/cherrypy/process/win32.py +%%DATADIR%%/cherrypy/process/wspbus.py +%%DATADIR%%/cherrypy/wsgiserver/__init__.py %%DATADIR%%/interfaces/Classic/README.TXT %%DATADIR%%/interfaces/Classic/templates/config.tmpl %%DATADIR%%/interfaces/Classic/templates/config_cat.tmpl @@ -210,7 +251,7 @@ bin/SABnzbd.py %%DATADIR%%/interfaces/Plush/templates/static/stylesheets/jqueryui/overcast/images/ui-icons_70b2e1_256x240.png %%DATADIR%%/interfaces/Plush/templates/static/stylesheets/jqueryui/overcast/images/ui-icons_999999_256x240.png %%DATADIR%%/interfaces/Plush/templates/static/stylesheets/jqueryui/overcast/images/ui-icons_fbc856_256x240.png -%%DATADIR%%/interfaces/Plush/templates/static/stylesheets/jqueryui/overcast/jquery-ui-1.8.9.custom.css +%%DATADIR%%/interfaces/Plush/templates/static/stylesheets/jqueryui/overcast/jquery-ui-1.8.15.custom.css %%DATADIR%%/interfaces/smpl/CreativeCommons2-5.txt %%DATADIR%%/interfaces/smpl/CreativeCommons3-0.txt %%DATADIR%%/interfaces/smpl/GPL2.txt @@ -397,10 +438,14 @@ bin/SABnzbd.py @dirrm %%DATADIR%%/interfaces/Classic/templates @dirrm %%DATADIR%%/interfaces/Classic @dirrm %%DATADIR%%/interfaces +@dirrm %%DATADIR%%/cherrypy/wsgiserver +@dirrm %%DATADIR%%/cherrypy/process +@dirrm %%DATADIR%%/cherrypy/lib +@dirrm %%DATADIR%%/cherrypy @dirrm %%DATADIR%% %%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrmtry sabnzbd -@dirrmtry %%PYTHON_SITELIBDIR%%/sabnzbd/utils -@dirrmtry %%PYTHON_SITELIBDIR%%/sabnzbd +@dirrm %%PYTHON_SITELIBDIR%%/sabnzbd/utils +@dirrm %%PYTHON_SITELIBDIR%%/sabnzbd @dirrmtry %%PYTHON_SITELIBDIR%% @exec mkdir -p %D/sabnzbd |