aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Healy <lmiphay@gmail.com>2015-09-08 18:23:32 +0100
committerPaul Healy <lmiphay@gmail.com>2015-09-08 18:23:32 +0100
commitd5968202db56546e402d6147b7703197f8acfa30 (patch)
treeae548be8548e2efc2a83514ab1123566b009f508 /net-misc
parentadd screen as a dependancy (diff)
downloadlmiphay-d5968202db56546e402d6147b7703197f8acfa30.tar.gz
lmiphay-d5968202db56546e402d6147b7703197f8acfa30.tar.bz2
lmiphay-d5968202db56546e402d6147b7703197f8acfa30.zip
add ebuild for kafka
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/kafka-bin/Manifest4
-rwxr-xr-xnet-misc/kafka-bin/files/kafka-zookeeper.init.d21
-rwxr-xr-xnet-misc/kafka-bin/files/kafka.init.d20
-rw-r--r--net-misc/kafka-bin/kafka-bin-0.8.2.1.ebuild49
4 files changed, 94 insertions, 0 deletions
diff --git a/net-misc/kafka-bin/Manifest b/net-misc/kafka-bin/Manifest
new file mode 100644
index 0000000..b9d8b2c
--- /dev/null
+++ b/net-misc/kafka-bin/Manifest
@@ -0,0 +1,4 @@
+AUX kafka-zookeeper.init.d 550 SHA256 88ed0c0fcd4f464c27794b3911b4f7d0b3fa901d74cbd1073b168b1d2d5342b0 SHA512 2a08e8cc02e97d10a1bac2772b280620471a63a6918af0f3266d5203ce0e7eeb45af57bd6a170ccd382cfff6f7d3b490c6dcccd264c978b7853b4e3871a7a2d9 WHIRLPOOL 0c42b5c32c7e98c1a2f825010366972fbb037142836e3576dc0e49d590d721ce910a75370e9659c052697401fe63f836c0f1c9b4aa13ad96d2fd50127e07b1b7
+AUX kafka.init.d 492 SHA256 b474e01beb7f98606461c9bc6fcc9bbd3b12d5a006d467d9f433613946b2e0f9 SHA512 e1e82a21f3514c16979a5efdbee9a7d25beec1f7c8e83a12f836e4208f085d425ba3a98fd7eb19685ac6dfc45c108fcc5782c71fa42b47b45eaab4547ebae165 WHIRLPOOL 9b378aea23a1b3ec25e406b161a97844523636c4b1937fb251a383df185bb7ab1abf6a64cf190605a433620e20076cf17cb384cedf6ca4330cdf50e5235a1e67
+DIST kafka_2.10-0.8.2.1.tgz 16162559 SHA256 89ede9ae0f51f7163c4140d8ab43fcedf8eb3066bb8058f3d97f75e9868899ce SHA512 48d73a18eae615a5aeb52b1158fd9a4bb96b7a3c50fe52599ffb88586f10c422c2f0078958cafe1c63518970f1e3984fc70c95a3b2896514d9d02eb7e119aef8 WHIRLPOOL 9dc56229023c667d98ebc33a607914f9685be3aabe3ebdda84f1c6be1eab3eaa9a4742b4ed42ed022e5ffdf76f63a6a0b88ade1cecf5123eb5811b4852afe8f3
+EBUILD kafka-bin-0.8.2.1.ebuild 1099 SHA256 96f38ee5f054c8fdd5f7fe0657a629d889207493f73be796c4ea6c2b6f9d728e SHA512 98bf2b2591eae4143e2af40b199ab2e6597692dc4afde173ed5c7c1f6863d8ae974618c6f6d32ba74aed0d49add9f6a24d5f62a87c97a2c3e0569318e2a6318a WHIRLPOOL 591b3aea8d883d26945b304f8c4043a773411bf9d585f30f162ad1d16ab659c185e42b118cdc9b064c14d9578a0a75a6030b02c306b2312d8f04b1ba96323c52
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 100755
index 0000000..3fe310e
--- /dev/null
+++ b/net-misc/kafka-bin/files/kafka-zookeeper.init.d
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 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
+ provide kafka-zookeeper
+}
diff --git a/net-misc/kafka-bin/files/kafka.init.d b/net-misc/kafka-bin/files/kafka.init.d
new file mode 100755
index 0000000..3bed401
--- /dev/null
+++ b/net-misc/kafka-bin/files/kafka.init.d
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+description="Kafka distributed messaging system"
+
+logfile="/var/log/kafka.log"
+
+command="/opt/kafka/bin/kafka-server-start.sh"
+command_args="/etc/kafka/server.properties"
+start_stop_daemon_args="--chdir /opt/kafka --stdout $logfile --stderr $logfile"
+
+command_background=yes
+pidfile=/run/kafka.pid
+
+depend() {
+ need kafka-zookeeper
+ provide kafka
+}
diff --git a/net-misc/kafka-bin/kafka-bin-0.8.2.1.ebuild b/net-misc/kafka-bin/kafka-bin-0.8.2.1.ebuild
new file mode 100644
index 0000000..d3c4890
--- /dev/null
+++ b/net-misc/kafka-bin/kafka-bin-0.8.2.1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 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.10
+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=""
+
+RDEPEND="
+ >=virtual/jdk-1.7.0
+"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+INSTALL_DIR="/opt/${MY_PN}"
+
+src_prepare() {
+ sed -i -e 's:/tmp/zookeeper:/var/kafka/zookeeper:' "config/zookeeper.properties"
+ sed -i -e 's:/tmp/kafka-logs:/var/kafka/logs:' "config/server.properties"
+}
+
+src_install() {
+ insinto /etc/kafka
+ doins config/zookeeper.properties config/server.properties
+
+ keepdir /var/kafka/zookeeper
+
+ newinitd "${FILESDIR}/${MY_PN}.init.d" "${MY_PN}"
+ newinitd "${FILESDIR}/${MY_PN}-zookeeper.init.d" "${MY_PN}-zookeeper"
+
+ dodir "${INSTALL_DIR}"
+ cp -pRP bin config libs "${ED}/${INSTALL_DIR}" || die
+}