diff options
author | Pawel Pekala <pawel@FreeBSD.org> | 2011-10-16 13:19:35 +0000 |
---|---|---|
committer | Pawel Pekala <pawel@FreeBSD.org> | 2011-10-16 13:19:35 +0000 |
commit | a009ba2495e97f052c8c0750476a0a5f326196e7 (patch) | |
tree | 09938db000328aed553b933310488632ffd8d6a9 /www/limesurvey | |
parent | 6ba5a00c70801e6838d48c54dd7505ed64fc2099 (diff) | |
download | ports-a009ba2495e97f052c8c0750476a0a5f326196e7.tar.gz ports-a009ba2495e97f052c8c0750476a0a5f326196e7.zip |
- OPTIONify, add options for PGSQL, LDAP, GD, ZIP
- Add LICENSE
PR: ports/160478
Submitted by: Fumiyuki Shimizu <fumifumi@abacustech.jp>
Approved by: maintainer
Notes
Notes:
svn path=/head/; revision=283601
Diffstat (limited to 'www/limesurvey')
-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} |