From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A33471394DD for ; Fri, 28 Oct 2016 12:43:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 015F5E08D2; Fri, 28 Oct 2016 12:43:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DE2B1E08D2 for ; Fri, 28 Oct 2016 12:43:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B19A3341655 for ; Fri, 28 Oct 2016 12:43:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 255D5248E for ; Fri, 28 Oct 2016 12:43:51 +0000 (UTC) From: "Patrick Lauer" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrick Lauer" Message-ID: <1477658627.289ef6b52e20da9318e2e879ad52bd61ab4d2aa7.patrick@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/kafka-bin/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/kafka-bin/kafka-bin-0.10.1.0-r1.ebuild X-VCS-Directories: net-misc/kafka-bin/ X-VCS-Committer: patrick X-VCS-Committer-Name: Patrick Lauer X-VCS-Revision: 289ef6b52e20da9318e2e879ad52bd61ab4d2aa7 X-VCS-Branch: master Date: Fri, 28 Oct 2016 12:43:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8f8be096-9023-4c7c-85c1-2f5db73ab176 X-Archives-Hash: e61e664aae77c8ca61aed0ee513d0552 commit: 289ef6b52e20da9318e2e879ad52bd61ab4d2aa7 Author: Patrick Lauer gentoo org> AuthorDate: Fri Oct 28 12:43:05 2016 +0000 Commit: Patrick Lauer gentoo org> CommitDate: Fri Oct 28 12:43:47 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=289ef6b5 net-misc/kafka-bin: Create logs directory on install to avoid automatic creation with root owner Package-Manager: portage-2.3.2 net-misc/kafka-bin/kafka-bin-0.10.1.0-r1.ebuild | 63 +++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/net-misc/kafka-bin/kafka-bin-0.10.1.0-r1.ebuild b/net-misc/kafka-bin/kafka-bin-0.10.1.0-r1.ebuild new file mode 100644 index 00000000..89d1b4b --- /dev/null +++ b/net-misc/kafka-bin/kafka-bin-0.10.1.0-r1.ebuild @@ -0,0 +1,63 @@ +# 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" || 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}" +}