summaryrefslogtreecommitdiff
path: root/japanese/xgate/Makefile
blob: adde1c5cd0b54e4087ac8a706084141188212a57 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Created by: nork@FreeBSD.org
# $FreeBSD$

PORTNAME=	xgate
PORTVERSION=	3.7pl6
CATEGORIES=	japanese mail www java
MASTER_SITES=	http://www.orangesoft.co.jp/index.php/download_file/-/192/
DISTNAME=	${PORTNAME}pkg${PORTVERSION}
EXTRACT_SUFX=	.tgz

MAINTAINER=	ports@FreeBSD.org
COMMENT=	xGate webmail system implemented by Servlet over IMAP4/POP3

RUN_DEPENDS=	${APP_HOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6

NO_BUILD=	yes
USE_JAVA=	yes
JAVA_VERSION=	1.6+
SHAREOWN=	www
SHAREGRP=	www

PLIST_SUB=	T=${APP_HOME:S|^${LOCALBASE}/||} \
		WWWUID=${WWWUID} WWWGID=${WWWGID}

PORTDOCS=	AdminGuide.pdf \
		BasicPkgInstallGuide.pdf \
		ConfigSetupGuide.pdf \
		LDAPSchema_V35_37.xls \
		PCUserGuide.pdf \
		ReleaseNote_V3.5.2.pdf \
		ReleaseNote_V3.5.2PL1.pdf \
		ReleaseNote_V3.5.2PL2.pdf \
		ReleaseNote_V3.5.2PL3_3.7.pdf \
		ReleaseNote_V3.5.2PL4_3.7PL1.pdf \
		ReleaseNote_V3.5.2PL5_3.7PL2.pdf \
		ReleaseNote_V3.5.2PL6_3.7PL3.pdf \
		ReleaseNote_V3.5.2PL7_3.7PL4.pdf \
		ReleaseNote_V3.5.2PL8_3.7PL5.pdf \
		ReleaseNote_V3.5.2PL9_3.7PL6.pdf \
		UserGuide.pdf

RESTRICTED=	Commercial license

NO_STAGE=	yes
.include <bsd.port.pre.mk>

APP_HOME!=	${MAKE} -C ${PORTSDIR}/www/tomcat6 -VAPP_HOME

CNFLSTS=	account/admin.ndt	\
		account/license.dat	\
		conf/access.dat		\
		conf/address.data	\
		conf/address.map	\
		conf/admin.ldif		\
		conf/admin_group.ldif	\
		conf/createuser.conf	\
		conf/device_match.conf	\
		conf/entry.data		\
		conf/extra.types	\
		conf/group.data		\
		conf/group.map		\
		conf/ldap.map		\
		conf/log.conf		\
		conf/terminal.dat	\
		conf/user.data		\
		conf/xgate.conf

post-extract:
	@${MKDIR} ${WRKSRC}/xgate
.if ${OSVERSION} < 800000
	@${UNZIP_CMD} ${WRKSRC}/xgate.war -d ${WRKSRC}/xgate
.else
	@${TAR} xvf ${WRKSRC}/xgate.war -C ${WRKSRC}/xgate
.endif
.for conf in ${CNFLSTS}
	@cd ${WRKSRC}/xgate/WEB-INF && ${MV} ${conf} ${conf}-dist
.endfor

post-patch:
	${FIND} ${WRKSRC} -name \*.orig -print0 | ${XARGS} -0 ${RM}

do-install:
	${INSTALL} -d -o ${WWWOWN} -g ${WWWGRP} /var/log/xgate
	${INSTALL} -d -o ${WWWOWN} -g ${WWWGRP} ${APP_HOME}/webapps/${PORTNAME}
	@cd ${WRKSRC}/${PORTNAME} && ${COPYTREE_SHARE} \* ${APP_HOME}/webapps/${PORTNAME}
.for conf in ${CNFLSTS}
	@cd ${APP_HOME}/webapps/xgate/WEB-INF && \
		[ ! -f ${conf} ] && ${CP} -p ${conf}-dist ${conf} || ${TRUE}
.endfor
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
.for docf in ${PORTDOCS}
	@${INSTALL_DATA} ${WRKSRC}/docs/${docf} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.post.mk>