-
Notifications
You must be signed in to change notification settings - Fork 44
/
Makefile
77 lines (64 loc) · 2.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
PORTNAME= limesurvey
PORTVERSION= 5.6.43
CATEGORIES= www
MASTER_SITES= http://download.limesurvey.org/latest-5.x/ \
LOCAL/flo
DISTNAME= ${PORTNAME}${PORTVERSION}+231030
MAINTAINER= flo@FreeBSD.org
COMMENT= PHP-based survey building and runing system
WWW= https://www.limesurvey.org/
LICENSE= GPLv2
USES= cpe php:web zip
OPTIONS_DEFINE= GD IMAP LDAP PGSQL
OPTIONS_DEFAULT= GD
PGSQL_DESC= Use PostgreSQL (instead of MySQL)
GD_DESC= Install PHP gd extension
LDAP_DESC= Install PHP LDAP extension
IMAP_DESC= Install PHP IMAP extension
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPGSQL}
USE_PHP= pdo_pgsql
.else
# server is not necessary on this host.
USE_PHP= pdo_mysql
.endif
.if ${PORT_OPTIONS:MGD}
USE_PHP+= gd
.endif
.if ${PORT_OPTIONS:MLDAP}
USE_PHP+= ldap
.endif
.if ${PORT_OPTIONS:MIMAP}
USE_PHP+= imap
.endif
USE_PHP+= ctype dom iconv mbstring session \
simplexml xmlwriter zip zlib
WWWDOCROOT?= www
PHPSURVEYORURL?= ${PORTNAME}
WRKSRC= ${WRKDIR}/${PORTNAME}
NO_BUILD= yes
SUB_FILES= pkg-message
SUB_LIST= PHPSURVEYORDIR="${PHPSURVEYORDIR}" \
PHPSURVEYORURL="${PHPSURVEYORURL}"
PHPSURVEYORDIR= ${WWWDOCROOT}/${PHPSURVEYORURL}
do-install:
${MKDIR} "${STAGEDIR}${WWWDIR}"
@cd "${WRKSRC}" && ${COPYTREE_SHARE} . "${STAGEDIR}${WWWDIR}"
${MKDIR} "${STAGEDIR}${WWWDIR}"/tmp
${CHMOD} 755 "${STAGEDIR}${WWWDIR}"/tmp
${CHMOD} 755 "${STAGEDIR}${WWWDIR}"/upload
${CHMOD} -R go-w "${STAGEDIR}${WWWDIR}"/admin
post-install:
@${ECHO_CMD} "@group ${WWWGRP}" >> ${TMPPLIST}
@${FIND} -s -d ${STAGEDIR}${WWWDIR}/admin -type f -print | \
${SED} -e "s#${STAGEDIR}${PREFIX}/##g" >> ${TMPPLIST}
@${FIND} -s -d ${STAGEDIR}${WWWDIR}/admin -type d -print | \
${SED} -E -e "s#${STAGEDIR}${PREFIX}/#@dir #g" >> ${TMPPLIST}
@${ECHO_CMD} "@owner ${WWWOWN}" >> ${TMPPLIST}
@${FIND} -s -d ${STAGEDIR}${WWWDIR} ! -path "${STAGEDIR}${WWWDIR}/admin/*" -type f -print | \
${SED} -e "s#${STAGEDIR}${PREFIX}/##g" >> ${TMPPLIST}
@${FIND} -s -d ${STAGEDIR}${WWWDIR} -type d ! -path "${STAGEDIR}${WWWDIR}/admin*" -print | \
${SED} -E -e "s#${STAGEDIR}${PREFIX}/#@dir #g" >> ${TMPPLIST}
@${ECHO_CMD} "@owner" >> ${TMPPLIST}
@${ECHO_CMD} "@group" >> ${TMPPLIST}
.include <bsd.port.mk>