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