aboutsummaryrefslogtreecommitdiffstats
path: root/www/jspwiki/Makefile
blob: 44995814ea1444d91f22b2bff2c7233ceada1706 (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
# Created by: wenheping@gmail.com
# $FreeBSD$

PORTNAME=   jspwiki
PORTVERSION=    2.8.4
PORTREVISION=   2
CATEGORIES= www java
MASTER_SITES=   http://www.ecyrd.com/~jalkanen/JSPWiki/${PORTVERSION}/
DISTNAME=   JSPWiki-${PORTVERSION}-bin

MAINTAINER= ports@FreeBSD.org
COMMENT=    Feature-rich and extensible Wiki engine built around J2EE

LICENSE=    APACHE20
LICENSE_FILE=   ${WRKDIR}/jspwiki/LICENSE

USES=       zip
USE_JAVA=   yes
NO_BUILD=   yes
NO_ARCH=    yes

TOMCATDIR=  ${PREFIX}/${TOMCATVER}
APPHOME=    ${LOCALBASE}/${TOMCATVER}
WEBAPPDIR=  ${TOMCATDIR}/webapps
WEBAPP=     JSPWiki

PORTDOCS=   ChangeLog README ReleaseNotes JSPWiki-*.zip

PLIST_SUB=  TOMCATDIR=${TOMCATDIR:S|^${PREFIX}/||}

OPTIONS_DEFINE= DOCS
OPTIONS_SINGLE= AS
OPTIONS_SINGLE_AS=  TOMCAT6 TOMCAT7
OPTIONS_DEFAULT=    TOMCAT6

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MTOMCAT6}
TOMCATVER=  apache-tomcat-6.0
RUN_DEPENDS+=   ${APPHOME}/bin/bootstrap.jar:www/tomcat6
.endif

.if ${PORT_OPTIONS:MTOMCAT7}
TOMCATVER=  apache-tomcat-7.0
RUN_DEPENDS+=   ${APPHOME}/bin/bootstrap.jar:www/tomcat7
.endif

post-extract:
    @${MV} ${WRKDIR}/${WEBAPP} ${WRKDIR}/${PORTNAME}
    @${MKDIR} ${WRKDIR}/${WEBAPP}
    @${TAR} xf ${WRKDIR}/${PORTNAME}/JSPWiki.war -C ${WRKDIR}/${WEBAPP}
.for file in jspwiki.policy jspwiki.properties web.xml
    @${MV} ${WRKDIR}/${WEBAPP}/WEB-INF/${file} ${WRKDIR}/${WEBAPP}/WEB-INF/${file}.sample
.endfor

do-install:
    @${MKDIR} ${STAGEDIR}${WEBAPPDIR}/${WEBAPP}
    (cd ${WRKDIR}/${WEBAPP} && ${COPYTREE_SHARE} . ${STAGEDIR}${WEBAPPDIR}/${WEBAPP})

do-install-DOCS-on:
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKDIR}/${PORTNAME}/|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>