annotate sys-cluster/zookeeper/zookeeper-3.3.3.ebuild @ 333:d546b5c5e59e

bump to r15b1
author holger
date Wed, 04 Apr 2012 17:49:11 +0200
parents 0256a54aeb68
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
228
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
1 # Copyright 1999-2010 Gentoo Foundation
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
2 # Distributed under the terms of the GNU General Public License v2
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
3 # $Header: $
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
4
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
5 EAPI="2"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
6
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
7 inherit eutils java-utils-2
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
8
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
9 MY_PN="${PN/apache-/}"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
10 MY_P="${MY_PN}-${PV}"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
11
286
0256a54aeb68 bump Zookeeper to 3.3.3, fix ebuild since TLP move
holger
parents: 228
diff changeset
12 DESCRIPTION="ZooKeeper is a high-performance coordination service for distributed applications."
0256a54aeb68 bump Zookeeper to 3.3.3, fix ebuild since TLP move
holger
parents: 228
diff changeset
13 HOMEPAGE="http://zookeeper.apache.org/"
0256a54aeb68 bump Zookeeper to 3.3.3, fix ebuild since TLP move
holger
parents: 228
diff changeset
14 SRC_URI="mirror://apache/${MY_PN}/${MY_P}/${MY_P}.tar.gz"
228
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
15
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
16 LICENSE="Apache-2.0"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
17 SLOT="0"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
18 KEYWORDS="~amd64 ~x86"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
19 RESTRICT="mirror binchecks"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
20 IUSE=""
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
21
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
22 DEPEND=""
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
23 RDEPEND=">=virtual/jre-1.6"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
24
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
25 S="${WORKDIR}/${MY_P}"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
26 INSTALL_DIR=/opt/"${PN}"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
27 DATA_DIR=/var/db/"${PN}"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
28 export CONFIG_PROTECT="${CONFIG_PROTECT} ${INSTALL_DIR}/conf"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
29
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
30 src_install() {
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
31 dodir "${DATA_DIR}"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
32 sed "s:^dataDir=.*:dataDir=${DATA_DIR}:" conf/zoo_sample.cfg > conf/zoo.cfg || die "sed failed"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
33
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
34 dodir "${INSTALL_DIR}"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
35 mv "${S}"/* "${D}${INSTALL_DIR}" || die "install failed"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
36
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
37 # env file
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
38 cat > 99"${PN}" <<-EOF
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
39 PATH=${INSTALL_DIR}/bin
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
40 CONFIG_PROTECT=${INSTALL_DIR}/conf
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
41 EOF
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
42 doenvd 99"${PN}" || die "doenvd failed"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
43
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
44 cat > "${PN}" <<-EOF
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
45 #!/sbin/runscript
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
46
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
47 opts="start stop restart"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
48
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
49 start() {
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
50 ${INSTALL_DIR}/bin/zkServer.sh start > /dev/null
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
51 }
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
52
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
53 stop() {
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
54 ${INSTALL_DIR}/bin/zkServer.sh stop
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
55 }
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
56
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
57 restart() {
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
58 ${INSTALL_DIR}/bin/zkServer.sh restart > /dev/null
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
59 }
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
60
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
61 status() {
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
62 ${INSTALL_DIR}/bin/zkServer.sh status
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
63 }
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
64 EOF
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
65 doinitd "${PN}" || die "doinitd failed"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
66 }
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
67
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
68 pkg_postinst() {
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
69 elog "For info on configuration see http://hadoop.apache.org/${MY_PN}/docs/r${PV}"
a3c4bfaac1be initial import of zookeeper
holger
parents:
diff changeset
70 }