diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-07-25 05:35:20 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-07-25 05:35:20 -0500 |
commit | 6df81be24df30216dbe8642b067d62c01c683ba1 (patch) | |
tree | 80b86790dea644c27ca157526893d0c92fa1dca2 /user | |
parent | 01a93eab1836ce9ec64288b2f68ed9681ca6cf2a (diff) | |
download | packages-6df81be24df30216dbe8642b067d62c01c683ba1.tar.gz packages-6df81be24df30216dbe8642b067d62c01c683ba1.tar.bz2 packages-6df81be24df30216dbe8642b067d62c01c683ba1.tar.xz packages-6df81be24df30216dbe8642b067d62c01c683ba1.zip |
user/rrdtool: pull in, bump to 1.7.0, modernise
Diffstat (limited to 'user')
-rw-r--r-- | user/rrdtool/APKBUILD | 90 | ||||
-rw-r--r-- | user/rrdtool/no-posix-fallocate.patch | 12 | ||||
-rw-r--r-- | user/rrdtool/rrdcached.initd | 17 |
3 files changed, 119 insertions, 0 deletions
diff --git a/user/rrdtool/APKBUILD b/user/rrdtool/APKBUILD new file mode 100644 index 000000000..d80d885df --- /dev/null +++ b/user/rrdtool/APKBUILD @@ -0,0 +1,90 @@ +# Contributor: Valery Kartel <valery.kartel@gmail.com> +# Maintainer: +pkgname=rrdtool +pkgver=1.7.0 +pkgrel=0 +pkgdesc="Data logging and graphing application" +url="https://oss.oetiker.ch/rrdtool/" +arch="all" +options="!check" # Tests fail because of CET time zone begin date changing. +license="GPL-2.0+" +depends="font-sony-misc" +makedepends="cairo-dev freetype-dev groff libart-lgpl-dev libpng-dev + libxml2-dev pango-dev perl-dev" +subpackages="$pkgname-dev $pkgname-doc $pkgname-lang perl-rrd:perl_rrd + $pkgname-cached $pkgname-cgi $pkgname-utils librrd:libs" +source="https://oss.oetiker.ch/$pkgname/pub/$pkgname-$pkgver.tar.gz + rrdcached.initd + " + +build() { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --disable-tcl \ + --disable-ruby \ + --enable-rrdcgi \ + --enable-perl-site-install \ + --with-perl-options="INSTALLDIRS=vendor" + make +} + +check() { + cd "$builddir" + make check +} + +package() { + cd "$builddir" + export INSTALLDIRS=vendor + make DESTDIR="$pkgdir" install + find "$pkgdir" -name '.packlist' -delete + find "$pkgdir" -name 'perllocal.pod' -delete +} + +dev() { + default_dev + mkdir -p "$subpkgdir"/usr/share/$pkgname + mv "$pkgdir"/usr/share/$pkgname/examples "$subpkgdir"/usr/share/$pkgname/ +} + +perl_rrd() { + depends= + pkgdesc="Perl interface for rrdtool" + mkdir -p "$subpkgdir"/usr/lib \ + "$pkgdir"/usr/share + mv "$pkgdir"/usr/lib/perl* "$subpkgdir"/usr/lib/ + mv "$pkgdir"/usr/share/perl* "$subpkgdir"/usr/share/ +} + +cached() { + depends= + pkgdesc="RRDtool data caching daemon" + mkdir -p "$subpkgdir"/usr/sbin \ + "$subpkgdir"/var/lib/rrdcached/db \ + "$subpkgdir"/var/lib/rrdcached/journal + mv "$pkgdir"/usr/bin/rrdcached "$subpkgdir"/usr/sbin + install -Dm755 "$srcdir"/rrdcached.initd "$subpkgdir"/etc/init.d/rrdcached +} + +cgi() { + depends= + pkgdesc="Create web pages containing RRD graphs based on templates" + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/rrdcgi "$subpkgdir"/usr/bin +} + +utils() { + depends= + pkgdesc="RRDtool standalone utilities" + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/rrdinfo \ + "$pkgdir"/usr/bin/rrdcreate \ + "$pkgdir"/usr/bin/rrdupdate \ + "$subpkgdir"/usr/bin +} + +sha512sums="36d979561601135d74622eaf183701de15cba5e25118f7a308926a695ba84ecb33c3d16511bf4bc80cff055853e2eb85065bc4ed8aef19fc0277c6430ecd319f rrdtool-1.7.0.tar.gz +c0c27b2c2dfa8e7ec1cb1160d2bda8d7996bbea67f4ce7779da029f583c35e5e415cf46e2a1e5cb8ed2e63d2c58a68fd7471ee6bd820db4c0f4eeeb5c252f8a3 rrdcached.initd" diff --git a/user/rrdtool/no-posix-fallocate.patch b/user/rrdtool/no-posix-fallocate.patch new file mode 100644 index 000000000..c34c5a187 --- /dev/null +++ b/user/rrdtool/no-posix-fallocate.patch @@ -0,0 +1,12 @@ +--- rrdtool-1.4.8.orig/configure.ac ++++ rrdtool-1.4.8/configure.ac +@@ -280,9 +280,6 @@ + #include <fcntl.h>]) + AC_CHECK_FUNCS(posix_fadvise) + +-dnl can we use posix_fallocate +-AC_CHECK_FUNCS(posix_fallocate) +- + CONFIGURE_PART(Libintl Processing) + + AM_GNU_GETTEXT_VERSION(0.17) diff --git a/user/rrdtool/rrdcached.initd b/user/rrdtool/rrdcached.initd new file mode 100644 index 000000000..6459d1ff9 --- /dev/null +++ b/user/rrdtool/rrdcached.initd @@ -0,0 +1,17 @@ +#!/sbin/openrc-run + +description="RRDtool data caching daemon" +pidfile=${pidfile:-/run/rrdcached/rrdcached.pid} +socket=${socket:-unix:/run/rrdcached/rrdcached.sock} +command="/usr/sbin/rrdcached" +command_args="-l $socket -j /var/lib/rrdcached/journal/ -F -b /var/lib/rrdcached/db/ -B -p $pidfile" +start_stop_daemon_args="--quiet" + +depend() { + need localmount net + use logger +} + +start_pre() { + checkpath --directory ${pidfile%/*} +} |