aboutsummaryrefslogtreecommitdiffstats
path: root/www/dokuwiki/Makefile
blob: 3ed6e66e1d7fd119b1ee8a266d78d71d89422821 (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:    dokuwiki
# Date created:     2005-04-10
# Whom:         chinsan <chinsan@mail2000.com.tw>
#
# $FreeBSD$
#

PORTNAME=   dokuwiki
PORTVERSION=    20050218
PORTREVISION=   1
CATEGORIES= www
MASTER_SITES=   http://www.splitbrain.org/Programming/PHP/DokuWiki/
DISTNAME=   dokuwiki-2005-02-18
EXTRACT_SUFX=   .tgz

MAINTAINER= ports@FreeBSD.org
COMMENT=    A simple and easy to use wiki, no database required

USE_PHP=    pcre session
PHP4_PORT?= www/mod_php4
NO_BUILD=   YES
WANT_PHP_WEB=   YES

WWWDOCROOT?=    www/data-dist
DOKUWIKIURL?=   dokuwiki
WWWOWN?=    www
WWWGRP?=    www
DOKUWIKIDIR?=   ${WWWDOCROOT}/${DOKUWIKIURL}
PLIST=      ${WRKDIR}/pkg-plist

.include <bsd.port.pre.mk>

pre-install:
    cd ${WRKSRC} && ${FIND} -s . -type f | \
        ${SED} -e 's|^./||;s|^|${DOKUWIKIDIR}/|' > ${PLIST} \
        && ${FIND} -d * -type d | \
        ${SED} -e 's|^|@dirrm ${DOKUWIKIDIR}/|' >> ${PLIST} \
        && ${ECHO_CMD} ${DOKUWIKIDIR}/changes.log >> ${PLIST} \
        && ${ECHO_CMD} @dirrm ${DOKUWIKIDIR} >> ${PLIST}

do-install:
    # Data files
    -${MKDIR} ${PREFIX}/${DOKUWIKIDIR}
    @${CHOWN} ${WWWOWN}:${WWWGRP} ${PREFIX}/${DOKUWIKIDIR}
    @${CHMOD} 755 ${PREFIX}/${DOKUWIKIDIR}
    @${CP} -R ${WRKSRC}/ ${PREFIX}/${DOKUWIKIDIR}
    # Setup the correct permissions
    @${TOUCH} ${PREFIX}/${DOKUWIKIDIR}/changes.log
    @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${DOKUWIKIDIR}/changes.log
    @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${DOKUWIKIDIR}/data
    @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${DOKUWIKIDIR}/media
    @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${DOKUWIKIDIR}/attic

post-install:
    @${SED} -e 's|%%PREFIX%%|${PREFIX}|' \
        -e 's|%%WWWDOCROOT%%|${WWWDOCROOT}|' \
        -e 's|%%DOKUWIKIURL%%|${DOKUWIKIURL}|' ${PKGMESSAGE}

.include <bsd.port.post.mk>