summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Lauer <patrick@gentoo.org>2016-09-26 14:12:24 +0200
committerPatrick Lauer <patrick@gentoo.org>2016-09-26 14:14:49 +0200
commit2a2d1d4feca8c3732151697caf947e42a1c6223f (patch)
tree381d8e7b6769c7a6c28c5b7a9df837c52ae9c959 /net-misc/kafka-bin/kafka-bin-0.10.0.1.ebuild
parentsys-cluster/zookeeper-bin: Initial import. (diff)
downloadgentoo-2a2d1d4feca8c3732151697caf947e42a1c6223f.tar.gz
gentoo-2a2d1d4feca8c3732151697caf947e42a1c6223f.tar.bz2
gentoo-2a2d1d4feca8c3732151697caf947e42a1c6223f.zip
net-misc/kafka-bin: Initial commit
Based on ebuilds from lmiphay overlay, updated and tested in adjust overlay Package-Manager: portage-2.3.0
Diffstat (limited to 'net-misc/kafka-bin/kafka-bin-0.10.0.1.ebuild')
-rw-r--r--net-misc/kafka-bin/kafka-bin-0.10.0.1.ebuild62
1 files changed, 62 insertions, 0 deletions
diff --git a/net-misc/kafka-bin/kafka-bin-0.10.0.1.ebuild b/net-misc/kafka-bin/kafka-bin-0.10.0.1.ebuild
new file mode 100644
index 000000000000..7dcdb9e9a7ab
--- /dev/null
+++ b/net-misc/kafka-bin/kafka-bin-0.10.0.1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils user
+
+DESCRIPTION="A high-throughput distributed messaging system"
+HOMEPAGE="http://kafka.apache.org/"
+
+# pick recommended scala version
+SCALA_VERSION=2.11
+MY_PN="kafka"
+MY_P="${MY_PN}_${SCALA_VERSION}-${PV}"
+SRC_URI="mirror://apache/kafka/${PV}/${MY_P}.tgz"
+
+RESTRICT="mirror"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="internal-zookeeper"
+
+RDEPEND="
+ || ( virtual/jre:1.8 virtual/jre:1.7 )
+"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+INSTALL_DIR="/opt/${MY_PN}"
+
+pkg_setup() {
+ enewgroup kafka
+ enewuser kafka -1 /bin/sh /var/lib/kafka kafka
+}
+
+src_prepare() {
+ sed -i -e 's:/tmp/zookeeper:/var/lib/kafka/zookeeper:' "config/zookeeper.properties"
+ sed -i -e 's:/tmp/kafka-logs:/var/lib/kafka/logs:' "config/server.properties"
+}
+
+src_install() {
+ insinto /etc/kafka
+ doins config/zookeeper.properties config/server.properties
+ if use "internal-zookeeper"; then
+ keepdir /var/lib/kafka/zookeeper
+ newinitd "${FILESDIR}/${MY_PN}-zookeeper.init.d" "${MY_PN}-zookeeper"
+ fi
+
+ keepdir /var/lib/kafka
+ fowners -R kafka:kafka /var/lib/kafka
+
+ keepdir /var/log/kafka
+ fowners -R kafka:kafka /var/log/kafka
+
+ newinitd "${FILESDIR}/${MY_PN}.init.d" "${MY_PN}"
+
+ dodir "${INSTALL_DIR}"
+ cp -pRP bin config libs "${ED}/${INSTALL_DIR}" || die
+ fowners -R kafka:kafka "${INSTALL_DIR}"
+}