aboutsummaryrefslogtreecommitdiffstats
path: root/www/cmsmadesimple/Makefile
blob: abedd421dcf3d45c4008f5d738d3fe62f0f5518d (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
64
65
66
67
68
# New ports collection makefile for:   cmsmadesimple
# Date created:     1st September 2008
# Whom:         Wen heping <wenheping@gmail.com>
#
# $FreeBSD$
#

PORTNAME=   cmsmadesimple
PORTVERSION=    1.4.1
PORTREVISION=   1
CATEGORIES= www
MASTER_SITES=   http://s3.amazonaws.com/cmsms/downloads/2536/
DISTNAME=   ${PORTNAME}-${PORTVERSION}-full

MAINTAINER= wenheping@gmail.com
COMMENT=    A Simple Open Source CMS

USE_PHP=    mysql tokenizer gd
WRKSRC=     ${WRKDIR}/${PORTNAME}-${PORTVERSION}

NO_BUILD=   yes
SUB_FILES=  pkg-message
WRKSRC=     ${WRKDIR}
CMS_DIRS=   admin doc images install lib \
        modules plugins tmp uploads
CMS_FILES=  favicon_cms.ico fileloc.php include.php \
        index.php moduleinterface.php preview.php \
        robots.txt soap.php stylesheet.css \
        stylesheet.php version.php
WRITABLE_DIRS=  tmp tmp/templates_c tmp/cache \
        uploads uploads/images modules

.include <bsd.port.pre.mk>
post-extract:
    @cd ${WRKSRC} && ${RM} -f config.php

do-install:
.for i in ${CMS_DIRS}
    @cd ${WRKSRC} && ${COPYTREE_SHARE} ${i} ${WWWDIR}
.endfor
.for i in ${CMS_FILES}
    @cd ${WRKSRC} && ${CP} ${i} ${WWWDIR}/${i}
.endfor
    @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
    @${CHMOD} -R 755 ${WWWDIR}

    @if [ ! -f ${WWWDIR}/config.php ]; then \
    ${TOUCH} ${WWWDIR}/config.php ; fi

post-install:
    @${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}' \
        >> ${TMPPLIST}
    @${ECHO_CMD} '@exec ${CHMOD} -R 755 ${WWWDIR}' \
        >> ${TMPPLIST}

.for i in ${WRITABLE_DIRS}
    @${CHMOD} 775 ${WWWDIR}/${i}
    @${ECHO_CMD} '@exec ${CHMOD} 775 ${WWWDIR}/${i}' \
        >> ${TMPPLIST}
.endfor

    @${CHMOD} 666 ${WWWDIR}/config.php
    @${ECHO_CMD} '@exec ${CHMOD} 666 ${WWWDIR}/config.php' \
        >> ${TMPPLIST}

    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>