git: ecdfd833eb14 - main - www/moin2: New port
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 05 Oct 2024 10:23:57 UTC
The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=ecdfd833eb14d79bf4c40905d21b2e94c9603062 commit ecdfd833eb14d79bf4c40905d21b2e94c9603062 Author: Muhammad Moinur Rahman <bofh@FreeBSD.org> AuthorDate: 2024-10-05 08:19:41 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2024-10-05 10:23:42 +0000 www/moin2: New port Easy to use, full-featured and extensible wiki software package MoinMoin is a Python clone of WikiWiki, which is a composition system; it's a discussion medium; it's a repository; it's a mail system; it's a tool for collaboration. This is the version 2 of moinmoin wiki. THIS IS STILL IN DEVELOPMENT AND IS NOT RECOMMENDED FOR PRODUCTION THIS IS NOT WELL TESTED PLEASE REPORT ANY BUGS IN FREEBSD ENVIRONMENT WWW: https://moinmo.in/ --- www/Makefile | 2 +- www/moin2/Makefile | 113 +++++++++++++++++++++++++++++++ www/moin2/distinfo | 3 + www/moin2/files/pkg-install.in | 148 +++++++++++++++++++++++++++++++++++++++++ www/moin2/pkg-descr | 5 ++ 5 files changed, 270 insertions(+), 1 deletion(-) diff --git a/www/Makefile b/www/Makefile index 4fe03ee86bad..97be25e33953 100644 --- a/www/Makefile +++ b/www/Makefile @@ -428,6 +428,7 @@ SUBDIR += mod_wsgi4 SUBDIR += mod_xsendfile SUBDIR += mohawk + SUBDIR += moin2 SUBDIR += moinmoin SUBDIR += moinmoincli SUBDIR += mongoose @@ -2557,5 +2558,4 @@ SUBDIR += zerowait-httpd SUBDIR += zgrab2 SUBDIR += zola - .include <bsd.port.subdir.mk> diff --git a/www/moin2/Makefile b/www/moin2/Makefile new file mode 100644 index 000000000000..9e4b1a76340f --- /dev/null +++ b/www/moin2/Makefile @@ -0,0 +1,113 @@ +PORTNAME= moin +DISTVERSION= 2.0.0a1 +CATEGORIES= www python +MASTER_SITES= https://github.com/moinwiki/moin/releases/download/${DISTVERSION}/ +PKGNAMESUFFIX= 2 + +MAINTAINER= bofh@FreeBSD.org +COMMENT= Easy to use, full-featured and extensible wiki software package +WWW= https://moinmo.in/ + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +BUILD_DEPENDS= ${PY_SETUPTOOLS} \ + ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=6.2:devel/py-setuptools-scm@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}Babel>=2.10.0:devel/py-babel@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}Jinja2>=3.1.0:devel/py-Jinja2@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}blinker>=1.6.2:devel/py-blinker@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}docutils>=0.18.1:textproc/py-docutils@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}emeraldtree>=0.10.0:textproc/py-emeraldtree@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}feedgen>=0.9.0:www/py-feedgen@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}flask>=3.0.0:www/py-flask@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}flask-babel>=3.0.0:devel/py-flask-babel@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}flask-caching>=1.2.0:www/py-flask-caching@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}flask-theme>=0.3.6:www/py-flask-theme@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}flatland>=0.8:devel/py-flatland@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}markdown>=3.4.1:textproc/py-markdown@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}markupsafe<=2.2.0:textproc/py-markupsafe@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}mdx_wikilink_plus>=1.4.1:textproc/py-mdx_wikilink_plus@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}passlib>=1.6.0:security/py-passlib@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pdfminer.six>0:textproc/py-pdfminer.six@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pygments>=1.4:textproc/py-pygments@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sqlalchemy20>=2.0:databases/py-sqlalchemy20@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}werkzeug>=3.0.0:www/py-werkzeug@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}whoosh>=2.7.0:textproc/py-whoosh@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xstatic>=0.0.2:devel/py-xstatic@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xstatic-autosize>0:devel/py-xstatic-autosize@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xstatic-bootstrap3>=3.1.1.2:devel/py-xstatic-bootstrap3@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xstatic-ckeditor>=3.6.1.2:devel/py-xstatic-ckeditor@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xstatic-font-awesome>=6.2.1.0:devel/py-xstatic-font-awesome@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xstatic-jquery>=1.8.2:devel/py-xstatic-jquery@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xstatic-jquery-file-upload>=10.31.0:devel/py-xstatic-jquery-file-upload@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xstatic-jquery.tablesorter>=2.14.5.1:devel/py-xstatic-jquery.tablesorter@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xstatic-pygments>=1.6.0.1:devel/py-xstatic-pygments@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xstatic-svg-edit-moin>=2012.11.15.1:devel/py-xstatic-svg-edit-moin@${PY_FLAVOR} + +USES= cpe python shebangfix +CPE_VENDOR= moinmo +USE_PYTHON= autoplist pep517 +PEP517_INSTALL_CMD?= ${PYTHON_CMD} -m installer --destdir ${STAGEDIR} --prefix ${PREFIX} ${BUILD_WRKSRC}/dist/${PYDISTUTILS_PKGNAME}-${DISTVERSION}*.whl +PYDISTUTILS_PKGNAME= moin + +NO_ARCH= yes + +PLIST_SUB+= PYTHON_SITELIB=${PYTHON_SITELIBDIR:S|^${LOCALBASE}/||} \ + DATADIR=share/moin +SUB_FILES= pkg-install +SUB_LIST= MOINDIR=${MOINDIR} MOINDEST=${MOINDEST} MOINVER=${MOINVER} \ + HTDOCS=${PYTHON_SITELIBDIR}/MoinMoin/web/static/htdocs + +CGIUSER?= www +CGIGROUP?= www +MOINDIR= ${PREFIX}/share/moin +MOINDEST?= ${PREFIX}/www/wiki +MOINVER?= ${PORTVERSION:S|.||g} +MOINTYPE?= CGI + +PKGDEINSTALL= ${PKGINSTALL} + +.if ${MOINTYPE} == "STANDALONE" +MOINSCRIPT= ${MOINDIR}/server/moin +.elif ${MOINTYPE} == "FCGI" +MOINSCRIPT= ${MOINDIR}/server/moin.fcgi +.elif ${MOINTYPE} == "MOD_PYTHON" +.elif ${MOINTYPE} == "CGI" +MOINSCRIPT= ${MOINDIR}/server/moin.cgi +.elif ${MOINTYPE} == "WSGI" +MOINSCRIPT= ${MOINDIR}/server/moin.wsgi +.else +BROKEN= MOINTYPE must be a STANDALONE, FCGI, WSGI, MOD_PYTHON, or CGI +.endif + +pre-everything:: + @${ECHO} + @${ECHO} "Set MOINTYPE=(CGI|FCGI|WSGI|STANDALONE) to define" + @${ECHO} "type of installation. Default is CGI." + @${ECHO} "Use MOINDEST=/path to modify installation destination." + @${ECHO} "Default value for MOINDEST is ${PREFIX}/www/wiki." + @${ECHO} + @${ECHO} "To get correct permissions, please set CGIUSER, CGIGROUP" + @${ECHO} "per default it is set to www:www." + @${ECHO} + +instance: pre-everything apply-slist + @${ECHO_CMD} "Creating a new wiki instance in ${MOINDEST}."; \ + if [ -f ${MOINDIR}/config/wikiconfig.py ]; then \ + ${MKDIR} ${MOINDEST}; \ + ${CP} -R ${MOINDIR}/data ${MOINDEST}; \ + ${CP} -R ${MOINDIR}/underlay ${MOINDEST}; \ + ${CHMOD} -R u+rw,go-ws ${MOINDEST}/data; \ + ${INSTALL_SCRIPT} ${MOINDIR}/config/wikiconfig.py ${MOINDEST}; \ + if [ ! -z ${MOINSCRIPT} ]; then \ + ${INSTALL_SCRIPT} ${MOINSCRIPT} ${MOINDEST}; \ + fi; \ + ${CHOWN} -R ${CGIUSER}:${CGIGROUP} ${MOINDEST}; \ + ${SH} ${PKGINSTALL} ${PKGNAME} INSTANCE ${MOINTYPE}; \ + else \ + ${ECHO_CMD} "You need to install moinmoin first before trying"; \ + ${ECHO_CMD} "to add a new wiki instance."; \ + fi + +.include <bsd.port.mk> diff --git a/www/moin2/distinfo b/www/moin2/distinfo new file mode 100644 index 000000000000..a3619fcd4741 --- /dev/null +++ b/www/moin2/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1726573676 +SHA256 (moin-2.0.0a1.tar.gz) = 48dc1dd7c0a3437d7addb64495a50f16d25537c399baeddb292a78477f4d931f +SIZE (moin-2.0.0a1.tar.gz) = 1817903 diff --git a/www/moin2/files/pkg-install.in b/www/moin2/files/pkg-install.in new file mode 100644 index 000000000000..601cf963bff0 --- /dev/null +++ b/www/moin2/files/pkg-install.in @@ -0,0 +1,148 @@ +#! /bin/sh + +destdir=%%MOINDEST%% +htdocs=%%HTDOCS%% +moinver=%%MOINVER%% + +case "x$2" in + +"xINSTANCE") + + echo "************************************************************" + + case "x$3" in + + "xMOD_PYTHON") + + echo "Since you chose MOINTYPE=MOD_PYTHON, you may want to" + echo "add something like that to your Apache configuration." + echo "" + echo ",-----" + echo " Alias /moin_static$moinver/ \"$htdocs/\"" + echo " <Directory \"$htdocs/\">" + echo " Order deny,allow" + echo " Allow from all" + echo " </Directory>" + echo " Alias /mywiki $destdir" + echo " <Location \"/mywiki\">" + echo " SetHandler python-program" + echo " PythonPath \"['$destdir'] + sys.path\"" + echo " PythonHandler MoinMoin.request.request_modpython::Request.run" + echo " PythonAutoReload On" + echo " PythonDebug On" + echo " </Location>" + echo "\`-----" + echo "" + + ;; + + "xCGI") + + echo "Since you chose MOINTYPE=CGI, you may want to" + echo "add something like that to your Apache configuration." + echo "" + + echo ",-----" + echo " Alias /moin_static$moinver/ \"$htdocs/\"" + echo " <Directory \"$htdocs/\">" + echo " Order deny,allow" + echo " Allow from all" + echo " </Directory>" + echo " ScriptAlias /mywiki \"$destdir/moin.cgi\"" + echo " <Directory \"$destdir/\">" + echo " Order deny,allow" + echo " Allow from all" + echo " </Directory>" + echo "\`-----" + echo "" + + ;; + + "xWSGI") + + echo "Since you chose MOINTYPE=WSGI, you should " + echo "add something like that to your Apache configuration." + echo "" + + echo ",-----" + echo " Alias /moin_static$moinver/ \"$htdocs/\"" + echo " <Directory \"$htdocs/\">" + echo " Order deny,allow" + echo " Allow from all" + echo " </Directory>" + echo " WSGIScriptAlias /mywiki \"$destdir/moin.wsgi\"" + echo "#If you use HTTP authorization enable the following also" + echo "#WSGIPassAuthorization On" + echo " <Directory \"$destdir/\">" + echo " Order deny,allow" + echo " Allow from all" + echo " </Directory>" + echo "\`-----" + echo "" + + ;; + + *) + + ;; + + esac + + echo "You may need to modify wikiconfig.py in your wiki instance" + echo "directory (eg. $destdir)." + echo "" + echo "If you want to install additional wiki instances" + echo "call 'make instance' with appriopriate arguments." + echo "E.g.: make MOINTYPE=FCGI MOINDEST=%%PREFIX%%/www/wiki instance" + echo "************************************************************" + + ;; + +"xPOST-INSTALL") + + echo "************************************************************" + echo "Important: You have currently no wiki instance installed." + echo "" + echo "If you're installing from ports, just run 'make instance'" + echo "with appriopriate arguments." + echo "eg. make MOINTYPE=FCGI MOINDEST=%%PREFIX%%/www/wiki instance" + echo "" + echo "If you're installing from package, run these commands." + echo "" + echo "# Choose here one script depending on the type of wiki you" + echo "# want : moin.py (standalone), moin.fcg (FCGI), moin.wsgi (WSGI) or moin.cgi." + echo 'export MOINSCRIPT="moin.cgi"' + echo '# Defaults should be fine but you may want to modify these.' + echo 'export MOINDIR="%%MOINDIR%%"' + echo 'export MOINDEST="%%MOINDEST%%"' + echo '# Set this to your apache user and group.' + echo 'export CGIUSER="www"' + echo 'export CGIGROUP="www"' + echo '' + echo 'mkdir -p ${MOINDEST}/data' + echo 'mkdir -p ${MOINDEST}/underlay' + echo 'cp -R ${MOINDIR}/data ${MOINDEST}' + echo 'cp -R ${MOINDIR}/underlay ${MOINDEST}' + echo 'chmod -R u+rw,go-ws ${MOINDEST}/data' + echo 'install -m 0555 ${MOINDIR}/config/wikiconfig.py ${MOINDEST}' + echo 'test -z "${MOINSCRIPT}" || \' + echo ' install -m 0555 ${MOINDIR}/server/${MOINSCRIPT} ${MOINDEST}' + echo 'chown -R ${CGIUSER}:${CGIGROUP} ${MOINDEST}' + echo "" + echo "Note: export might not work with your shell, use" + echo "# setenv VAR 'value' instead" + echo "************************************************************" + + ;; + +"xDEINSTALL") + + echo "************************************************************" + echo "All shared files have been removed." + echo "To complete deinstallation, please remove all the wiki" + echo "instances you have created." + echo "************************************************************" + + ;; + +esac diff --git a/www/moin2/pkg-descr b/www/moin2/pkg-descr new file mode 100644 index 000000000000..829e3177b212 --- /dev/null +++ b/www/moin2/pkg-descr @@ -0,0 +1,5 @@ +MoinMoin is a Python clone of WikiWiki, which is a composition system; +it's a discussion medium; it's a repository; it's a mail system; +it's a tool for collaboration. + +This is the version 2 of MoinMoin