diff --git a/srcpkgs/apache-kafka/files/apache-kafka-zookeeper/log/run b/srcpkgs/apache-kafka/files/apache-kafka-zookeeper/log/run new file mode 100644 index 00000000000..043340b6125 --- /dev/null +++ b/srcpkgs/apache-kafka/files/apache-kafka-zookeeper/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -t apache-kafka-zookeeper -p 'daemon.info' diff --git a/srcpkgs/apache-kafka/files/apache-kafka-zookeeper/run b/srcpkgs/apache-kafka/files/apache-kafka-zookeeper/run new file mode 100644 index 00000000000..1fcaf44eeb9 --- /dev/null +++ b/srcpkgs/apache-kafka/files/apache-kafka-zookeeper/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf +exec /usr/lib/kafka/bin/zookeeper-server-start.sh ${PROPERTIES_FILE:-/usr/lib/kafka/config/zookeeper.properties} diff --git a/srcpkgs/apache-kafka/files/apache-kafka.sh b/srcpkgs/apache-kafka/files/apache-kafka.sh new file mode 100644 index 00000000000..ed60441924d --- /dev/null +++ b/srcpkgs/apache-kafka/files/apache-kafka.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +export PATH=$PATH:/usr/lib/kafka/bin diff --git a/srcpkgs/apache-kafka/files/apache-kafka/log/run b/srcpkgs/apache-kafka/files/apache-kafka/log/run new file mode 100644 index 00000000000..94f6f1f9164 --- /dev/null +++ b/srcpkgs/apache-kafka/files/apache-kafka/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -t apache-kafka -p 'daemon.info' diff --git a/srcpkgs/apache-kafka/files/apache-kafka/run b/srcpkgs/apache-kafka/files/apache-kafka/run new file mode 100644 index 00000000000..7f888a35e8c --- /dev/null +++ b/srcpkgs/apache-kafka/files/apache-kafka/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf +exec /usr/lib/kafka/bin/kafka-server-start.sh ${PROPERTIES_FILE:-/usr/lib/kafka/config/server.properties} diff --git a/srcpkgs/apache-kafka/template b/srcpkgs/apache-kafka/template new file mode 100644 index 00000000000..11813e31a89 --- /dev/null +++ b/srcpkgs/apache-kafka/template @@ -0,0 +1,33 @@ +# Template file for 'apache-kafka' +pkgname=apache-kafka +version=2.3.0 +revision=1 +wrksrc="kafka-${version}-src" +hostmakedepends="gradle" +depends="virtual?java-runtime" +short_desc="Distributed Streaming Platform" +maintainer="Kyle Nusbaum " +license="Apache-2.0" +homepage="https://kafka.apache.org" +distfiles="http://apache.mirrors.ionfish.org/kafka/${version}/kafka-${version}-src.tgz" +checksum=d32cbd619e1a7fb4deae2402fa1dce56d909af19ad690c82e2d495fb5c4cfdc0 + +do_configure() { + gradle +} + +do_build() { + ./gradlew releaseTarGz +} + +do_install() { + vmkdir usr/lib/kafka + tar -xf core/build/distributions/kafka_2.12-${version}.tgz -C ${DESTDIR}/usr/lib/kafka --strip 1 + rm -Rf ${DESTDIR}/usr/lib/kafka/bin/windows + + mkdir -p ${DESTDIR}/etc/profile.d + vinstall ${FILESDIR}/apache-kafka.sh 0755 etc/profile.d/ + + vsv apache-kafka-zookeeper + vsv apache-kafka +}