summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Momcilovic2015-09-04 12:21:49 +0200
committerBoris Momcilovic2015-09-04 12:21:49 +0200
commit35509a5e5e8b95aff0efcf6740f8b9ca2bf78f4f (patch)
tree554e465a652bba2dff8e332e681ac5baa38e20b7
downloadaur-35509a5e5e8b95aff0efcf6740f8b9ca2bf78f4f.tar.gz
Initial commit
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD46
-rw-r--r--flume-ng-conf1
-rw-r--r--flume-ng.install16
-rw-r--r--flume-ng.profile1
-rw-r--r--flume-ng.service11
6 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..d9022693685
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = apache-flume-ng
+ pkgdesc = Distributed system for moving large amounts of log data.
+ pkgver = 1.6.0
+ pkgrel = 1
+ url = http://flume.apache.org
+ install = flume-ng.install
+ arch = any
+ license = Apache License
+ makedepends = java-environment
+ depends = java-environment
+ source = http://www.eu.apache.org/dist//flume/1.6.0/apache-flume-1.6.0-bin.tar.gz
+ source = flume-ng-conf
+ source = flume-ng.profile
+ source = flume-ng.service
+ md5sums = defd21ad8d2b6f28cc0a16b96f652099
+ md5sums = 26366e3056284d35cc57ea3876c738f1
+ md5sums = 9d1e8ab323df2d8dd747f27c51841c1a
+ md5sums = 06ec3866251641e056534657b3d236e3
+
+pkgname = apache-flume-ng
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..652d686968b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Boris Momcilovic <boris.momcilovic@gmail.com>
+pkgname=apache-flume-ng
+pkgver=1.6.0
+pkgrel=1
+pkgdesc='Distributed system for moving large amounts of log data.'
+arch=('any')
+url='http://flume.apache.org'
+license=('Apache License')
+depends=('java-environment')
+makedepends=('java-environment')
+install=flume-ng.install
+
+source=("http://www.eu.apache.org/dist//flume/${pkgver}/apache-flume-${pkgver}-bin.tar.gz"
+ "flume-ng-conf"
+ "flume-ng.profile"
+ "flume-ng.service")
+
+md5sums=('defd21ad8d2b6f28cc0a16b96f652099'
+ '26366e3056284d35cc57ea3876c738f1'
+ '9d1e8ab323df2d8dd747f27c51841c1a'
+ '06ec3866251641e056534657b3d236e3')
+
+package() {
+ _usr_lib=$pkgdir/usr/lib/
+
+ mkdir -p $_usr_lib
+ cp -r $srcdir/apache-flume-$pkgver-bin $_usr_lib/$pkgname-$pkgver
+ mkdir -p $_usr_lib/$pkgname-$pkgver/plugins.d
+
+ install -Dm755 ${srcdir}/apache-flume-$pkgver-bin/conf/flume-conf.properties.template ${pkgdir}/etc/flume-ng/flume.conf
+ install -Dm755 ${srcdir}/apache-flume-$pkgver-bin/conf/flume-env.sh.template ${pkgdir}/etc/flume-ng/flume-env.sh
+ install -Dm755 ${srcdir}/flume-ng.profile ${pkgdir}/etc/profile.d/flume-ng.sh
+
+ install -Dm755 ${srcdir}/flume-ng-conf ${pkgdir}/etc/conf.d/flume-ng
+ install -Dm755 ${srcdir}/flume-ng.profile ${pkgdir}/etc/profile.d/flume-ng.sh
+
+ mkdir -p $pkgdir/usr/lib/systemd/system
+ install -Dm644 ${srcdir}/flume-ng.service ${pkgdir}/usr/lib/systemd/system/
+
+ mkdir -p $pkgdir/usr/bin
+ echo -e '#!/bin/sh\n\nfor f in /etc/profile.d/*.sh\ndo\n. $f\ndone\n/usr/lib/flume-ng/bin/flume-ng "$@"' > $pkgdir/usr/bin/flume-ng
+ chmod 755 $pkgdir/usr/bin/flume-ng
+
+ cd $_usr_lib
+ ln -s $pkgname-$pkgver $pkgname
+}
diff --git a/flume-ng-conf b/flume-ng-conf
new file mode 100644
index 00000000000..deb4f0bc15a
--- /dev/null
+++ b/flume-ng-conf
@@ -0,0 +1 @@
+FLUME_HOME=/usr/lib/flume-ng
diff --git a/flume-ng.install b/flume-ng.install
new file mode 100644
index 00000000000..56dd30457a1
--- /dev/null
+++ b/flume-ng.install
@@ -0,0 +1,16 @@
+post_install() {
+ getent group flume &>/dev/null || groupadd -r flume >/dev/null
+ getent passwd flume &>/dev/null || useradd -r -g flume -d /etc/flume flume >/dev/null
+ chown -R flume:flume /etc/flume-ng
+ true
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ getent passwd flume &>/dev/null && userdel flume >/dev/null
+ getent group flume &>/dev/null && groupdel flume >/dev/null
+ true
+}
diff --git a/flume-ng.profile b/flume-ng.profile
new file mode 100644
index 00000000000..338761385a1
--- /dev/null
+++ b/flume-ng.profile
@@ -0,0 +1 @@
+. /etc/conf.d/flume-ng
diff --git a/flume-ng.service b/flume-ng.service
new file mode 100644
index 00000000000..340d0d10859
--- /dev/null
+++ b/flume-ng.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Flume NG
+
+[Service]
+EnvironmentFile=/etc/conf.d/flume-ng
+ExecStart=/usr/bin/flume-ng agent -c /etc/flume-ng -n agent -f /etc/flume-ng/flume.conf
+User=flume
+Group=flume
+
+[Install]
+WantedBy=multi-user.target