summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUltrabug <ultrabug@gentoo.org>2012-12-06 16:01:34 +0100
committerUltrabug <ultrabug@gentoo.org>2012-12-06 16:01:34 +0100
commit770cfb42771cce00cd999c936efc03b65ca128d5 (patch)
tree93d0c66b460d60e3212a48dd7877d99083f0a10d /sys-cluster
parentnew ebuild dev-java/leiningen (diff)
downloadultrabug-770cfb42771cce00cd999c936efc03b65ca128d5.tar.gz
ultrabug-770cfb42771cce00cd999c936efc03b65ca128d5.tar.bz2
ultrabug-770cfb42771cce00cd999c936efc03b65ca128d5.zip
new ebuild apache-zookeeper
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/apache-zookeeper/Manifest2
-rw-r--r--sys-cluster/apache-zookeeper/apache-zookeeper-3.4.5.ebuild71
2 files changed, 73 insertions, 0 deletions
diff --git a/sys-cluster/apache-zookeeper/Manifest b/sys-cluster/apache-zookeeper/Manifest
new file mode 100644
index 0000000..bcb8794
--- /dev/null
+++ b/sys-cluster/apache-zookeeper/Manifest
@@ -0,0 +1,2 @@
+DIST zookeeper-3.4.5.tar.gz 16402010 SHA256 e92b634e99db0414c6642f6014506cc22eefbea42cc912b57d7d0527fb7db132 SHA512 525fbb2af52c06823b6bedaefeb718df6090a3775ead06f3ff1f54b1b3cb752286f568a91b3188444cbdfe26ad8b931e0663cb08b27f23b4e83e8a3cfb6e88a7 WHIRLPOOL 344ea06625f46ef216df93e29d653e8fb0100e83e977c50b59691e30803b0e2d632ba44a1e63f2d82689ddfadba3d6aafce37cd260559185416040bc80f903fa
+EBUILD apache-zookeeper-3.4.5.ebuild 1512 SHA256 29f1a3040558630026280e9fe6db03e57b4c548b97dd746fc3a01fd755974c0c SHA512 b0e6986a58ddfbb48269bccbfb3d2237359250b5495e9a99cbf1b3c2eb6d9225a8e5cfcbe4306d1be04f036fbb302424a82713be9b2df5eb394a3cd30eeb7bdb WHIRLPOOL 20406da2e45480086d00274803ce89f33a8273333df389fae02dc383479a373dabd64fe21b45e5b62bd859c8fa42a9dc03f3083fd5e1948b4bd5a7b66f9e21f0
diff --git a/sys-cluster/apache-zookeeper/apache-zookeeper-3.4.5.ebuild b/sys-cluster/apache-zookeeper/apache-zookeeper-3.4.5.ebuild
new file mode 100644
index 0000000..ffb674a
--- /dev/null
+++ b/sys-cluster/apache-zookeeper/apache-zookeeper-3.4.5.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+
+inherit eutils java-utils-2
+
+MY_PN="${PN/apache-/}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="ZooKeeper is a high-performance coordination service for
+distributed applications."
+HOMEPAGE="http://hadoop.apache.org/"
+SRC_URI="mirror://apache/${MY_PN}/${MY_P}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+RESTRICT="mirror binchecks"
+IUSE=""
+
+DEPEND=""
+RDEPEND=">=virtual/jre-1.6"
+
+S="${WORKDIR}/${MY_P}"
+INSTALL_DIR=/opt/"${PN}"
+DATA_DIR=/var/db/"${PN}"
+export CONFIG_PROTECT="${CONFIG_PROTECT} ${INSTALL_DIR}/conf"
+
+src_install() {
+ dodir "${DATA_DIR}"
+ sed "s:^dataDir=.*:dataDir=${DATA_DIR}:" conf/zoo_sample.cfg > conf/zoo.cfg || die "sed failed"
+
+ dodir "${INSTALL_DIR}"
+ mv "${S}"/* "${D}${INSTALL_DIR}" || die "install failed"
+
+ # env file
+ cat > 99"${PN}" <<-EOF
+ PATH="${INSTALL_DIR}"/bin
+ CONFIG_PROTECT="${INSTALL_DIR}"/conf
+ EOF
+ doenvd 99"${PN}" || die "doenvd failed"
+
+ cat > "${PN}" <<-EOF
+ #!/sbin/runscript
+
+ extra_commands="restart status"
+
+ start() {
+ ${INSTALL_DIR}/bin/zkServer.sh start > /dev/null
+ }
+
+ stop() {
+ ${INSTALL_DIR}/bin/zkServer.sh stop
+ }
+
+ restart() {
+ ${INSTALL_DIR}/bin/zkServer.sh restart > /dev/null
+ }
+
+ status() {
+ ${INSTALL_DIR}/bin/zkServer.sh status
+ }
+ EOF
+ doinitd "${PN}" || die "doinitd failed"
+}
+
+pkg_postinst() {
+ elog "For info on configuration see http://hadoop.apache.org/${MY_PN}/docs/r${PV}"
+}