Tweak japanese/xgate version 3.7pl6
[dports.git] / japanese / xgate / Makefile
1 # Created by: nork@FreeBSD.org
2 # $FreeBSD: japanese/xgate/Makefile 327737 2013-09-20 18:47:54Z bapt $
3
4 PORTNAME=       xgate
5 PORTVERSION=    3.7pl6
6 CATEGORIES=     japanese mail www java
7 MASTER_SITES=   http://www.orangesoft.co.jp/index.php/download_file/-/192/
8 DISTNAME=       ${PORTNAME}pkg${PORTVERSION}
9 EXTRACT_SUFX=   .tgz
10
11 MAINTAINER=     ports@FreeBSD.org
12 COMMENT=        xGate webmail system implemented by Servlet over IMAP4/POP3
13
14 RUN_DEPENDS=    ${APP_HOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
15
16 NO_BUILD=       yes
17 USE_JAVA=       yes
18 JAVA_VERSION=   1.6+
19 SHAREOWN=       www
20 SHAREGRP=       www
21
22 PLIST_SUB=      T=${APP_HOME:S|^${LOCALBASE}/||} \
23                 WWWUID=${WWWUID} WWWGID=${WWWGID}
24
25 PORTDOCS=       AdminGuide.pdf \
26                 BasicPkgInstallGuide.pdf \
27                 ConfigSetupGuide.pdf \
28                 LDAPSchema_V35_37.xls \
29                 PCUserGuide.pdf \
30                 ReleaseNote_V3.5.2.pdf \
31                 ReleaseNote_V3.5.2PL1.pdf \
32                 ReleaseNote_V3.5.2PL2.pdf \
33                 ReleaseNote_V3.5.2PL3_3.7.pdf \
34                 ReleaseNote_V3.5.2PL4_3.7PL1.pdf \
35                 ReleaseNote_V3.5.2PL5_3.7PL2.pdf \
36                 ReleaseNote_V3.5.2PL6_3.7PL3.pdf \
37                 ReleaseNote_V3.5.2PL7_3.7PL4.pdf \
38                 ReleaseNote_V3.5.2PL8_3.7PL5.pdf \
39                 ReleaseNote_V3.5.2PL9_3.7PL6.pdf \
40                 UserGuide.pdf
41
42 RESTRICTED=     Commercial license
43
44 NO_STAGE=       yes
45 .include <bsd.port.pre.mk>
46
47 APP_HOME!=      ${MAKE} -C ${PORTSDIR}/www/tomcat6 -VAPP_HOME
48
49 CNFLSTS=        account/admin.ndt       \
50                 account/license.dat     \
51                 conf/access.dat         \
52                 conf/address.data       \
53                 conf/address.map        \
54                 conf/admin.ldif         \
55                 conf/admin_group.ldif   \
56                 conf/createuser.conf    \
57                 conf/device_match.conf  \
58                 conf/entry.data         \
59                 conf/extra.types        \
60                 conf/group.data         \
61                 conf/group.map          \
62                 conf/ldap.map           \
63                 conf/log.conf           \
64                 conf/terminal.dat       \
65                 conf/user.data          \
66                 conf/xgate.conf
67
68 post-extract:
69         @${MKDIR} ${WRKSRC}/xgate
70 .if ${OSVERSION} < 800000
71         @${UNZIP_CMD} ${WRKSRC}/xgate.war -d ${WRKSRC}/xgate
72 .else
73         @${TAR} xvf ${WRKSRC}/xgate.war -C ${WRKSRC}/xgate
74 .endif
75 .for conf in ${CNFLSTS}
76         @cd ${WRKSRC}/xgate/WEB-INF && ${MV} ${conf} ${conf}-dist
77 .endfor
78
79 post-patch:
80         ${FIND} ${WRKSRC} -name \*.orig -print0 | ${XARGS} -0 ${RM}
81
82 do-install:
83         ${INSTALL} -d -o ${WWWOWN} -g ${WWWGRP} /var/log/xgate
84         ${INSTALL} -d -o ${WWWOWN} -g ${WWWGRP} ${APP_HOME}/webapps/${PORTNAME}
85         @cd ${WRKSRC}/${PORTNAME} && ${COPYTREE_SHARE} \* ${APP_HOME}/webapps/${PORTNAME}
86 .for conf in ${CNFLSTS}
87         @cd ${APP_HOME}/webapps/xgate/WEB-INF && \
88                 [ ! -f ${conf} ] && ${CP} -p ${conf}-dist ${conf} || ${TRUE}
89 .endfor
90 .if !defined(NOPORTDOCS)
91         @${MKDIR} ${DOCSDIR}
92 .for docf in ${PORTDOCS}
93         @${INSTALL_DATA} ${WRKSRC}/docs/${docf} ${DOCSDIR}
94 .endfor
95 .endif
96
97 .include <bsd.port.post.mk>