diff options
author | Patrick Lauer <patrick@gentoo.org> | 2017-03-09 12:13:19 +0100 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2017-03-09 12:13:41 +0100 |
commit | 90865d97c1e5456f6c19f2900995c4d9df3c6310 (patch) | |
tree | 8f6f62134a354fcbe0dc8d39c508297ea701aced /net-misc/kafka-bin/kafka-bin-0.10.2.0.ebuild | |
parent | net-misc/quagga: revision bump (diff) | |
download | gentoo-90865d97c1e5456f6c19f2900995c4d9df3c6310.tar.gz gentoo-90865d97c1e5456f6c19f2900995c4d9df3c6310.tar.bz2 gentoo-90865d97c1e5456f6c19f2900995c4d9df3c6310.zip |
net-misc/kafka-bin: Bump
Package-Manager: Portage-2.3.4, Repoman-2.3.2
Diffstat (limited to 'net-misc/kafka-bin/kafka-bin-0.10.2.0.ebuild')
-rw-r--r-- | net-misc/kafka-bin/kafka-bin-0.10.2.0.ebuild | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/net-misc/kafka-bin/kafka-bin-0.10.2.0.ebuild b/net-misc/kafka-bin/kafka-bin-0.10.2.0.ebuild new file mode 100644 index 000000000000..e75d073295aa --- /dev/null +++ b/net-misc/kafka-bin/kafka-bin-0.10.2.0.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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" || die + sed -i -e 's:/tmp/kafka-logs:/var/lib/kafka/logs:' "config/server.properties" || die +} + +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 + keepdir "${INSTALL_DIR}/logs" + fowners -R kafka:kafka "${INSTALL_DIR}" +} |