summaryrefslogtreecommitdiff
path: root/www/limesurvey/Makefile
blob: 685aea0ed4cbddb76017068e72c56073e8690948 (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
# New ports collection makefile for:	phpsurveyor
# Date created:		21 March 2005
# Whom:	      		janos.mohacsi@bsd.hu
#
# $FreeBSD$
#

PORTNAME=	phpsurveyor
PORTVERSION=	1.0
PORTREVISION=	1
CATEGORIES=	www
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	limesurvey
DISTNAME=	${PORTNAME}-1_00

MAINTAINER=	janos.mohacsi@bsd.hu
COMMENT=	A PHP-based survey building and runing system

USE_PHP=	mysql session
WRKSRC=		${WRKDIR}
USE_ZIP=	yes

#User-configurable variables
WWWDOCROOT?=	www/
PHPSURVEYORURL?=	phpsurveyor
#
# End of user-configurable variables.

# Set/override/append to variables from bsd.port.mk:
#
NO_BUILD=	yes
PKGMESSAGE=	${WRKDIR}/pkg-message
PLIST_SUB+=	PHPSURVEYORDIR=${PHPSURVEYORDIR} WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}

# Set custom variables:
#
PHPSURVEYORDIR=	${WWWDOCROOT}/${PHPSURVEYORURL}

post-configure:
	@ ${SED} \
	-e 's#%%PREFIX%%#${PREFIX}#g' \
	-e 's#%%PHPSURVEYORURL%%#${PHPSURVEYORURL}#g' \
	-e 's#%%PHPSURVEYORDIR%%#${PHPSURVEYORDIR}#g' \
	pkg-message > ${PKGMESSAGE}

do-install:
	${MKDIR} -m 0755 ${PREFIX}/${PHPSURVEYORDIR}
	cd ${WRKSRC} && ${FIND} * \( -name tmp -a -prune \) -o -print \
	  | ${TAR} cTf - - | ${TAR} xUCf ${PREFIX}/${PHPSURVEYORDIR} -
	${MKDIR} ${PREFIX}/${PHPSURVEYORDIR}/tmp
	${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${PHPSURVEYORDIR}
	${CHMOD} 755 ${PREFIX}/${PHPSURVEYORDIR}/tmp

post-install:
.if !defined(BATCH)
	@ ${CAT} ${PKGMESSAGE}
.endif

.include <bsd.port.mk>