diff options
author | Patrick Lauer <patrick@gentoo.org> | 2016-09-26 14:12:24 +0200 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2016-09-26 14:14:49 +0200 |
commit | 2a2d1d4feca8c3732151697caf947e42a1c6223f (patch) | |
tree | 381d8e7b6769c7a6c28c5b7a9df837c52ae9c959 /net-misc/kafka-bin | |
parent | sys-cluster/zookeeper-bin: Initial import. (diff) | |
download | gentoo-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')
-rw-r--r-- | net-misc/kafka-bin/Manifest | 1 | ||||
-rw-r--r-- | net-misc/kafka-bin/files/kafka-zookeeper.init.d | 20 | ||||
-rw-r--r-- | net-misc/kafka-bin/files/kafka.init.d | 19 | ||||
-rw-r--r-- | net-misc/kafka-bin/kafka-bin-0.10.0.1.ebuild | 62 | ||||
-rw-r--r-- | net-misc/kafka-bin/metadata.xml | 10 |
5 files changed, 112 insertions, 0 deletions
diff --git a/net-misc/kafka-bin/Manifest b/net-misc/kafka-bin/Manifest new file mode 100644 index 000000000000..1e0d2a402563 --- /dev/null +++ b/net-misc/kafka-bin/Manifest @@ -0,0 +1 @@ +DIST kafka_2.11-0.10.0.1.tgz 31831257 SHA256 2d73625aeddd827c9e92eefb3c727a78455725fbca4361c221eaa05ae1fab02d SHA512 ab89c1d0cf4e05e823f45629e7bc5778173fd7420ebfa259f566071c6b474b08abf808508c7fd6fcca2233b20e76cbf6a235563709bfa019455386f80f0b5d71 WHIRLPOOL 5928d39afdaa4b7cc3839b2555229d42ecc9b3ccd6c76cb2dfd1a7fd4f2fcb2ac9abd055b7c698b5d82232df10e10d4c2f2fd525e880a9c0ed78550e2cf2d28e diff --git a/net-misc/kafka-bin/files/kafka-zookeeper.init.d b/net-misc/kafka-bin/files/kafka-zookeeper.init.d new file mode 100644 index 000000000000..b5c87fa1de51 --- /dev/null +++ b/net-misc/kafka-bin/files/kafka-zookeeper.init.d @@ -0,0 +1,20 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +description="Zookeeper for Kafka distributed messaging system" + +logfile="/var/log/kafka-zookeeper.log" + +command="/opt/kafka/bin/zookeeper-server-start.sh" +command_args="/etc/kafka/zookeeper.properties" +start_stop_daemon_args="--chdir /opt/kafka --stdout $logfile --stderr $logfile" + +command_background=yes +pidfile=/run/kafka-zookeeper.pid + +depend() { + need net + after bootmisc +} diff --git a/net-misc/kafka-bin/files/kafka.init.d b/net-misc/kafka-bin/files/kafka.init.d new file mode 100644 index 000000000000..38943b697d10 --- /dev/null +++ b/net-misc/kafka-bin/files/kafka.init.d @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +description="Kafka distributed messaging system" + +logfile="/var/log/kafka/kafka.log" + +command="/opt/kafka/bin/kafka-server-start.sh" +command_args="/etc/kafka/server.properties" +start_stop_daemon_args="--user kafka --chdir /opt/kafka --stdout $logfile --stderr $logfile" + +command_background=yes +pidfile=/run/kafka.pid + +depend() { + after zookeeper kafka-zookeeper +} 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}" +} diff --git a/net-misc/kafka-bin/metadata.xml b/net-misc/kafka-bin/metadata.xml new file mode 100644 index 000000000000..0cd421684a02 --- /dev/null +++ b/net-misc/kafka-bin/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>patrick@gentoo.org</email> + </maintainer> + <use> + <flag name="internal-zookeeper">Use bundled local zookeeper instance</flag> + </use> +</pkgmetadata> |