summaryrefslogtreecommitdiff
blob: 5220b68419a45039a1e2ae456c866c670b38a3be (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
42
43
44
45
46
47
48
49
50
51
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI="5"

EGIT_REPO_URI="https://github.com/freenet/plugin-Freemail-official.git"
EGIT_PROJECT="Freemail/official"
EANT_BUILD_TARGET="dist"
inherit eutils git-2 java-pkg-2 java-ant-2

DESCRIPTION="Anonymous IMAP/SMTP e-mail server over Freenet"
HOMEPAGE="https://github.com/freenet/plugin-Freemail"
SRC_URI=""

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS=""
IUSE=""

CDEPEND="dev-java/bcprov:1.38
	net-p2p/freenet"
DEPEND="${CDEPEND}
	>=virtual/jdk-1.5"
RDEPEND="${CDEPEND}
	>=virtual/jre-1.5"

EANT_GENTOO_CLASSPATH="bcprov freenet"

src_prepare() {
	epatch "${FILESDIR}"/build.patch
	java-ant_rewrite-classpath
}

src_install() {
	java-pkg_dojar dist/"${PN}.jar"
	dodir /var/freenet/plugins
	fperms freenet:freenet /var/freenet/plugins
	dodoc README || die "installation of documentation failed"
}

pkg_postinst () {
	#force chmod for previously existing plugins dir owned by root
	[[ $(stat --format="%U" /var/freenet/plugins) == "freenet" ]] || chown \
		freenet:freenet /var/freenet/plugins
	elog "To load Freemail, go to the plugin page of freenet and enter at"
	elog "Plugin-URL: /usr/share/Freemail/lib/Freemail.jar"
	elog " This should load the Freemail plugin."
	elog "Set your email client to IMAP port 3143 and SMTP port 3025 on localhost."
	elog "To bind freemail to different ports, or to a different freenet node, edit"
	elog "/var/freenet/globalconfig."
}