updated on Thu Jan 19 00:16:31 UTC 2012
[aur-mirror.git] / davmail-svn / PKGBUILD
blob785fbbddf8992e6ca6b35af35da43057c26d2ac4
1 # Contributor: Andreas Eisele <a.e -at- lupuz.de>
2 # Original-Contributor: Hy Goldsher aka hyness <hyness-at-gmail>
3 pkgname=davmail-svn
4 _pkgname=davmail
5 pkgver=1778
6 pkgrel=1
7 pkgdesc="a POP/IMAP/SMTP/Caldav/LDAP gateway for the exchange service - SVN Version"
8 arch=('i686' 'x86_64')
9     [ "${CARCH}" = 'i686' ] && _arch='x86'
10     [ "${CARCH}" = 'x86_64' ] && _arch='x86_64'
11 url="http://davmail.sourceforge.net/"
12 license=('GPL')
13 groups=()
14 depends=('java-runtime')
15 makedepends=('subversion' 'unzip' 'apache-ant' 'java-environment=6')
16 provides=()
17 conflicts=('davmail')
18 replaces=()
19 backup=()
20 options=()
21 install=davmail.install
22 source=('davmail.install' 'davmail.desktop' 'davmail.sh')
23 noextract=()
24 md5sums=('b83b40085a4fea2de22fc53a9d6dfac4'
25          '1df37a6120d88de8df3cb735977336ba'
26          '5f7c1bb0b5a9bc69c7015715d87862ea')
28 _svntrunk=https://davmail.svn.sourceforge.net/svnroot/davmail/trunk
29 _svnmod=davmail
31 build() {
32   cd "$srcdir"
34   if [ -d $_svnmod/.svn ]; then
35     (cd $_svnmod && svn up -r $pkgver)
36   else
37     svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
38   fi
40   msg "SVN checkout done or server timeout"
41   msg "Starting make..."
43   rm -rf "$srcdir/$_svnmod-build"
44   cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
45   cd "$srcdir/$_svnmod-build"
47   #
48   # BUILD
49   #
50   ant || return 1
52   _src="$srcdir/$_svnmod-build/dist"
54   install -d $pkgdir/{usr/share/java/$_pkgname/lib,usr/bin,usr/share/applications} || return 1
55   install $_src/davmail.jar $pkgdir/usr/share/java/$_pkgname/ || return 1
56   install -D $_src/lib/swt-*-linux-${_arch}.jar $pkgdir/usr/share/java/$_pkgname/lib || return 1
57   find $_src/lib -name "*.jar" -a -not -name "swt*" -exec install -m644 '{}' $pkgdir/usr/share/java/$_pkgname/lib \; || return 1
58   install -m755 ${srcdir}/davmail.sh $pkgdir/usr/share/java/$_pkgname || return 1
59   ln -s /usr/share/java/$_pkgname/davmail.sh $pkgdir/usr/bin/davmail || return 1
60   install -Dm644 ${srcdir}/davmail.desktop ${pkgdir}/usr/share/applications/ || return 1
62   # Create icons
63   cd $_src || return 1
64   unzip -q davmail.jar tray2.png tray32.png tray48.png || return 1
65   install -Dm644 tray2.png ${pkgdir}/usr/share/icons/hicolor/16x16/apps/davmail.png || return 1
66   install -Dm644 tray32.png ${pkgdir}/usr/share/icons/hicolor/32x32/apps/davmail.png || return 1
67   install -Dm644 tray48.png ${pkgdir}/usr/share/icons/hicolor/48x48/apps/davmail.png || return 1