From 42bfb6237efb034c0855bb713cf11b81d1a7db08 Mon Sep 17 00:00:00 2001 From: Wen Heping Date: Sun, 5 Oct 2014 13:29:15 +0000 Subject: [PATCH] - Fix dependencies [1] - Add rc scripts [1] - Reset maintainer to ports@ PR: 193784 [1] Submitted by: swills@ [1] --- devel/py-mwlib/Makefile | 23 +++++++++++-------- devel/py-mwlib/files/mwqserve.in | 38 ++++++++++++++++++++++++++++++++ devel/py-mwlib/files/nserve.in | 38 ++++++++++++++++++++++++++++++++ devel/py-mwlib/files/nslave.in | 38 ++++++++++++++++++++++++++++++++ devel/py-mwlib/files/postman.in | 38 ++++++++++++++++++++++++++++++++ 5 files changed, 166 insertions(+), 9 deletions(-) create mode 100644 devel/py-mwlib/files/mwqserve.in create mode 100644 devel/py-mwlib/files/nserve.in create mode 100644 devel/py-mwlib/files/nslave.in create mode 100644 devel/py-mwlib/files/postman.in diff --git a/devel/py-mwlib/Makefile b/devel/py-mwlib/Makefile index b07b0bb12598..c4d045ca1d62 100644 --- a/devel/py-mwlib/Makefile +++ b/devel/py-mwlib/Makefile @@ -3,35 +3,40 @@ PORTNAME= mwlib PORTVERSION= 0.15.14 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -MAINTAINER= wen@FreeBSD.org +MAINTAINER= ports@FreeBSD.org COMMENT= Python's MediaWiki Parser and Utility Library LICENSE= BSD3CLAUSE -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}parsing>0:${PORTSDIR}/devel/py-parsing \ +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}apipkg>=1.2:${PORTSDIR}/devel/py-apipkg \ + ${PYTHON_PKGNAMEPREFIX}bottle>=0.10:${PORTSDIR}/www/py-bottle \ + ${PYTHON_PKGNAMEPREFIX}flup>=1.0:${PORTSDIR}/www/py-flup \ ${PYTHON_PKGNAMEPREFIX}gevent>=0:${PORTSDIR}/devel/py-gevent \ + ${PYTHON_PKGNAMEPREFIX}lockfile>=0.8:${PORTSDIR}/devel/py-lockfile \ + ${PYTHON_PKGNAMEPREFIX}lxml>=0:${PORTSDIR}/devel/py-lxml \ ${PYTHON_PKGNAMEPREFIX}odfpy>=0.9:${PORTSDIR}/devel/py-odfpy \ ${PYTHON_PKGNAMEPREFIX}webob>=0.9.6.1:${PORTSDIR}/www/py-webob \ ${PYTHON_PKGNAMEPREFIX}lockfile>=0.8:${PORTSDIR}/devel/py-lockfile \ ${PYTHON_PKGNAMEPREFIX}timelib>=0.2:${PORTSDIR}/devel/py-timelib \ ${PYTHON_PKGNAMEPREFIX}pdf>=1.12:${PORTSDIR}/print/py-pdf \ - ${PYTHON_PKGNAMEPREFIX}simplejson>2.0.8:${PORTSDIR}/devel/py-simplejson \ - ${PYTHON_PKGNAMEPREFIX}flup>=1.0:${PORTSDIR}/www/py-flup \ ${PYTHON_PKGNAMEPREFIX}pillow>0:${PORTSDIR}/graphics/py-pillow \ ${PYTHON_PKGNAMEPREFIX}pylib>=1.4.0:${PORTSDIR}/devel/py-pylib \ - ${PYTHON_PKGNAMEPREFIX}lxml>=0:${PORTSDIR}/devel/py-lxml \ - ${PYTHON_PKGNAMEPREFIX}apipkg>=0:${PORTSDIR}/devel/py-apipkg \ ${PYTHON_PKGNAMEPREFIX}qserve>=0:${PORTSDIR}/devel/py-qserve \ ${PYTHON_PKGNAMEPREFIX}roman>=0:${PORTSDIR}/math/py-roman \ - ${PYTHON_PKGNAMEPREFIX}sqlite3dbm>=0:${PORTSDIR}/databases/py-sqlite3dbm + ${PYTHON_PKGNAMEPREFIX}simplejson>2.0.8:${PORTSDIR}/devel/py-simplejson \ + ${PYTHON_PKGNAMEPREFIX}sqlite3dbm>=0:${PORTSDIR}/databases/py-sqlite3dbm \ + ${PYTHON_PKGNAMEPREFIX}timelib>=0.2:${PORTSDIR}/devel/py-timelib \ + ${PYTHON_PKGNAMEPREFIX}webob>=0.9.6.1:${PORTSDIR}/www/py-webob USES= python:2 zip -USE_PYTHON= autoplist distutils +USE_PYTHON= autoplist distutils +USE_RC_SUBR= mwqserve nserve nslave postman +SUB_LIST= PYTHON_CMD=${PYTHON_CMD} post-patch: ${REINPLACE_CMD} \ diff --git a/devel/py-mwlib/files/mwqserve.in b/devel/py-mwlib/files/mwqserve.in new file mode 100644 index 000000000000..496a27d98218 --- /dev/null +++ b/devel/py-mwlib/files/mwqserve.in @@ -0,0 +1,38 @@ +#! /bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: mwqserve +# REQUIRE: DAEMON +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable mwqserve: +# +#mwqserve_enable="YES" + +. /etc/rc.subr + +name="mwqserve" +rcvar="mwqserve_enable" + +load_rc_config $name + +: ${mwqserve_user:=www} +: ${mwqserve_group:=www} +: ${mwqserve_enable:=NO} + +pidfile="/var/run/${name}.pid" +command="/usr/sbin/daemon" +command_args="-c -f -p ${pidfile} %%PREFIX%%/bin/mw-qserve ${mwqserve_args}" +command_interpreter="%%PYTHON_CMD%%" +procname="%%PREFIX%%/bin/mw-qserve" + +start_precmd=mwqserve_pre_start + +mwqserve_pre_start() { + /usr/bin/install -o ${mwqserve_user} -g ${mwqserve_group} -m 644 /dev/null ${pidfile} +} + +run_rc_command "$1" diff --git a/devel/py-mwlib/files/nserve.in b/devel/py-mwlib/files/nserve.in new file mode 100644 index 000000000000..e9242c631e29 --- /dev/null +++ b/devel/py-mwlib/files/nserve.in @@ -0,0 +1,38 @@ +#! /bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: nserve +# REQUIRE: DAEMON +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable nserve: +# +#nserve_enable="YES" + +. /etc/rc.subr + +name="nserve" +rcvar="nserve_enable" + +load_rc_config $name + +: ${nserve_user:=www} +: ${nserve_group:=www} +: ${nserve_enable:=NO} + +pidfile="/var/run/${name}.pid" +command="/usr/sbin/daemon" +command_args="-c -f -p ${pidfile} %%PREFIX%%/bin/nserve ${nserve_args}" +command_interpreter="%%PYTHON_CMD%%" +procname="%%PREFIX%%/bin/nserve" + +start_precmd=nserve_pre_start + +nserve_pre_start() { + /usr/bin/install -o ${nserve_user} -g ${nserve_group} -m 644 /dev/null ${pidfile} +} + +run_rc_command "$1" diff --git a/devel/py-mwlib/files/nslave.in b/devel/py-mwlib/files/nslave.in new file mode 100644 index 000000000000..94342b9b668e --- /dev/null +++ b/devel/py-mwlib/files/nslave.in @@ -0,0 +1,38 @@ +#! /bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: nslave +# REQUIRE: DAEMON +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable nslave: +# +#nslave_enable="YES" + +. /etc/rc.subr + +name="nslave" +rcvar="nslave_enable" + +load_rc_config $name + +: ${nslave_user:=www} +: ${nslave_group:=www} +: ${nslave_enable:=NO} + +pidfile="/var/run/${name}.pid" +command="/usr/sbin/daemon" +command_args="-c -f -p ${pidfile} %%PREFIX%%/bin/nslave ${nslave_args}" +command_interpreter="%%PYTHON_CMD%%" +procname="%%PREFIX%%/bin/nslave" + +start_precmd=nslave_pre_start + +nslave_pre_start() { + /usr/bin/install -o ${nslave_user} -g ${nslave_group} -m 644 /dev/null ${pidfile} +} + +run_rc_command "$1" diff --git a/devel/py-mwlib/files/postman.in b/devel/py-mwlib/files/postman.in new file mode 100644 index 000000000000..19e0c4c939af --- /dev/null +++ b/devel/py-mwlib/files/postman.in @@ -0,0 +1,38 @@ +#! /bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: postman +# REQUIRE: DAEMON +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable postman: +# +#postman_enable="YES" + +. /etc/rc.subr + +name="postman" +rcvar="postman_enable" + +load_rc_config $name + +: ${postman_user:=www} +: ${postman_group:=www} +: ${postman_enable:=NO} + +pidfile="/var/run/${name}.pid" +command="/usr/sbin/daemon" +command_args="-c -f -p ${pidfile} %%PREFIX%%/bin/postman ${postman_args}" +command_interpreter="%%PYTHON_CMD%%" +procname="%%PREFIX%%/bin/postman" + +start_precmd=postman_pre_start + +postman_pre_start() { + /usr/bin/install -o ${postman_user} -g ${postman_group} -m 644 /dev/null ${pidfile} +} + +run_rc_command "$1"