summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanskritFritz2016-01-31 16:42:06 +0100
committerSanskritFritz2016-01-31 16:42:06 +0100
commit89bebbfb69fa5ad4084c3bd63c4755ffb9f1a328 (patch)
tree94165ca617b3f078bf94505ff9e2c7cf4456421e
downloadaur-89bebbfb69fa5ad4084c3bd63c4755ffb9f1a328.tar.gz
Initial version.
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD49
-rw-r--r--netdata-git.install14
-rw-r--r--netdata.service10
4 files changed, 98 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..42be600a215
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+# Generated by mksrcinfo v8
+# Sun Jan 31 15:30:23 UTC 2016
+pkgbase = netdata-git
+ pkgdesc = Real-time performance monitoring, in the greatest possible detail, over the web.
+ pkgver = v0.1.r713.gc10b4e4
+ pkgrel = 1
+ url = https://github.com/firehol/netdata/wiki
+ install = netdata-git.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = libmnl
+ depends = libnetfilter_acct
+ depends = zlib
+ optdepends = nodejs: Webbox plugin
+ backup = etc/netdata/netdata.conf
+ backup = etc/netdata/charts.d.conf
+ backup = etc/netdata/apps_groups.conf
+ source = netdata::git+https://github.com/firehol/netdata
+ source = netdata.service
+ md5sums = SKIP
+ md5sums = f94703d50d019ff8693975c16b8a7fe9
+
+pkgname = netdata-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..a4a845c8142
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: SanskritFritz (gmail)
+
+pkgname=netdata-git
+_gitname=netdata
+pkgver=v0.1.r713.gc10b4e4
+pkgrel=1
+pkgdesc="Real-time performance monitoring, in the greatest possible detail, over the web."
+url="https://github.com/firehol/netdata/wiki"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('libmnl' 'libnetfilter_acct' 'zlib')
+optdepends=('nodejs: Webbox plugin')
+source=("$_gitname::git+https://github.com/firehol/netdata"
+ "netdata.service")
+backup=('etc/netdata/netdata.conf' 'etc/netdata/charts.d.conf' 'etc/netdata/apps_groups.conf')
+install="$pkgname.install"
+
+
+pkgver() {
+ cd "$_gitname"
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "$_gitname"
+
+ ./autogen.sh
+ ./configure \
+ --prefix="/usr" \
+ --sbindir="/usr/bin" \
+ --sysconfdir="/etc" \
+ --libexecdir="/usr/lib" \
+ --localstatedir="/var" \
+ --with-zlib --with-math --with-user=netdata \
+ CFLAGS="-O3"
+ make
+}
+
+package() {
+ cd "$_gitname"
+
+ make DESTDIR="$pkgdir" install
+
+ touch "$pkgdir/etc/netdata/netdata.conf"
+ install -Dm0644 "$srcdir"/netdata.service "$pkgdir"/usr/lib/systemd/system/netdata.service
+}
+
+md5sums=('SKIP'
+ 'f94703d50d019ff8693975c16b8a7fe9')
diff --git a/netdata-git.install b/netdata-git.install
new file mode 100644
index 00000000000..9d07828b9bb
--- /dev/null
+++ b/netdata-git.install
@@ -0,0 +1,14 @@
+post_install() {
+ getent group netdata > /dev/null || groupadd -r netdata
+ getent passwd netdata > /dev/null || useradd -r -g netdata -c netdata -s /usr/bin/nologin -d / netdata
+ chown netdata:netdata /var/log/netdata
+ chown netdata:netdata /var/cache/netdata
+
+ echo "Download the default config file from http://127.0.0.1:19999/netdata.conf"
+ echo "after the daemon has been started. Copy it to /etc/netdata/ and modify it."
+}
+
+pre_remove() {
+ # This removes the group 'netdata' as well:
+ userdel netdata
+}
diff --git a/netdata.service b/netdata.service
new file mode 100644
index 00000000000..c8c38770d88
--- /dev/null
+++ b/netdata.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Netdata. Real-time performance monitoring.
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/netdata
+ExecStop=/usr/bin/killall netdata
+
+[Install]
+WantedBy=multi-user.target