summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD32
-rw-r--r--nifi.install10
-rw-r--r--nifi.service13
4 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..d8144dd8d3a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+# Generated by mksrcinfo v8
+# Sat Oct 28 00:49:08 UTC 2017
+pkgbase = nifi
+ pkgdesc = An easy to use, powerful, and reliable system to process and distribute data.
+ pkgver = 1.4.0
+ pkgrel = 1
+ url = https://nifi.apache.org/
+ install = nifi.install
+ arch = x86_64
+ license = Apache
+ depends = java-runtime>=8
+ source = http://mirrors.gigenet.com/apache/nifi/1.4.0/nifi-1.4.0-bin.tar.gz
+ source = nifi.service
+ source = nifi.install
+ sha256sums = d67c90deb50ed5fee44e7ebf61fbf870f2e97cf1c82ad0f598ff5c4ef905ce99
+ sha256sums = f4ee42958c0f2cd67bba472f96f99b6e8ad06b38222e8ec888c33c92b3f95ec2
+ sha256sums = 20888fc83333b81a90a227cfc6b1517b36b7312f5018bfdb5868caf4197c95a2
+
+pkgname = nifi
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..d8f389daf03
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Contributor: tuftedocelot@fastmail.fm
+
+pkgname=nifi
+pkgver=1.4.0
+pkgrel=1
+pkgdesc='An easy to use, powerful, and reliable system to process and distribute data.'
+arch=(x86_64)
+url='https://nifi.apache.org/'
+license=(Apache)
+depends=('java-runtime>=8')
+install=${pkgname}.install
+source=(
+ "http://mirrors.gigenet.com/apache/$pkgname/$pkgver/$pkgname-$pkgver-bin.tar.gz"
+ 'nifi.service'
+ 'nifi.install'
+)
+sha256sums=('d67c90deb50ed5fee44e7ebf61fbf870f2e97cf1c82ad0f598ff5c4ef905ce99'
+ 'f4ee42958c0f2cd67bba472f96f99b6e8ad06b38222e8ec888c33c92b3f95ec2'
+ '20888fc83333b81a90a227cfc6b1517b36b7312f5018bfdb5868caf4197c95a2')
+
+package() {
+ mkdir -p "$pkgdir/opt/nifi"
+ mkdir -p "$pkgdir/usr/share/doc/$pkgname"
+ cp -r "$srcdir/$pkgname-$pkgver/docs/." "$pkgdir/usr/share/doc/$pkgname/"
+ cp -r "$srcdir/$pkgname-$pkgver/." "$pkgdir/opt/nifi/"
+ chmod 0755 "$pkgdir/opt/nifi/bin/nifi.sh"
+ chmod 0755 "$pkgdir/opt/nifi/bin/nifi-env.sh"
+ sed -i "s/run.as=/run.as=nifi/g" "$pkgdir/opt/$pkgname/conf/bootstrap.conf"
+ install -Dm 644 "nifi.service" "$pkgdir/usr/lib/systemd/system/nifi.service"
+ install -Dm 644 "$srcdir/$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm 644 "$srcdir/$pkgname-$pkgver/README" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/nifi.install b/nifi.install
new file mode 100644
index 00000000000..4bc8ad1ff47
--- /dev/null
+++ b/nifi.install
@@ -0,0 +1,10 @@
+post_install() {
+ if ! getent passwd nifi > /dev/null; then
+ useradd -M -c 'nifi user' -s /usr/bin/nologin nifi
+ passwd -l nifi > /dev/null
+ fi
+
+ chown -R nifi:nifi /opt/nifi
+
+ echo "==> Installed nifi user"
+} \ No newline at end of file
diff --git a/nifi.service b/nifi.service
new file mode 100644
index 00000000000..298157ee3c4
--- /dev/null
+++ b/nifi.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Apache Nifi
+After=network.target
+
+[Service]
+Type=forking
+Restart=always
+User=nifi
+ExecStart=/opt/nifi/bin/nifi.sh start
+ExecStop=/opt/nifi/bin/nifi.sh stop
+
+[Install]
+WantedBy=multi-user.target \ No newline at end of file