blob: 9aade731684825b788d99224a1b1b632a844f095 (
plain) (
blame)
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
|
# New ports collection makefile for: mahara
# Date created: 21 Feb, 2009
# Whom: Wen Heping <wenheping@gmail.com>
#
# $FreeBSD$
#
PORTNAME= mahara
PORTVERSION= 1.1.8
CATEGORIES= www
MASTER_SITES= http://launchpad.net/${PORTNAME}/1.1/${PORTVERSION}/+download/
MAINTAINER= wen@FreeBSD.org
COMMENT= An open source ePortfolio system
USE_BZIP2= yes
USE_PHP= session json curl xml xmlrpc openssl simplexml
FETCH_ARGS= -pRr
OPTIONS= MYSQL "Add support for a MySQL database server" On \
PGSQL "Add support for a PostgreSQL database server" Off
.include <bsd.port.pre.mk>
.if defined(WITH_MYSQL)
USE_PHP+= mysql
.endif
.if defined(WITH_PGSQL)
USE_PHP+= pgsql
.endif
NO_BUILD= yes
PLIST= ${WRKDIR}/plist
SUB_FILES= pkg-message
SUB_LIST= MAHARADIR=${MAHARADIR} \
MAHARADATADIR=${MAHARADATADIR}
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/htdocs
MAHARADIR?= www/mahara
MAHARADATADIR?= www/maharadata
pre-install:
@${FIND} -s -d ${WRKSRC} -type f | ${SED} "s?${WRKSRC}?${MAHARADIR}?g" >${PLIST}
@${FIND} -s -d ${WRKSRC} -type d | ${SED} "s?${WRKSRC}?@dirrm ${MAHARADIR}?g" >> ${PLIST}
@${ECHO} @dirrm ${MAHARADATADIR} >> ${PLIST}
do-install:
@cd ${WRKSRC} && ${COPYTREE_SHARE} . ${WWWDIR}
@${INSTALL} -d ${PREFIX}/${MAHARADATADIR}
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
@${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}' >> ${TMPPLIST}
@${CHMOD} -R 755 ${WWWDIR}
@${ECHO_CMD} '@exec ${CHMOD} -R 755 ${WWWDIR}' >> ${TMPPLIST}
@${CHMOD} -R a+w ${PREFIX}/${MAHARADATADIR}
@${ECHO_CMD} '@exec ${CHMOD} -R a+w ${PREFIX}/${MAHARADATADIR}' >> ${TMPPLIST}
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
|