aboutsummaryrefslogtreecommitdiffstats
path: root/www/atutor/Makefile
blob: 2150e8ab6900e3ba63afc47d0206256d47af8b28 (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
# Created by: Wen heping <wenheping@gmail.com>
# $FreeBSD$

PORTNAME=   atutor
PORTVERSION=    2.2.2
CATEGORIES= www
MASTER_SITES=   SF/${PORTNAME}/ATutor%202/
DISTNAME=   ATutor-${PORTVERSION}

MAINTAINER= wen@FreeBSD.org
COMMENT=    Open Source Web-based Learning Content Management System (LCMS)

LICENSE=    GPLv2

BROKEN_powerpc64=   Does not build

USES=       cpe

USE_PHP=    session mbstring zlib mysql
WRKSRC=     ${WRKDIR}/ATutor

NO_BUILD=   yes
PLIST=      ${WRKDIR}/plist
SUB_FILES=  pkg-message

ATUTDIR=    www/atutor
ATUTDATDIR= ${WWWDIR}/content
ATUTCONFIG= include/config.inc.php

pre-install:
    @${ECHO_CMD} -e '@owner ${WWWOWN}\n@group ${WWWGRP}' > ${PLIST}
    @${FIND} -s -d ${WRKSRC} -type f | ${SED} "s?${WRKSRC}?${ATUTDIR}?g" >> ${PLIST}
    @${ECHO} @dir ${ATUTDIR}/content >> ${PLIST}
    @${FIND} -s -d ${WRKSRC} -type d  | ${SED} "s?${WRKSRC}?@dir ${ATUTDIR}?g" >> ${PLIST}
    @${ECHO_CMD} -e '@owner\n@group' >> ${PLIST}

do-install:
    @cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}
    @${FIND} ${STAGEDIR}${WWWDIR} -type d -exec ${CHMOD} a+x {} \;
    ${INSTALL_DATA} -d ${STAGEDIR}${ATUTDATDIR}
    @${CHMOD} 777 ${STAGEDIR}${ATUTDATDIR}
    @${CHMOD} 666 ${STAGEDIR}${WWWDIR}/${ATUTCONFIG}

.include <bsd.port.mk>