aboutsummaryrefslogtreecommitdiffstats
path: root/www/pmwiki/Makefile
blob: 0cc828e3e3ff74d4021835a23cd8c1a3e004a7c3 (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
# Created by: Jin-Shan Tseng <tjs@cdpa.nsysu.edu.tw>
# $FreeBSD$

PORTNAME=   pmwiki
PORTVERSION=    2.2.83
PORTEPOCH=  1
CATEGORIES= www
MASTER_SITES=   http://www.pmwiki.org/pub/pmwiki/

MAINTAINER= tz@FreeBSD.org
COMMENT=    WikiWikiWeb clone using PHP

LICENSE=    GPLv2
LICENSE_FILE=   ${WRKSRC}/docs/COPYING.txt

BROKEN_powerpc64=   Does not build

USES=       cpe tar:tgz
USE_PHP=    mbstring session
WANT_PHP_WEB=   yes

NO_BUILD=   yes
NO_ARCH=    yes

PORTDOCS=   *

PLIST_SUB=  PMWIKIDIR=${PMWIKIDIR} WWWGRP=${WWWGRP} WWWOWN=${WWWOWN}
SUB_LIST+=  PMWIKIDIR=${PMWIKIDIR}
SUB_FILES=  pkg-message

pre-fetch:
.if !defined(PMWIKIDIR)
    @${ECHO_MSG} ""
    @${ECHO_MSG} "Define PMWIKIDIR (now: ${PMWIKIDIR})"
    @${ECHO_MSG} "to override default: www/pmwiki".
    @${ECHO_MSG} ""
.endif

PMWIKIDIR?= www/pmwiki

CPIOFLAGS=  --quiet -pdm -R ${WWWOWN}:${WWWGRP}

post-extract:
    @${MV} ${WRKSRC}/README.txt ${WRKSRC}/docs
    @${MV} ${WRKSRC}/docs/sample-config.php ${WRKSRC}

do-install:
    @${MKDIR} ${STAGEDIR}${PREFIX}/${PMWIKIDIR}
    @cd ${WRKSRC} && ${FIND} . ! \( -name docs -prune \) | \
        ${CPIO} ${CPIOFLAGS} ${STAGEDIR}${PREFIX}/${PMWIKIDIR}
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/docs/* ${STAGEDIR}${DOCSDIR}
    @${MKDIR} ${STAGEDIR}${PREFIX}/${PMWIKIDIR}/wiki.d

.include <bsd.port.mk>