summaryrefslogtreecommitdiff
path: root/www/dokeos/Makefile
blob: fa6a4db057975414000d7402846a25f79d0f361b (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
# New ports collection makefile for:	dokeos
# Date created:				21 January 2006
# Whom:					Filipe Rocha <filiperocha@gmail.com>
#
# $FreeBSD$
#

PORTNAME=	dokeos
PORTVERSION=	1.6.5
CATEGORIES=	www
MASTER_SITES=	http://www.dokeos.com/download/

MAINTAINER=	filiperocha@gmail.com
COMMENT=	Dokeos is an elearning and course management web application

USE_PHP=	mysql session gd pcre zlib
DIST_SUBDIR=	${PORTNAME}

NO_BUILD=	yes

WANT_PHP_WEB=	YES

DOKEOSDIR?=	www/dokeos

OPTIONS=	LDAP "Use LDAP" off

PORT_DBDIR?=	/var/db/ports
LATEST_LINK=	${PORTNAME}${PKGNAMESUFFIX}
OPTIONSFILE?=	${PORT_DBDIR}/${LATEST_LINK}/options

.if exists(${OPTIONSFILE})
.include "${OPTIONSFILE}"
.endif

ALL_OPTIONS=	LDAP

SEL_OPTIONS=	yes
.for opt in ${ALL_OPTIONS}
.       if defined(WITH_${opt}) && !defined(WITHOUT_${opt})
SEL_OPTIONS+=${opt:L}
.       endif
.endfor

USE_PHP+=	${SEL_OPTIONS}

do-install:
	@${INSTALL_DATA} -d ${PREFIX}/${DOKEOSDIR}
	@${CP} -Rn ${WRKSRC}/* ${PREFIX}/${DOKEOSDIR}
	@${FIND} ${PREFIX}/${DOKEOSDIR} -type d -exec ${CHMOD} +x {} \;
	@${FIND} ${PREFIX}/${DOKEOSDIR}/claroline/inc/conf -type d -exec ${CHMOD} -R +rwx {} \;
	@${FIND} ${PREFIX}/${DOKEOSDIR}/claroline/garbage -type d -exec ${CHMOD} -R +rwx {} \;
	@${FIND} ${PREFIX}/${DOKEOSDIR}/claroline/upload -type d -exec ${CHMOD} -R +rwx {} \;
	@${FIND} ${PREFIX}/${DOKEOSDIR}/archive -type d -exec ${CHMOD} -R +rwx {} \;
	@${FIND} ${PREFIX}/${DOKEOSDIR}/courses -type d -exec ${CHMOD} -R +rwx {} \;
	@${FIND} ${PREFIX}/${DOKEOSDIR}/home -type d -exec ${CHMOD} -R +rwx {} \;

	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${DOKEOSDIR}

post-install:
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>