diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2011-03-09 14:01:48 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2011-03-09 14:01:48 +0000 |
commit | c50557d2c282bb70bb21f9e85ed1dbc4ae04deb1 (patch) | |
tree | 005b782e3096d4b0744bc2dc435b8522634e5a1c /mail/davmail | |
parent | 48a9b928d7c3fefa5713273b8f40978659fbe58e (diff) | |
download | ports-c50557d2c282bb70bb21f9e85ed1dbc4ae04deb1.tar.gz ports-c50557d2c282bb70bb21f9e85ed1dbc4ae04deb1.zip |
Notes
Diffstat (limited to 'mail/davmail')
-rw-r--r-- | mail/davmail/Makefile | 30 | ||||
-rw-r--r-- | mail/davmail/distinfo | 4 | ||||
-rw-r--r-- | mail/davmail/files/davmail.in | 43 | ||||
-rw-r--r-- | mail/davmail/files/davmail.properties.sample | 34 | ||||
-rw-r--r-- | mail/davmail/files/davmail.sh.in | 5 | ||||
-rw-r--r-- | mail/davmail/pkg-plist | 3 |
6 files changed, 104 insertions, 15 deletions
diff --git a/mail/davmail/Makefile b/mail/davmail/Makefile index fff8d516bf71..a12af19e9fa1 100644 --- a/mail/davmail/Makefile +++ b/mail/davmail/Makefile @@ -1,4 +1,4 @@ -# New ports collection makefile for: davmail +# New ports collection Makefile for: davmail # Date created: 28 Oct 2010 # Whom: John Prather # @@ -6,10 +6,10 @@ # PORTNAME= davmail -PORTVERSION= 3.8.7 +PORTVERSION= 3.9.0 CATEGORIES= mail java MASTER_SITES= SF/davmail/davmail/${PORTVERSION} -DISTNAME= ${PORTNAME}-src-${PORTVERSION}-1558 +DISTNAME= ${PORTNAME}-src-${PORTVERSION}-1630 EXTRACT_SUFX= .tgz MAINTAINER= john.c.prather@gmail.com @@ -23,16 +23,16 @@ JAVA_VERSION= 1.6+ DATADIR= ${JAVASHAREDIR}/${PORTNAME} -post-build: - ${CP} ${FILESDIR}/davmail.sh.in ${WRKDIR}/davmail.sh - ${REINPLACE_CMD} -e "s|%BASE%|${DATADIR}|" \ - -e "s|%JAVASHAREDIR%|${JAVASHAREDIR}|" \ - ${WRKDIR}/davmail.sh +USE_RC_SUBR= davmail +SUB_FILES= davmail.sh +SUB_LIST= JAVASHAREDIR=${JAVASHAREDIR} \ + JAVAJARDIR=${JAVAJARDIR} \ + PORTNAME=${PORTNAME} do-install: - cd ${WRKSRC}/dist && ${FIND} . -type d \ + @cd ${WRKSRC}/dist && ${FIND} . -type d \ -exec ${MKDIR} ${DATADIR}/\{} \; - cd ${WRKSRC}/dist && ${FIND} . -type f \ + @cd ${WRKSRC}/dist && ${FIND} . -type f \ -not -name "*.deb" \ -not -name "*.tgz" \ -not -name "*.exe" \ @@ -41,6 +41,14 @@ do-install: -not -name "*.war" \ -not -name "*.rpm" \ -exec ${INSTALL_DATA} \{} ${DATADIR}/\{} \; - ${INSTALL_SCRIPT} ${WRKDIR}/davmail.sh ${PREFIX}/bin/davmail + @@${INSTALL_SCRIPT} ${WRKDIR}/davmail.sh ${PREFIX}/bin/davmail + @@${INSTALL_DATA} ${FILESDIR}/davmail.properties.sample \ + ${PREFIX}/etc + +post-install: + @if [ ! -f ${PREFIX}/etc/davmail.properties ]; then \ + ${CP} -p ${PREFIX}/etc/davmail.properties.sample \ + ${PREFIX}/etc/davmail.properties ; \ + fi .include <bsd.port.mk> diff --git a/mail/davmail/distinfo b/mail/davmail/distinfo index db1540f1d3ee..44028b63ec64 100644 --- a/mail/davmail/distinfo +++ b/mail/davmail/distinfo @@ -1,2 +1,2 @@ -SHA256 (davmail-src-3.8.7-1558.tgz) = a44b5355de0af0bc524d81209eb079545a7dd523262a54216db21615aa65136f -SIZE (davmail-src-3.8.7-1558.tgz) = 17231662 +SHA256 (davmail-src-3.9.0-1630.tgz) = 970c041881a16cc4d2f79b04d2ad083ca84040b5ca2fa679b5d6add352c1681e +SIZE (davmail-src-3.9.0-1630.tgz) = 17293146 diff --git a/mail/davmail/files/davmail.in b/mail/davmail/files/davmail.in new file mode 100644 index 000000000000..ae25f9037b83 --- /dev/null +++ b/mail/davmail/files/davmail.in @@ -0,0 +1,43 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: %%PORTNAME%% +# REQUIRE: LOGIN +# +# Add the following lines to /etc/rc.conf or /etc/rc.conf.local to +# enable %%PORTNAME%%: +# %%PORTNAME%%_enable (bool): Set to "NO" by default. +# %%PORTNAME%%_config (path): Set to +# "%%PREFIX%%/etc/%%PORTNAME%%.properties" +# by default + +. /etc/rc.subr + +name="%%PORTNAME%%" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${%%PORTNAME%%_enable="NO"} +: ${%%PORTNAME%%_config="%%PREFIX%%/etc/%%PORTNAME%%.properties"} + +start_cmd="${name}_start" + +procname="java" +pidfile="/var/run/%%PORTNAME%%.pid" +required_files=${%%PORTNAME%%_config} + +%%PORTNAME%%_start() +{ + if [ -z "$rc_fast" -a -n "$rc_pid" ]; then + echo 1>&2 "${name} already running? (pid=$rc_pid)." + return 1 + fi + echo "Starting ${name}." + for i in %%DATADIR%%/lib/*; do export CLASSPATH=$CLASSPATH:$i; done + java -cp %%DATADIR%%/%%PORTNAME%%.jar:$CLASSPATH:%%JAVAJARDIR%%/swt.jar %%PORTNAME%%.DavGateway ${davmail_config} >> /var/log/%%PORTNAME%%-error.log 2>&1 & + echo -n $! > ${pidfile} +} + +run_rc_command "$1" diff --git a/mail/davmail/files/davmail.properties.sample b/mail/davmail/files/davmail.properties.sample new file mode 100644 index 000000000000..112100078654 --- /dev/null +++ b/mail/davmail/files/davmail.properties.sample @@ -0,0 +1,34 @@ +# Sample davmail properties file +# +# $FreeBSD$ +# +davmail.url=https://--your-exchange-server-uri--/owa +davmail.popPort=1110 +davmail.imapPort=1143 +davmail.smtpPort=1025 +davmail.caldavPort=1080 +davmail.ldapPort=1389 +davmail.keepDelay=30 +davmail.sentKeepDelay=90 +davmail.caldavPastDelay=90 +davmail.imapIdleDelay= +davmail.useSystemProxies=false +davmail.enableProxy=false +davmail.proxyHost= +davmail.proxyPort= +davmail.proxyUser= +davmail.proxyPassword= +davmail.ssl.keystoreType=JKS +davmail.ssl.keyPass= +davmail.ssl.keystoreFile= +davmail.ssl.keystorePass= +davmail.server=true +davmail.server.certificate.hash= +davmail.bindAddress= +davmail.allowRemote=true +davmail.disableUpdateCheck=false +log4j.rootLogger=WARN +log4j.logger.davmail=DEBUG +log4j.logger.org.apache.commons.httpclient=WARN +log4j.logger.httpclient.wire=WARN +davmail.logFilePath=/var/log/davmail.log diff --git a/mail/davmail/files/davmail.sh.in b/mail/davmail/files/davmail.sh.in index 5bbd9bd3fb83..4677bc908da7 100644 --- a/mail/davmail/files/davmail.sh.in +++ b/mail/davmail/files/davmail.sh.in @@ -1,4 +1,5 @@ #!/bin/sh -BASE="%BASE%" +# $FreeBSD$ +BASE="%%DATADIR%%" for i in $BASE/lib/*; do export CLASSPATH=$CLASSPATH:$i; done -java -cp $BASE/davmail.jar:$CLASSPATH:%JAVASHAREDIR%/classes/swt.jar davmail.DavGateway $1 +java -cp $BASE/davmail.jar:$CLASSPATH:%%JAVASHAREDIR%%/classes/swt.jar davmail.DavGateway $1 diff --git a/mail/davmail/pkg-plist b/mail/davmail/pkg-plist index a3e506941a8e..0d65bc9583e8 100644 --- a/mail/davmail/pkg-plist +++ b/mail/davmail/pkg-plist @@ -1,4 +1,7 @@ bin/davmail +@unexec if cmp -s %D/etc/davmail.properties.sample %D/etc/davmail.properties; then rm -f %D/etc/davmail.properties ; fi +etc/davmail.properties.sample +@exec if [ ! -f %D/etc/davmail.properties ] ; then cp -p %D/%F %B/davmail.properties; fi %%JAVASHAREDIR%%/davmail/lib/slf4j-log4j12-1.3.1.jar %%JAVASHAREDIR%%/davmail/lib/log4j-1.2.15.jar %%JAVASHAREDIR%%/davmail/lib/commons-collections-3.1.jar |