summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2020-04-14 19:01:17 -0500
committerMax Rees <maxcrees@me.com>2020-05-01 06:53:19 -0500
commitfe8c0a5d888110ad5015e3efff2159b999bcfea5 (patch)
tree276946517a59913accc50535202813faf0adaaeb
parentddab973f7c870f6140ed1144671a453ad3fc850d (diff)
downloadpackages-fe8c0a5d888110ad5015e3efff2159b999bcfea5.tar.gz
packages-fe8c0a5d888110ad5015e3efff2159b999bcfea5.tar.bz2
packages-fe8c0a5d888110ad5015e3efff2159b999bcfea5.tar.xz
packages-fe8c0a5d888110ad5015e3efff2159b999bcfea5.zip
user/davmail: new package
-rw-r--r--user/davmail/APKBUILD60
-rwxr-xr-xuser/davmail/davmail.sh7
2 files changed, 67 insertions, 0 deletions
diff --git a/user/davmail/APKBUILD b/user/davmail/APKBUILD
new file mode 100644
index 000000000..b65994cef
--- /dev/null
+++ b/user/davmail/APKBUILD
@@ -0,0 +1,60 @@
+# Maintainer: Max Rees <maxcrees@me.com>
+pkgname=davmail
+pkgver=5.5.1.3299
+_pkgver=${pkgver%.*}-${pkgver##*.}
+pkgrel=0
+pkgdesc="POP/IMAP/SMTP/Caldav/Carddav/LDAP proxy for Exchange/O365 servers"
+url="http://davmail.sourceforge.net/" # No HTTPS
+arch="noarch"
+options="!check" # Requires running mail servers and X11
+license="GPL-2.0+ AND MIT AND (LGPL-2.1+ or Apache-2.0) AND BSD-2-Clause AND Apache-2.0 AND LGPL-2.1 AND BSD-3-Clause AND (CDDL-1.1 OR GPL-2.0 WITH Classpath-exception-2.0)"
+depends="/bin/sh openjdk8-jre"
+makedepends="ant desktop-file-utils"
+subpackages=""
+source="https://sourceforge.net/projects/davmail/files/davmail/${pkgver%.*}/davmail-src-$_pkgver.tgz
+ davmail.sh
+ "
+builddir="$srcdir/$pkgname-src-$_pkgver"
+
+_ant() {
+ . /etc/profile.d/java.sh
+ . /etc/profile.d/ant.sh
+ ant "$@"
+}
+
+build() {
+ _ant jar
+}
+
+check() {
+ _ant test
+}
+
+package() {
+ _ant prepare-dist
+
+ install -Dm755 "$srcdir"/davmail.sh \
+ "$pkgdir"/usr/bin/davmail
+
+ rm -f dist/lib/*growl* \
+ dist/lib/*x86*.jar \
+ dist/lib/junit-*.jar \
+ dist/lib/winrun4j-*.jar
+ install -Dm644 -t "$pkgdir"/usr/lib/java/davmail/lib \
+ dist/lib/* dist/davmail.jar
+
+ desktop-file-install --dir "$pkgdir"/usr/share/applications \
+ src/desktop/davmail.desktop
+
+ for _i in 16 32 48 128; do
+ case $_i in
+ 16) _fn=src/java/tray.png;;
+ *) _fn=src/java/tray$_i.png;;
+ esac
+ install -Dm644 $_fn \
+ "$pkgdir"/usr/share/icons/hicolor/${_i}x${_i}/apps/davmail.png
+ done
+}
+
+sha512sums="0d3481f0930e09b30ae4341149b443bd92f107872d4e39dcc66e5e6c2fa6a667f9dde2c5a49bc5c96375d9e9b4b824a4211bf90a985a2cc2b1b8aa7613f02b5d davmail-src-5.5.1-3299.tgz
+e937f3bdf71cddba4678b768bc6fc87320cd2a76d324f5ef99a0248ddc989d89c25e1f0e291416acb264cb2a1dbfef6d5eeea092c95d9be3f75669d6f68d1fdd davmail.sh"
diff --git a/user/davmail/davmail.sh b/user/davmail/davmail.sh
new file mode 100755
index 000000000..17c5cd45e
--- /dev/null
+++ b/user/davmail/davmail.sh
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+# Usage: davmail [</path/to/davmail.properties>]
+
+# force GTK2 to avoid crash with OpenJDK 11
+JAVA_OPTS="-Xmx512M -Dsun.net.inetaddr.ttl=60 -Djdk.gtk.version=2.2"
+JAVA_CP="/usr/lib/java/davmail/lib/*"
+exec java $JAVA_OPTS -cp "$JAVA_CP" davmail.DavGateway "$@"