Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jun 2014 22:21:44 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r356719 - in head/japanese/xgate: . files
Message-ID:  <201406052221.s55MLiae021091@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Thu Jun  5 22:21:43 2014
New Revision: 356719
URL: http://svnweb.freebsd.org/changeset/ports/356719
QAT: https://qat.redports.org/buildarchive/r356719/

Log:
  japanese/xgate: nightmarish stage support added.
  
  * Removed FreeBSD 7 and earlier condition
  * Switched from @exec/@unexec to @sample keywords
  * Moved /var/log/xgate creation/deletion to plist
  * Converted patches to unix CR
  * Used DOS2UNIX for entire package
  * Used @owner, @group instead of broken %%WWW???%% in plist
  * Used UIDFIX and TAR:tgz
  * Moved conf file renames from post-extract to post-patch where it belongs
  * Removed NOPORTDOCS and used DOCS option instead
  * Removed <pre>, <post>, replaced with <options>
  * Lots of portlint petting
  
  Verified in Redports

Added:
  head/japanese/xgate/files/patch-log.conf   (contents, props changed)
Deleted:
  head/japanese/xgate/files/patch-log.conf-dist
Modified:
  head/japanese/xgate/Makefile
  head/japanese/xgate/files/patch-web.xml
  head/japanese/xgate/pkg-plist

Modified: head/japanese/xgate/Makefile
==============================================================================
--- head/japanese/xgate/Makefile	Thu Jun  5 22:17:37 2014	(r356718)
+++ head/japanese/xgate/Makefile	Thu Jun  5 22:21:43 2014	(r356719)
@@ -3,16 +3,17 @@
 
 PORTNAME=	xgate
 PORTVERSION=	3.7pl6
+PORTREVISION=	1
 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
+COMMENT=	Webmail system xGate implemented by Servlet over IMAP4/POP3
 
 RUN_DEPENDS=	${APP_HOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat6
 
+USES=		uidfix dos2unix tar:tgz
 NO_BUILD=	yes
 USE_JAVA=	yes
 JAVA_VERSION=	1.6+
@@ -20,7 +21,9 @@ SHAREOWN=	www
 SHAREGRP=	www
 
 PLIST_SUB=	T=${APP_HOME:S|^${LOCALBASE}/||} \
-		WWWUID=${WWWUID} WWWGID=${WWWGID}
+		WWWUID=${WWWOWN} WWWGID=${WWWGRP}
+
+OPTIONS_DEFINE=	DOCS
 
 PORTDOCS=	AdminGuide.pdf \
 		BasicPkgInstallGuide.pdf \
@@ -41,8 +44,7 @@ PORTDOCS=	AdminGuide.pdf \
 
 RESTRICTED=	Commercial license
 
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 APP_HOME!=	${MAKE} -C ${PORTSDIR}/www/tomcat6 -VAPP_HOME
 
@@ -67,31 +69,23 @@ CNFLSTS=	account/admin.ndt	\
 
 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
+	@${TAR} -xvf ${WRKSRC}/xgate.war -C ${WRKSRC}/xgate
 
 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}
+	@cd ${WRKSRC}/xgate/WEB-INF && ${MV} ${conf} ${conf}.sample
 .endfor
+	${FIND} ${WRKSRC} -name \*.orig -delete
+
+do-install:
+	${MKDIR} ${STAGEDIR}${APP_HOME}/webapps/${PORTNAME}
+	@cd ${WRKSRC}/${PORTNAME} && \
+		${COPYTREE_SHARE} \* ${STAGEDIR}${APP_HOME}/webapps/${PORTNAME}
+.if ${PORT_OPTIONS:MDOCS}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+.  for docf in ${PORTDOCS}
+	@${INSTALL_DATA} ${WRKSRC}/docs/${docf} ${STAGEDIR}${DOCSDIR}
+.  endfor
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Added: head/japanese/xgate/files/patch-log.conf
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/japanese/xgate/files/patch-log.conf	Thu Jun  5 22:21:43 2014	(r356719)
@@ -0,0 +1,18 @@
+--- xgate/WEB-INF/conf/log.conf.orig	Wed Nov 16 11:35:47 2005
++++ xgate/WEB-INF/conf/log.conf	Wed Nov 16 11:38:07 2005
+@@ -2,7 +2,7 @@
+ #Fri Oct 10 17:21:19 JST 2003
+ log4j.appender.A.layout.ConversionPattern=%d{MM/dd HH\:mm\:ss} [%-5p] %m%n
+ log4j.appender.E.DatePattern='.'yyyy-MM-dd
+-log4j.appender.E.File=/usr/local/xgate/log/logfile.html
++log4j.appender.E.File=/var/log/xgate/logfile.html
+ log4j.appender.D.layout.ConversionPattern=%d{yyyy-MM-dd HH\:mm\:ss} [%-5p]/ %m%n
+ log4j.appender.A.DatePattern='.'MM/dd
+ log4j.appender.A.layout=org.apache.log4j.PatternLayout
+@@ -12,5 +12,5 @@
+ log4j.appender.E.layout=org.apache.log4j.HTMLLayout
+ log4j.appender.A=org.apache.log4j.ConsoleAppender
+ log4j.appender.D.layout=org.apache.log4j.PatternLayout
+-log4j.appender.D.File=/usr/local/xgate/log/logfile.txt
++log4j.appender.D.File=/var/log/xgate/logfile.txt
+ log4j.rootCategory=DEBUG,D,A

Modified: head/japanese/xgate/files/patch-web.xml
==============================================================================
--- head/japanese/xgate/files/patch-web.xml	Thu Jun  5 22:17:37 2014	(r356718)
+++ head/japanese/xgate/files/patch-web.xml	Thu Jun  5 22:21:43 2014	(r356719)
@@ -1,13 +1,13 @@
 --- xgate/WEB-INF/web.xml.orig	Sat Dec 17 23:52:08 2005
 +++ xgate/WEB-INF/web.xml	Sun Dec 18 15:17:15 2005
 @@ -90,6 +90,10 @@
-         <session-timeout>10</session-timeout>
-     </session-config>
-     <mime-mapping>
-+        <extension>html</extension>
-+        <mime-type>text/html;charset=Shift_JIS</mime-type>
-+    </mime-mapping>
-+    <mime-mapping>
-         <extension>hdml</extension>
-         <mime-type>text/x-hdml;charset=Shift_JIS</mime-type>
-     </mime-mapping>
+         <session-timeout>10</session-timeout>
+     </session-config>
+     <mime-mapping>
++        <extension>html</extension>
++        <mime-type>text/html;charset=Shift_JIS</mime-type>
++    </mime-mapping>
++    <mime-mapping>
+         <extension>hdml</extension>
+         <mime-type>text/x-hdml;charset=Shift_JIS</mime-type>
+     </mime-mapping>

Modified: head/japanese/xgate/pkg-plist
==============================================================================
--- head/japanese/xgate/pkg-plist	Thu Jun  5 22:17:37 2014	(r356718)
+++ head/japanese/xgate/pkg-plist	Thu Jun  5 22:21:43 2014	(r356719)
@@ -1,11 +1,9 @@
+@owner %%WWWUID%%
+@group %%WWWGID%%
 %%T%%/webapps/xgate/META-INF/MANIFEST.MF
 %%T%%/webapps/xgate/WEB-INF/LICENSE.jakarta-struts
-@unexec if cmp -s %D/%%T%%/webapps/xgate/WEB-INF/account/admin.ndt %D/%%T%%/webapps/xgate/WEB-INF/account/admin.ndt-dist; then rm -f %D/%%T%%/webapps/xgate/WEB-INF/account/admin.ndt; fi
-%%T%%/webapps/xgate/WEB-INF/account/admin.ndt-dist
-@exec [ ! -f %B/admin.ndt ] && cp -p %B/%f %B/admin.ndt
-@unexec if cmp -s %D/%%T%%/webapps/xgate/WEB-INF/account/license.dat %D/%%T%%/webapps/xgate/WEB-INF/account/license.dat-dist; then rm -f %D/%%T%%/webapps/xgate/WEB-INF/account/license.dat; fi
-%%T%%/webapps/xgate/WEB-INF/account/license.dat-dist
-@exec [ ! -f %B/license.dat ] && cp -p %B/%f %B/license.dat
+@sample %%T%%/webapps/xgate/WEB-INF/account/admin.ndt.sample
+@sample %%T%%/webapps/xgate/WEB-INF/account/license.dat.sample
 %%T%%/webapps/xgate/WEB-INF/address/readme.txt
 %%T%%/webapps/xgate/WEB-INF/classes/com/happysize/net/radius/Radiusproto.class
 %%T%%/webapps/xgate/WEB-INF/classes/com/happysize/net/radius/Simple_radius_client.class
@@ -740,39 +738,23 @@
 %%T%%/webapps/xgate/WEB-INF/classes/jp/co/orangesoft/xgate/web/WebMessageDisplayVisitor.class
 %%T%%/webapps/xgate/WEB-INF/classes/jp/co/orangesoft/xgate/web/WebReportMessageDisplayVisitor.class
 %%T%%/webapps/xgate/WEB-INF/classes/jp/co/orangesoft/xgate/web/WebWriter.class
-%%T%%/webapps/xgate/WEB-INF/conf/access.dat
-%%T%%/webapps/xgate/WEB-INF/conf/access.dat-dist
-%%T%%/webapps/xgate/WEB-INF/conf/address.data
-%%T%%/webapps/xgate/WEB-INF/conf/address.data-dist
-%%T%%/webapps/xgate/WEB-INF/conf/address.map
-%%T%%/webapps/xgate/WEB-INF/conf/address.map-dist
-%%T%%/webapps/xgate/WEB-INF/conf/admin.ldif
-%%T%%/webapps/xgate/WEB-INF/conf/admin.ldif-dist
-%%T%%/webapps/xgate/WEB-INF/conf/admin_group.ldif
-%%T%%/webapps/xgate/WEB-INF/conf/admin_group.ldif-dist
-%%T%%/webapps/xgate/WEB-INF/conf/createuser.conf
-%%T%%/webapps/xgate/WEB-INF/conf/createuser.conf-dist
-%%T%%/webapps/xgate/WEB-INF/conf/device_match.conf
-%%T%%/webapps/xgate/WEB-INF/conf/device_match.conf-dist
-%%T%%/webapps/xgate/WEB-INF/conf/entry.data
-%%T%%/webapps/xgate/WEB-INF/conf/entry.data-dist
-%%T%%/webapps/xgate/WEB-INF/conf/extra.types
-%%T%%/webapps/xgate/WEB-INF/conf/extra.types-dist
-%%T%%/webapps/xgate/WEB-INF/conf/group.data
-%%T%%/webapps/xgate/WEB-INF/conf/group.data-dist
-%%T%%/webapps/xgate/WEB-INF/conf/group.map
-%%T%%/webapps/xgate/WEB-INF/conf/group.map-dist
+@sample %%T%%/webapps/xgate/WEB-INF/conf/access.dat.sample
+@sample %%T%%/webapps/xgate/WEB-INF/conf/address.data.sample
+@sample %%T%%/webapps/xgate/WEB-INF/conf/address.map.sample
+@sample %%T%%/webapps/xgate/WEB-INF/conf/admin.ldif.sample
+@sample %%T%%/webapps/xgate/WEB-INF/conf/admin_group.ldif.sample
+@sample %%T%%/webapps/xgate/WEB-INF/conf/createuser.conf.sample
+@sample %%T%%/webapps/xgate/WEB-INF/conf/device_match.conf.sample
+@sample %%T%%/webapps/xgate/WEB-INF/conf/entry.data.sample
+@sample %%T%%/webapps/xgate/WEB-INF/conf/extra.types.sample
+@sample %%T%%/webapps/xgate/WEB-INF/conf/group.data.sample
+@sample %%T%%/webapps/xgate/WEB-INF/conf/group.map.sample
 %%T%%/webapps/xgate/WEB-INF/conf/javacat.properties
-%%T%%/webapps/xgate/WEB-INF/conf/ldap.map
-%%T%%/webapps/xgate/WEB-INF/conf/ldap.map-dist
-%%T%%/webapps/xgate/WEB-INF/conf/log.conf
-%%T%%/webapps/xgate/WEB-INF/conf/log.conf-dist
-%%T%%/webapps/xgate/WEB-INF/conf/terminal.dat
-%%T%%/webapps/xgate/WEB-INF/conf/terminal.dat-dist
-%%T%%/webapps/xgate/WEB-INF/conf/user.data
-%%T%%/webapps/xgate/WEB-INF/conf/user.data-dist
-%%T%%/webapps/xgate/WEB-INF/conf/xgate.conf
-%%T%%/webapps/xgate/WEB-INF/conf/xgate.conf-dist
+@sample %%T%%/webapps/xgate/WEB-INF/conf/ldap.map.sample
+@sample %%T%%/webapps/xgate/WEB-INF/conf/log.conf.sample
+@sample %%T%%/webapps/xgate/WEB-INF/conf/terminal.dat.sample
+@sample %%T%%/webapps/xgate/WEB-INF/conf/user.data.sample
+@sample %%T%%/webapps/xgate/WEB-INF/conf/xgate.conf.sample
 %%T%%/webapps/xgate/WEB-INF/dhklib/CMap/78-EUC-H
 %%T%%/webapps/xgate/WEB-INF/dhklib/CMap/78-EUC-V
 %%T%%/webapps/xgate/WEB-INF/dhklib/CMap/78-H
@@ -2069,7 +2051,9 @@
 %%T%%/webapps/xgate/wml/Xmas.png
 %%T%%/webapps/xgate/wml/index.jsp
 %%T%%/webapps/xgate/wml/index_e.jsp
-@dirrmtry %%DOCSDIR%%
+@exec mkdir -p /var/log/xgate
+@owner
+@group
 @dirrm %%T%%/webapps/xgate/wml
 @dirrm %%T%%/webapps/xgate/pda/img
 @dirrm %%T%%/webapps/xgate/pda
@@ -2178,5 +2162,4 @@
 @dirrm %%T%%/webapps/xgate/WEB-INF
 @dirrm %%T%%/webapps/xgate/META-INF
 @dirrm %%T%%/webapps/xgate
-@unexec rmdir /var/log/xgate 2>/dev/null || true
-@exec install -d -o %%WWWUID%% -g %%WWWGID%% /var/log/xgate
+@unexec rm -rf /var/log/xgate 2>/dev/null || true



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406052221.s55MLiae021091>