Mercurial > hgrepos > FreeBSD > ports > www > uwsginl
changeset 24:5cbcc4e66817
Prepare for common repository for uwsginl and related plugins: move uwsginl into a subdirectory
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sat, 09 Mar 2019 11:52:46 +0100 |
| parents | b4145ca58f5d |
| children | 3847d23cd66a |
| files | .hgignore Makefile distinfo files/uwsginl.in pkg-descr pkg-plist uwsginl/Makefile uwsginl/distinfo uwsginl/files/uwsginl.in uwsginl/pkg-descr uwsginl/pkg-plist |
| diffstat | 11 files changed, 246 insertions(+), 246 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Sat Mar 09 10:36:03 2019 +0100 +++ b/.hgignore Sat Mar 09 11:52:46 2019 +0100 @@ -1,3 +1,3 @@ syntax: regexp -^work/ +/work/
--- a/Makefile Sat Mar 09 10:36:03 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -# Created by: Franz Glasner <freebsd-dev@dom66.de> -# $FreeBSD$ -# Based on www/uwsgi by: Daniel Gerzo <danger@FreeBSD.org> - -PORTNAME= uwsginl -PORTVERSION= 2.0.16 -PORTREVISION= 2 -CATEGORIES= www -MASTER_SITES= https://projects.unbit.it/downloads/ -DISTNAME= uwsgi-${DISTVERSION} - -MAINTAINER= freebsd-dev@dom66.de -COMMENT= Application host which uses the uwsgi protocol (nolang profile) - -LICENSE= GPLv2-WITH-LINKING-EXCEPTION -LICENSE_GROUPS= FSF GPL OSI -LICENSE_NAME= GPLv2 with linking exception -LICENSE_FILE= ${WRKSRC}/LICENSE -LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept - -USES= pkgconfig python:build -USE_RC_SUBR= uwsginl - -MAKE_ENV+= CPUCOUNT=${MAKE_JOBS_NUMBER} UWSGI_PROFILE=nolang.ini UWSGI_BIN_NAME=${PORTNAME} UWSGI_EMBED_PLUGINS=cgi,clock_realtime,echo,logpipe UWSGI_PROFILE_OVERRIDE=plugin_dir=${PREFIX}/${PLUGIN_DIR} - -USERS= uwsgi -GROUPS= uwsgi - -PLIST_SUB= PORTNAME=${PORTNAME} PLUGIN_DIR=${PLUGIN_DIR} - -OPTIONS_DEFINE= DEBUGSYM UWSGIDEBUG JSON PCRE XML SSL -OPTIONS_DEFAULT= SSL - -DEBUGSYM_DESC= Build with debug symbols -UWSGIDEBUG_DESC= Enable uwsgi debugging (def UWSGI_DEBUG, implies DEBUG) - -DEBUGSYM_VARS= EXTRA_BUILDARGS+=--debug - -UWSGIDEBUG_VARS= BUILDCONF_DEBUG=true - -JSON_VARS= BUILDCONF_JSON=jansson -JSON_LIB_DEPENDS= libjansson.so:devel/jansson - -PCRE_VARS= BUILDCONF_PCRE=true -PCRE_LIB_DEPENDS= libpcre.so:devel/pcre - -XML_VARS= BUILDCONF_XML=libxml2 -XML_LIB_DEPENDS= libxml2.so:textproc/libxml2 - -SSL_VARS= BUILDCONF_SSL=true -SSL_USES= ssl -SSL_CFLAGS= -I${OPENSSLINC} -SSL_LDFLAGS= ${OPENSSL_LDFLAGS} - -.include <bsd.port.options.mk> - -PLUGIN_DIR= lib/${PORTNAME}/plugins - -post-patch: -.for bcvar in DEBUG JSON PCRE XML SSL - @${REINPLACE_CMD} -e '/^${bcvar:tl} =/ s|= .*|= ${BUILDCONF_${bcvar}:Ufalse}|' ${WRKSRC}/buildconf/base.ini -.endfor - -do-configure: - @${DO_NADA} - -do-build: - @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} uwsgiconfig.py --build ${EXTRA_BUILDARGS} --verbose) - -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/ - ${MKDIR} ${STAGEDIR}${PREFIX}/${PLUGIN_DIR} - -.include <bsd.port.mk>
--- a/distinfo Sat Mar 09 10:36:03 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -TIMESTAMP = 1518267669 -SHA256 (uwsgi-2.0.16.tar.gz) = a911f48f3cc51ac82fdabc4e001f18a32569128680beb5a833ebc3ff6edcc1f4 -SIZE (uwsgi-2.0.16.tar.gz) = 798509
--- a/files/uwsginl.in Sat Mar 09 10:36:03 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,159 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -# PROVIDE: uwsginl -# REQUIRE: DAEMON -# KEYWORD: shutdown -# -# Add the following lines to /etc/rc.conf to enable uwsgi: -# -# uwsginl_enable (bool): Set it to "YES" to enable uwsgi -# Default is "NO". -# uwsginl_socket (path/str): Set the path to the uwsgi unix socket -# Default is /tmp/uwsginl.sock. -# uwsginl_socket_mode (int): Set the mode of the socket. -# Default is 660. -# uwsginl_socket_owner (str): Set the owner of the socket. -# Default is uwsgi:www. -# uwsginl_emperor (bool): Set it to "YES" to run uwsgi in emperor mode -# Default is "NO". -# uwsginl_configfile (path): Set the path to the config file -# Default is %%PREFIX%%/etc/uwsginl/uwsginl.ini. -# uwsginl_vassals_dir (path): Set the path to the vassals directory -# Default is %%PREFIX%%/etc/uwsginl/vassals. -# uwsginl_logfile (path): Set the path to the uwsgi log file -# Default is /var/log/uwsginl.log. -# uwsginl_pidfile (path): Set the path to the uwsgi pid file -# Default is /var/run/uwsginl.pid. -# uwsginl_uid (int): Set the UID of the process to run with -# Default is uwsgi. -# uwsginl_gid (int): Set the GID of the process to run with -# Default is uwsgi. -# uwsginl_flags (str): Set the uwsgi command line arguments -# Default is "-L". -# uwsginl_procname (str): Define to "uWSGI" if you start uwsgi with -# --auto-procname option. -# -# If you would like to have multiple uWSGI instances running, you can -# define multiple profiles: -# -# uwsginl_profiles (str): Set the list of uwsgi profiles -# Default is "". -# -# For each profile you can then define different options (except for -# uwsginl_enable) using the syntax uwsginl_<profile>_<option> - -. /etc/rc.subr - -name="uwsginl" -rcvar=uwsginl_enable - -load_rc_config $name - -command=%%PREFIX%%/bin/uwsginl - -: ${uwsginl_enable="NO"} -: ${uwsginl_socket="/tmp/${name}.sock"} -: ${uwsginl_socket_mode="660"} -: ${uwsginl_socket_owner="uwsgi:www"} -: ${uwsginl_configfile="%%PREFIX%%/etc/uwsginl/uwsginl.ini"} -: ${uwsginl_profiles=""} -: ${uwsginl_logfile="/var/log/${name}.log"} -: ${uwsginl_pidfile="/var/run/${name}.pid"} -: ${uwsginl_uid="uwsgi"} -: ${uwsginl_gid="uwsgi"} -: ${uwsginl_flags="-L"} -: ${uwsginl_emperor="NO"} -: ${uwsginl_vassals_dir="%%PREFIX%%/etc/uwsginl/vassals"} - -is_uwsginl_profile() { - local profile - - for profile in $uwsginl_profiles; do - if [ "$profile" = "$1" ]; then - return 0 - fi - done - - return 1 -} - -if [ -n "${uwsginl_profiles}" ]; then - if [ -n "$2" ]; then - profile="$2" - if ! is_uwsginl_profile $profile; then - echo "$0: no such profile defined in uwsginl_profiles." - exit 1 - fi - eval uwsginl_socket=\${uwsginl_${profile}_socket:-"/tmp/${name}-${profile}.sock"} - eval uwsginl_socket_mode=\${uwsginl_${profile}_socket_mode:-${uwsginl_socket_mode}} - eval uwsginl_socket_owner=\${uwsginl_${profile}_socket_owner:-${uwsginl_socket_owner}} - eval uwsginl_logfile=\${uwsginl_${profile}_logfile:-"/var/log/${name}-${profile}.log"} - eval uwsginl_pidfile=\${uwsginl_${profile}_pidfile:-"/var/run/${name}-${profile}.pid"} - eval uwsginl_uid=\${uwsginl_${profile}_uid:-"${uwsginl_uid}"} - eval uwsginl_gid=\${uwsginl_${profile}_gid:-"${uwsginl_gid}"} - eval uwsginl_flags=\${uwsginl_${profile}_flags:-"${uwsginl_flags}"} - eval uwsginl_procname=\${uwsginl_${profile}_procname:-"${uwsginl_procname}"} - eval uwsginl_emperor=\${uwsginl_${profile}_emperor:-"${uwsginl_emperor}"} - eval uwsginl_vassals_dir=\${uwsginl_${profile}_vassals_dir:-"${uwsginl_vassals_dir}"} - eval uwsginl_configfile=\${uwsginl_${profile}_configfile:-"${uwsginl_configfile}"} - elif [ -n "$1" ]; then - for profile in ${uwsginl_profiles}; do - echo "Processing ${name} profile: ${profile}" - %%PREFIX%%/etc/rc.d/uwsginl $1 ${profile} - done - exit 0 - fi -fi - -pidfile=${uwsginl_pidfile} -start_precmd=start_precmd -stop_postcmd=stop_postcmd -reload_precmd=reload_precmd -brutalreload_cmd=brutalreload_cmd -sig_stop="INT" -extra_commands="reload brutalreload" -procname=${uwsginl_procname} - -start_precmd() -{ - rc_flags="" - if [ -e ${uwsginl_configfile} ]; then - rc_flags="--ini ${uwsginl_configfile} " - fi - - if checkyesno uwsginl_emperor; then - echo "Running uWSGI as Emperor. Vassals loaded from "$uwsginl_vassals_dir - required_dirs=${uwsginl_vassals_dir} - rc_flags=${rc_flags}"--emperor-pidfile ${uwsginl_pidfile} -d ${uwsginl_logfile} --emperor ${uwsginl_vassals_dir}" - rc_flags=${rc_flags}" --vassals-set uid=${uwsginl_uid} --vassals-set gid=${uwsginl_gid}" - rc_flags=${rc_flags}" --vassals-set chmod-socket=${uwsginl_socket_mode} --vassals-set chown-socket=${uwsginl_socket_owner}" - else - rc_flags=${rc_flags}"--master --uid ${uwsginl_uid} --gid ${uwsginl_gid} --pidfile ${uwsginl_pidfile} -d ${uwsginl_logfile}" - rc_flags=${rc_flags}" -s ${uwsginl_socket} --chmod-socket=${uwsginl_socket_mode} --chown-socket=${uwsginl_socket_owner}" - fi - - rc_flags=${rc_flags}" ${uwsginl_flags}" -} - -stop_postcmd() -{ - rm -f ${uwsginl_pidfile} ${uwsginl_socket} -} - -reload_precmd() -{ - echo "Gracefully reloading ${name} without closing the main sockets." -} - -brutalreload_cmd() -{ - echo "Reloading ${name} without closing the main sockets." - - reload_precmd="" - sig_reload="TERM" - run_rc_command ${rc_prefix}reload $rc_extra_args || return 1 -} - -run_rc_command "$1"
--- a/pkg-descr Sat Mar 09 10:36:03 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -uWSGI is a fast (pure C), self-healing, developer-friendly WSGI server, -aimed for professional python webapps deployment and development. Over -time it has evolved in a complete stack for networked/clustered python -applications, implementing message/object passing, RPC and process -management. - -WWW: http://projects.unbit.it/uwsgi/
--- a/pkg-plist Sat Mar 09 10:36:03 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -bin/%%PORTNAME%% -@dir %%PLUGIN_DIR%%
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl/Makefile Sat Mar 09 11:52:46 2019 +0100 @@ -0,0 +1,74 @@ +# Created by: Franz Glasner <freebsd-dev@dom66.de> +# $FreeBSD$ +# Based on www/uwsgi by: Daniel Gerzo <danger@FreeBSD.org> + +PORTNAME= uwsginl +PORTVERSION= 2.0.16 +PORTREVISION= 2 +CATEGORIES= www +MASTER_SITES= https://projects.unbit.it/downloads/ +DISTNAME= uwsgi-${DISTVERSION} + +MAINTAINER= freebsd-dev@dom66.de +COMMENT= Application host which uses the uwsgi protocol (nolang profile) + +LICENSE= GPLv2-WITH-LINKING-EXCEPTION +LICENSE_GROUPS= FSF GPL OSI +LICENSE_NAME= GPLv2 with linking exception +LICENSE_FILE= ${WRKSRC}/LICENSE +LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept + +USES= pkgconfig python:build +USE_RC_SUBR= uwsginl + +MAKE_ENV+= CPUCOUNT=${MAKE_JOBS_NUMBER} UWSGI_PROFILE=nolang.ini UWSGI_BIN_NAME=${PORTNAME} UWSGI_EMBED_PLUGINS=cgi,clock_realtime,echo,logpipe UWSGI_PROFILE_OVERRIDE=plugin_dir=${PREFIX}/${PLUGIN_DIR} + +USERS= uwsgi +GROUPS= uwsgi + +PLIST_SUB= PORTNAME=${PORTNAME} PLUGIN_DIR=${PLUGIN_DIR} + +OPTIONS_DEFINE= DEBUGSYM UWSGIDEBUG JSON PCRE XML SSL +OPTIONS_DEFAULT= SSL + +DEBUGSYM_DESC= Build with debug symbols +UWSGIDEBUG_DESC= Enable uwsgi debugging (def UWSGI_DEBUG, implies DEBUG) + +DEBUGSYM_VARS= EXTRA_BUILDARGS+=--debug + +UWSGIDEBUG_VARS= BUILDCONF_DEBUG=true + +JSON_VARS= BUILDCONF_JSON=jansson +JSON_LIB_DEPENDS= libjansson.so:devel/jansson + +PCRE_VARS= BUILDCONF_PCRE=true +PCRE_LIB_DEPENDS= libpcre.so:devel/pcre + +XML_VARS= BUILDCONF_XML=libxml2 +XML_LIB_DEPENDS= libxml2.so:textproc/libxml2 + +SSL_VARS= BUILDCONF_SSL=true +SSL_USES= ssl +SSL_CFLAGS= -I${OPENSSLINC} +SSL_LDFLAGS= ${OPENSSL_LDFLAGS} + +.include <bsd.port.options.mk> + +PLUGIN_DIR= lib/${PORTNAME}/plugins + +post-patch: +.for bcvar in DEBUG JSON PCRE XML SSL + @${REINPLACE_CMD} -e '/^${bcvar:tl} =/ s|= .*|= ${BUILDCONF_${bcvar}:Ufalse}|' ${WRKSRC}/buildconf/base.ini +.endfor + +do-configure: + @${DO_NADA} + +do-build: + @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} uwsgiconfig.py --build ${EXTRA_BUILDARGS} --verbose) + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/ + ${MKDIR} ${STAGEDIR}${PREFIX}/${PLUGIN_DIR} + +.include <bsd.port.mk>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl/distinfo Sat Mar 09 11:52:46 2019 +0100 @@ -0,0 +1,3 @@ +TIMESTAMP = 1518267669 +SHA256 (uwsgi-2.0.16.tar.gz) = a911f48f3cc51ac82fdabc4e001f18a32569128680beb5a833ebc3ff6edcc1f4 +SIZE (uwsgi-2.0.16.tar.gz) = 798509
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl/files/uwsginl.in Sat Mar 09 11:52:46 2019 +0100 @@ -0,0 +1,159 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: uwsginl +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable uwsgi: +# +# uwsginl_enable (bool): Set it to "YES" to enable uwsgi +# Default is "NO". +# uwsginl_socket (path/str): Set the path to the uwsgi unix socket +# Default is /tmp/uwsginl.sock. +# uwsginl_socket_mode (int): Set the mode of the socket. +# Default is 660. +# uwsginl_socket_owner (str): Set the owner of the socket. +# Default is uwsgi:www. +# uwsginl_emperor (bool): Set it to "YES" to run uwsgi in emperor mode +# Default is "NO". +# uwsginl_configfile (path): Set the path to the config file +# Default is %%PREFIX%%/etc/uwsginl/uwsginl.ini. +# uwsginl_vassals_dir (path): Set the path to the vassals directory +# Default is %%PREFIX%%/etc/uwsginl/vassals. +# uwsginl_logfile (path): Set the path to the uwsgi log file +# Default is /var/log/uwsginl.log. +# uwsginl_pidfile (path): Set the path to the uwsgi pid file +# Default is /var/run/uwsginl.pid. +# uwsginl_uid (int): Set the UID of the process to run with +# Default is uwsgi. +# uwsginl_gid (int): Set the GID of the process to run with +# Default is uwsgi. +# uwsginl_flags (str): Set the uwsgi command line arguments +# Default is "-L". +# uwsginl_procname (str): Define to "uWSGI" if you start uwsgi with +# --auto-procname option. +# +# If you would like to have multiple uWSGI instances running, you can +# define multiple profiles: +# +# uwsginl_profiles (str): Set the list of uwsgi profiles +# Default is "". +# +# For each profile you can then define different options (except for +# uwsginl_enable) using the syntax uwsginl_<profile>_<option> + +. /etc/rc.subr + +name="uwsginl" +rcvar=uwsginl_enable + +load_rc_config $name + +command=%%PREFIX%%/bin/uwsginl + +: ${uwsginl_enable="NO"} +: ${uwsginl_socket="/tmp/${name}.sock"} +: ${uwsginl_socket_mode="660"} +: ${uwsginl_socket_owner="uwsgi:www"} +: ${uwsginl_configfile="%%PREFIX%%/etc/uwsginl/uwsginl.ini"} +: ${uwsginl_profiles=""} +: ${uwsginl_logfile="/var/log/${name}.log"} +: ${uwsginl_pidfile="/var/run/${name}.pid"} +: ${uwsginl_uid="uwsgi"} +: ${uwsginl_gid="uwsgi"} +: ${uwsginl_flags="-L"} +: ${uwsginl_emperor="NO"} +: ${uwsginl_vassals_dir="%%PREFIX%%/etc/uwsginl/vassals"} + +is_uwsginl_profile() { + local profile + + for profile in $uwsginl_profiles; do + if [ "$profile" = "$1" ]; then + return 0 + fi + done + + return 1 +} + +if [ -n "${uwsginl_profiles}" ]; then + if [ -n "$2" ]; then + profile="$2" + if ! is_uwsginl_profile $profile; then + echo "$0: no such profile defined in uwsginl_profiles." + exit 1 + fi + eval uwsginl_socket=\${uwsginl_${profile}_socket:-"/tmp/${name}-${profile}.sock"} + eval uwsginl_socket_mode=\${uwsginl_${profile}_socket_mode:-${uwsginl_socket_mode}} + eval uwsginl_socket_owner=\${uwsginl_${profile}_socket_owner:-${uwsginl_socket_owner}} + eval uwsginl_logfile=\${uwsginl_${profile}_logfile:-"/var/log/${name}-${profile}.log"} + eval uwsginl_pidfile=\${uwsginl_${profile}_pidfile:-"/var/run/${name}-${profile}.pid"} + eval uwsginl_uid=\${uwsginl_${profile}_uid:-"${uwsginl_uid}"} + eval uwsginl_gid=\${uwsginl_${profile}_gid:-"${uwsginl_gid}"} + eval uwsginl_flags=\${uwsginl_${profile}_flags:-"${uwsginl_flags}"} + eval uwsginl_procname=\${uwsginl_${profile}_procname:-"${uwsginl_procname}"} + eval uwsginl_emperor=\${uwsginl_${profile}_emperor:-"${uwsginl_emperor}"} + eval uwsginl_vassals_dir=\${uwsginl_${profile}_vassals_dir:-"${uwsginl_vassals_dir}"} + eval uwsginl_configfile=\${uwsginl_${profile}_configfile:-"${uwsginl_configfile}"} + elif [ -n "$1" ]; then + for profile in ${uwsginl_profiles}; do + echo "Processing ${name} profile: ${profile}" + %%PREFIX%%/etc/rc.d/uwsginl $1 ${profile} + done + exit 0 + fi +fi + +pidfile=${uwsginl_pidfile} +start_precmd=start_precmd +stop_postcmd=stop_postcmd +reload_precmd=reload_precmd +brutalreload_cmd=brutalreload_cmd +sig_stop="INT" +extra_commands="reload brutalreload" +procname=${uwsginl_procname} + +start_precmd() +{ + rc_flags="" + if [ -e ${uwsginl_configfile} ]; then + rc_flags="--ini ${uwsginl_configfile} " + fi + + if checkyesno uwsginl_emperor; then + echo "Running uWSGI as Emperor. Vassals loaded from "$uwsginl_vassals_dir + required_dirs=${uwsginl_vassals_dir} + rc_flags=${rc_flags}"--emperor-pidfile ${uwsginl_pidfile} -d ${uwsginl_logfile} --emperor ${uwsginl_vassals_dir}" + rc_flags=${rc_flags}" --vassals-set uid=${uwsginl_uid} --vassals-set gid=${uwsginl_gid}" + rc_flags=${rc_flags}" --vassals-set chmod-socket=${uwsginl_socket_mode} --vassals-set chown-socket=${uwsginl_socket_owner}" + else + rc_flags=${rc_flags}"--master --uid ${uwsginl_uid} --gid ${uwsginl_gid} --pidfile ${uwsginl_pidfile} -d ${uwsginl_logfile}" + rc_flags=${rc_flags}" -s ${uwsginl_socket} --chmod-socket=${uwsginl_socket_mode} --chown-socket=${uwsginl_socket_owner}" + fi + + rc_flags=${rc_flags}" ${uwsginl_flags}" +} + +stop_postcmd() +{ + rm -f ${uwsginl_pidfile} ${uwsginl_socket} +} + +reload_precmd() +{ + echo "Gracefully reloading ${name} without closing the main sockets." +} + +brutalreload_cmd() +{ + echo "Reloading ${name} without closing the main sockets." + + reload_precmd="" + sig_reload="TERM" + run_rc_command ${rc_prefix}reload $rc_extra_args || return 1 +} + +run_rc_command "$1"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl/pkg-descr Sat Mar 09 11:52:46 2019 +0100 @@ -0,0 +1,7 @@ +uWSGI is a fast (pure C), self-healing, developer-friendly WSGI server, +aimed for professional python webapps deployment and development. Over +time it has evolved in a complete stack for networked/clustered python +applications, implementing message/object passing, RPC and process +management. + +WWW: http://projects.unbit.it/uwsgi/
