summaryrefslogtreecommitdiff
blob: 1011fae163233df3bf84525baef0b8aac3ad39d3 (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
52
53
54
55
56
57
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils

DESCRIPTION="Jetty is an full-featured web and applicaction server implemented entirely in Java."
HOMEPAGE="http://www.mortbay.org/jetty-6/"
SRC_URI="http://dist.codehaus.org/jetty/${P}/${P}.zip"
LICENSE="Apache-2.0"
SLOT="6"
KEYWORDS="~amd64 ~x86"
IUSE=""
DEPEND=">=virtual/jdk-1.5
	app-arch/unzip
	dev-java/java-config"
RDEPEND=">=virtual/jdk-1.5"

JETTY_HOME="/opt/jetty"

pkg_setup() {
	enewgroup jetty
	enewuser jetty -1 /bin/bash ${JETTY_HOME} jetty
}

src_compile() {
	return
}

src_install() {
	newinitd "${FILESDIR}"/jetty.initd jetty
	newconfd "${FILESDIR}"/jetty.confd jetty

	insinto /etc/jetty
	doins "${FILESDIR}"/jetty.xml
	doins "${FILESDIR}"/jetty.conf
	keepdir /etc/jetty/contexts

	dodir ${JETTY_HOME}
	dosym /etc/jetty ${JETTY_HOME}/etc

	insinto ${JETTY_HOME}
	doins start.jar
	doins -r lib
	doins -r resources

	exeinto ${JETTY_HOME}/bin
	doexe bin/jetty.sh

	fowners -R jetty:jetty ${JETTY_HOME}

	keepdir /var/log/jetty
	fowners jetty:jetty /var/log/jetty

	keepdir /var/run/jetty
	fowners jetty:jetty /var/run/jetty
}