diff options
author | pawel <pawel@FreeBSD.org> | 2011-10-16 21:19:35 +0800 |
---|---|---|
committer | pawel <pawel@FreeBSD.org> | 2011-10-16 21:19:35 +0800 |
commit | 7fb20e31df0fc507f2fb522a4b030600a2ac617a (patch) | |
tree | 85128dc2ccca92af69fb5daa54a6f5aad92d4e8a /www | |
parent | 8c065b82bdd677636c65ea6237ed5c12519f1ccb (diff) | |
download | freebsd-ports-gnome-7fb20e31df0fc507f2fb522a4b030600a2ac617a.tar.gz freebsd-ports-gnome-7fb20e31df0fc507f2fb522a4b030600a2ac617a.tar.zst freebsd-ports-gnome-7fb20e31df0fc507f2fb522a4b030600a2ac617a.zip |
- OPTIONify, add options for PGSQL, LDAP, GD, ZIP
- Add LICENSE
PR: ports/160478
Submitted by: Fumiyuki Shimizu <fumifumi@abacustech.jp>
Approved by: maintainer
Diffstat (limited to 'www')
-rw-r--r-- | www/limesurvey/Makefile | 62 |
1 files changed, 52 insertions, 10 deletions
diff --git a/www/limesurvey/Makefile b/www/limesurvey/Makefile index 043781603c43..5304fd672a62 100644 --- a/www/limesurvey/Makefile +++ b/www/limesurvey/Makefile @@ -14,9 +14,39 @@ DISTNAME= ${PORTNAME}${PORTVERSION:S^.^^}plus-build10232-20110608 MAINTAINER= janos.mohacsi@bsd.hu COMMENT= A PHP-based survey building and runing system -USE_PHP= ctype dom gd iconv json ldap mbstring mysql pcre \ - simplexml session xmlwriter zip -USE_MYSQL= server +LICENSE= GPLv2 + +# http://docs.limesurvey.org/Installation&structure=English+Instructions+for+LimeSurvey +OPTIONS= PGSQL "Use PostgreSQL (instead of MySQL)" off \ + GD "Install PHP gd extention" on \ + LDAP "Install PHP LDAP extention" off \ + ZIP "Install PHP zip extention" off +# ZLIB "Install PHP zlib extention" off # For ComfortUpdate + +.include <bsd.port.options.mk> + +# http://docs.limesurvey.org/Installation&structure=English+Instructions+for+LimeSurvey#Make_sure_you_can_use_LimeSurvey_on_your_website +.if defined(WITH_PGSQL) +USE_PGSQL= yes +USE_PHP= pgsql +.else +# server is not neccesery on this host. +#USE_MYSQL= server +USE_MYSQL= client +USE_PHP= mysql +.endif +.if defined(WITH_GD) +USE_PHP+= gd +.endif +.if defined(WITH_LDAP) +USE_PHP+= ldap +.endif +.if defined(WITH_ZIP) +USE_PHP+= zip +.endif +USE_PHP+= ctype dom iconv json mbstring pcre \ + simplexml session xmlwriter +WANT_PHP_WEB=yes WWWDOCROOT?= www PHPSURVEYORURL?= ${PORTNAME} @@ -30,13 +60,25 @@ SUB_LIST= PHPSURVEYORURL="${PHPSURVEYORURL}" \ PHPSURVEYORDIR= ${WWWDOCROOT}/${PHPSURVEYORURL} do-install: - ${MKDIR} ${WWWDIR} - @cd ${WRKSRC} && ${COPYTREE_SHARE} . ${WWWDIR} - ${MKDIR} ${WWWDIR}/tmp - ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR} - ${CHMOD} 755 ${WWWDIR}/tmp - ${CHMOD} 755 ${WWWDIR}/templates - ${CHMOD} 755 ${WWWDIR}/upload + ${MKDIR} "${WWWDIR}" +.if defined(WITH_PGSQL) + ${SED} -E \ + -e 's/^(\$$databasetype[[:space:]]*=[[:space:]]*'"')mysql('"'.*)$$/\1postgres\2/' \ + -e 's/^(\$$databaseuser[[:space:]]*=[[:space:]]*'"')root('"'.*)$$/\1pgsql\2/' \ + "${WRKSRC}"/config.php >"${WRKSRC}"/config.php-dist + ${RM} "${WRKSRC}"/config.php +.else + ${MV} "${WRKSRC}"/config.php "${WRKSRC}"/config.php-dist +.endif + ${TEST} -e "${WWWDIR}"/config.php || ${CP} -p "${WRKSRC}"/config.php-dist "${WRKSRC}"/config.php + @cd "${WRKSRC}" && ${COPYTREE_SHARE} . "${WWWDIR}" + ${MKDIR} "${WWWDIR}"/tmp + ${CHOWN} -R "${WWWOWN}:${WWWGRP}" "${WWWDIR}" + ${CHMOD} 755 "${WWWDIR}"/tmp + ${CHMOD} 755 "${WWWDIR}"/templates + ${CHMOD} 755 "${WWWDIR}"/upload + ${CHOWN} -R 0 "${WWWDIR}"/admin + ${CHMOD} -R go-w "${WWWDIR}"/admin post-install: @${CAT} ${PKGMESSAGE} |