diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2021-01-29 13:35:49 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2021-01-29 13:35:49 +0000 |
commit | f6f36be196f3be50b6b320cb7099a54ed73f90a4 (patch) | |
tree | 32c477293905b4d165710c70fec4c5e1a0b8c363 /www | |
parent | 0e7a5548519ed7f00cc387360bd8b0ab2dbb2f1f (diff) | |
download | ports-f6f36be196f3be50b6b320cb7099a54ed73f90a4.tar.gz ports-f6f36be196f3be50b6b320cb7099a54ed73f90a4.zip |
Notes
Diffstat (limited to 'www')
-rw-r--r-- | www/Makefile | 1 | ||||
-rw-r--r-- | www/web2ldap/Makefile | 34 | ||||
-rw-r--r-- | www/web2ldap/distinfo | 3 | ||||
-rw-r--r-- | www/web2ldap/files/patch-web2ldap_app_core.py | 29 | ||||
-rw-r--r-- | www/web2ldap/files/pkg-message.in | 21 | ||||
-rw-r--r-- | www/web2ldap/files/web2ldap.in | 40 | ||||
-rw-r--r-- | www/web2ldap/pkg-descr | 3 | ||||
-rw-r--r-- | www/web2ldap/pkg-install | 20 |
8 files changed, 151 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile index e387bdba604e..225d8acce38b 100644 --- a/www/Makefile +++ b/www/Makefile @@ -2269,6 +2269,7 @@ SUBDIR += w3m SUBDIR += w3m-img SUBDIR += w3mir + SUBDIR += web2ldap SUBDIR += webalizer SUBDIR += webbrowser SUBDIR += webcopy diff --git a/www/web2ldap/Makefile b/www/web2ldap/Makefile new file mode 100644 index 000000000000..9931c2827210 --- /dev/null +++ b/www/web2ldap/Makefile @@ -0,0 +1,34 @@ +# Created by: Oddbjorn Steffensen <oddbjorn@tricknology.org> +# $FreeBSD$ + +PORTNAME= web2ldap +PORTVERSION= 1.5.112 +CATEGORIES= www python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= girgen@FreeBSD.org +COMMENT= Python-based WWW gateway to LDAP servers + +LICENSE= APACHE20 + +RUN_DEPENDS= \ + ${PYTHON_PKGNAMEPREFIX}asn1crypto>=0.22.0:devel/py-asn1crypto@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}paramiko>0:security/py-paramiko@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dnspython2>=2.0.0:dns/py-dnspython2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xlwt>0:textproc/py-xlwt@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ldap0>=1.0.1:net/py-ldap0@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}defusedxml>0:devel/py-defusedxml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}prometheus-client>=0.7.1:net-mgmt/py-prometheus-client@${PY_FLAVOR} \ + ${LOCALBASE}/etc/mime.types:misc/mime-support + +OPTIONS_DEFINE= DOCS +USES= cpe python:3.6+ +USE_PYTHON= distutils autoplist + +SUB_FILES= pkg-message ${PORTNAME} +USE_RC_SUBR= ${PORTNAME} +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/www/web2ldap/distinfo b/www/web2ldap/distinfo new file mode 100644 index 000000000000..e460c54b74be --- /dev/null +++ b/www/web2ldap/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1606422618 +SHA256 (web2ldap-1.5.112.tar.gz) = a8af312994d284b568bf4a4ca63d11b5ec5661245b2c94aafe1a221c3cd70644 +SIZE (web2ldap-1.5.112.tar.gz) = 523572 diff --git a/www/web2ldap/files/patch-web2ldap_app_core.py b/www/web2ldap/files/patch-web2ldap_app_core.py new file mode 100644 index 000000000000..128dc349ed74 --- /dev/null +++ b/www/web2ldap/files/patch-web2ldap_app_core.py @@ -0,0 +1,29 @@ +--- web2ldap/app/core.py.orig 2020-05-04 11:51:59 UTC ++++ web2ldap/app/core.py +@@ -19,12 +19,6 @@ import time + import web2ldap.__about__ + from web2ldap.log import logger + +-# prefixes considered to indicate system-wide installation outside a venv +-OS_SYS_PREFIXES = { +- '/usr', +- '/usr/local', +-} +- + logger.info('Starting web2ldap %s', web2ldap.__about__.__version__) + # this has to be done before import module package ldap0 + os.environ['LDAPNOINIT'] = '1' +@@ -39,11 +33,9 @@ check_inst() + if 'WEB2LDAP_HOME' in os.environ: + # env var points to web2ldap root directory + etc_dir = os.path.join(os.environ['WEB2LDAP_HOME'], 'etc', 'web2ldap') +-elif os.name == 'posix' and sys.prefix in OS_SYS_PREFIXES: +- # assume OS-wide installation on POSIX platform (Linux, BSD, etc.) +- etc_dir = '/etc/web2ldap' + else: +- # virtual env ++ # assume OS-wide installation on POSIX platform (Linux, BSD, etc.) ++ # or virtual env + etc_dir = os.path.join(sys.prefix, 'etc', 'web2ldap') + + # Default directory for [web2ldap]/etc/web2ldap/templates diff --git a/www/web2ldap/files/pkg-message.in b/www/web2ldap/files/pkg-message.in new file mode 100644 index 000000000000..85a83325de91 --- /dev/null +++ b/www/web2ldap/files/pkg-message.in @@ -0,0 +1,21 @@ +[ +{ type: install + message: <<EOM +Run: + + service web2ldap onestart + +to start the standalone version of web2ldap. By default it only accepts +connections from localhost, this can be changed by editing configuration +option ``access_allowed'' in the file: + + %%ETCDIR%%/web2ldapcnf/__init__.py + +For configuration suggestions on installing the WSGI version of web2ldap using +apache *instead of the standalone version*, please look at the enclosed +documentation in: + + https://fossies.org/linux/web2ldap/etc/apache2/sample-mod_wsgi.conf +EOM +} +] diff --git a/www/web2ldap/files/web2ldap.in b/www/web2ldap/files/web2ldap.in new file mode 100644 index 000000000000..6c2f06237475 --- /dev/null +++ b/www/web2ldap/files/web2ldap.in @@ -0,0 +1,40 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: web2ldap +# REQUIRE: DAEMON NETWORKING +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable web2ldap: +# web2ldap_enable="NO" +# +# web2ldap_enable (bool): Set to YES to enable web2ldap +# Default: NO +# web2ldap_user (str): web2ldap daemon user +# Default: nobody +# web2ldap_group (str): web2ldap daemon group +# Default: nogroup +. /etc/rc.subr + +name="web2ldap" +rcvar=web2ldap_enable + +: ${web2ldap_enable:="NO"} +: ${web2ldap_user:="nobody"} +: ${web2ldap_group:="nogroup"} + +# daemon +pidfile="/var/run/${name}.pid" +command=/usr/sbin/daemon +procname="daemon" +command_args=" -c -f -P ${pidfile} %%PREFIX%%/bin/${name}" +start_precmd="web2ldap_precmd" + +web2ldap_precmd() +{ + install -o ${web2ldap_user} /dev/null ${pidfile} +} + +load_rc_config $name +run_rc_command "$1" diff --git a/www/web2ldap/pkg-descr b/www/web2ldap/pkg-descr new file mode 100644 index 000000000000..ad4a8d479f0f --- /dev/null +++ b/www/web2ldap/pkg-descr @@ -0,0 +1,3 @@ +web2ldap is a full-featured web-based LDAP v2+ client written in Python. + +WWW: https://web2ldap.de/ diff --git a/www/web2ldap/pkg-install b/www/web2ldap/pkg-install new file mode 100644 index 000000000000..bf61fd239c86 --- /dev/null +++ b/www/web2ldap/pkg-install @@ -0,0 +1,20 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +PREFIX=${PKG_PREFIX:-/usr/local} +DATADIR=${PREFIX}/share/web2ldap + +MKDIR=/bin/mkdir + +case "$2" in +POST-INSTALL) + ${MKDIR} -p ${DATADIR}/var ${DATADIR}/var/log ${DATADIR}/var/run + if [ -w /var/log ]; then + ${MKDIR} /var/log/web2ldap + fi + ;; +esac + +exit 0 |