summaryrefslogtreecommitdiff
blob: 5977b2611e281050bcea0d24bb131852fc69caed (plain)
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
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3
inherit eutils

use x86 && MY_P="${PN}-linux-x86-${PV/_p/-}"
use amd64 && MY_P="${PN}-linux-x86_64-${PV/_p/-}"

DESCRIPTION="POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange Gateway"
HOMEPAGE="http://davmail.sourceforge.net/"
SRC_URI="mirror://sourceforge/davmail/${MY_P}.tgz"
RESTRICT="mirror"

LICENSE="GPL-2"
KEYWORDS="-* ~amd64 ~x86"
IUSE="menu"

SLOT="0"

DEPEND="|| ( virtual/jre:1.6 virtual/jdk:1.6 )"
RDEPEND="${DEPEND}"

S="${WORKDIR}/${MY_P}"

src_install() {
   cd "${S}"
   # Fix the script BASE=
   sed -i -e "s@BASE=.*@BASE=/opt/davmail@" davmail.sh

   dodir "/opt/$PN"
   cp -a * "${D}/opt/$PN"
   dodir "/opt/bin"
   dosym "/opt/$PN/davmail.sh" "/opt/bin/davmail.sh"

	if use menu; then
		domenu "${FILESDIR}/davmail.desktop"
		doicon "${FILESDIR}/davmail.png"
	fi
}