diff options
author | Tyler Langlois | 2015-08-26 20:53:56 -0400 |
---|---|---|
committer | Tyler Langlois | 2015-08-26 20:53:56 -0400 |
commit | e657f8fc96eca367162df977ba6e3065d9dbc4d4 (patch) | |
tree | 17495412c33154140d4cc821433aa36c8f5e5cd6 /PKGBUILD | |
download | aur-e657f8fc96eca367162df977ba6e3065d9dbc4d4.tar.gz |
Initial import from AUR3 with small changes
Credit to original author: https://github.com/aur-archive/ganglia-minimal.
Changes inclue using sysusers.d, defining /usr/bin use in the ./configure
step and using upstream systemd service units.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0e0a9ee11064 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,70 @@ +# Maintainer: Tyler Langlois <ty |at| tjll |dot| net> + +pkgname=ganglia-minimal +_pkgbase=${pkgname%%-minimal} +pkgver=3.7.1 +pkgrel=3 +pkgdesc="A version of the ganglia package without gmetad to reduce dependencies." +arch=('i686' 'x86_64' 'armv6h') +url="http://ganglia.sourceforge.net/" +license=('BSD') +depends=('apr' 'confuse' 'python2' 'pcre') +conflicts=('ganglia') +options=('!libtool') +install='ganglia.install' +backup=('etc/ganglia/gmond.conf') +source=("http://downloads.sourceforge.net/$_pkgbase/$_pkgbase-$pkgver.tar.gz" + 'ganglia.install' + 'ganglia.sysusers' + 'uid.patch' + 'runstatedir.patch') +sha256sums=('e735a6218986a0ff77c737e5888426b103196c12dc2d679494ca9a4269ca69a3' + '8fc88d5c6d294315cbb7eca104af115514dd89afb2bcb8cc4e462ebc0db128e2' + 'e0a14ba384d8e3685461241811cea18e5251ab5d84fd68471972540bcc542c4c' + 'dc2cdffaf0cbedbbac2e654843803423f93da494aaeecda8a185ad3badea8e21' + 'e3abe8017bf3d974e2b4ba5e285e7a91e94dbb69ec6fdf128675a8868e28c8a4') + +prepare() { + cd "$srcdir/$_pkgbase-$pkgver" + + for patch in $srcdir/*.patch; do + msg2 "Applying $(basename $patch)" + patch -Np1 -i $patch + done +} + +build() { + cd "$srcdir/$_pkgbase-$pkgver" + + ./configure --prefix=/usr \ + --sbindir=/usr/bin \ + --libdir=/usr/lib \ + --sysconfdir=/etc/ganglia \ + --enable-gexec \ + --enable-status \ + --with-python=/usr/bin/python2 \ + --with-systemdsystemunitdir=/usr/lib/systemd/system + + make +} + +package() { + cd "$srcdir/$_pkgbase-$pkgver" + + make DESTDIR="$pkgdir" install + + # Install Python modules + mkdir -p "$pkgdir/usr/lib/$_pkgbase/python_modules" + find "gmond/python_modules" -name *.py \ + -exec cp \{\} "$pkgdir/usr/lib/$_pkgbase/python_modules/" \; + cp -R "gmond/python_modules/conf.d" "$pkgdir/etc/$_pkgbase/" + + msg2 "Generating default gmond.conf" + ./gmond/gmond --default_config > "$pkgdir/etc/$_pkgbase/gmond.conf" + + install -Dm644 COPYING "$pkgdir/usr/share/licenses/${pkgname}/COPYING" + + # See man page for sysusers.d(5) + install -Dm644 "$srcdir"/ganglia.sysusers \ + "$pkgdir"/usr/lib/sysusers.d/ganglia.conf +} |