summaryrefslogtreecommitdiff
path: root/pcr/ganglia/PKGBUILD
blob: 94e32a21168fd707fe536e934c3860631ec8e7ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Maintainer: Márcio Silva <coadde@parabola.nu>

pkgname=ganglia
pkgver=3.6.0
pkgrel=4
pkgdesc='Scalable distributed monitoring system for high-performance computing systems such as clusters and Grids.'
arch=(
  i686
  x86_64
  mips64el
)
url=http://$pkgname.sourceforge.net/
license=BSD
depends=(
  apr
  confuse
  #php-embed
  python2
  rrdtool
)
install=$pkgname.install
options=(!libtool)
optdepends="$pkgname-web: Web frontend"
backup=(
  etc/ganglia/gmond.conf
  etc/ganglia/gmetad.conf
)
source=(
  http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
  gmetad.service.in
  gmond.service.in
)
sha512sums=(
  2a05d37787f1440c0c4aa91cdf0f4f4cb39c840b3b0fdcd6fe58cfb5892a75f81d36f6191c83c17558c37154298268df74fa255d2c940a8b84a7bf3ddb102394
  a42b7dcb7dd81961cc9fef114f8c4c352375ed931dc2ae77b1139c6fde7cbd6544fcb5fe286ff6066ef37696821dc9f6fcab7c6b14d3ebaa59e895219cd89836
  c362a383cbbaf5540b5d698f664534bd0da73bcc5ee4336c468844ed17706e05450f35e4f6cf969f1d2495c462883873b30e4575b9ee8ded74ab475afda608bb
)

prepare() {
  cd $srcdir/$pkgname-$pkgver

  #sed -i 's|sapi/embed/php_embed.h|php/sapi/embed/php_embed.h|' configure

  sed -i 's|nobody|ganglia|' gmetad/gmetad.conf.in

  # FIXME: Hopefully this will soon no longer be required?
  msg2 'Copying systemd units into source as workaround for bug'
  cp $srcdir/gmetad.service.in gmetad/gmetad.service.in
  cp $srcdir/gmond.service.in  gmond/gmond.service.in
}

build() {
  cd $srcdir/$pkgname-$pkgver
  setarch $CARCH ./configure --prefix=/usr\
    --enable-gexec\
    --enable-perl\
    --enable-setuid=ganglia\
    --enable-status\
    --disable-static\
    --libdir=/usr/lib\
    --with-gmetad\
    --with-python=/usr/bin/python2\
    --sbindir=/usr/bin\
    --sysconfdir=/etc/ganglia
#    --enable-php\
#    --enable-setgid=ganglia\
  setarch $CARCH make
}

package() {
  cd $srcdir/$pkgname-$pkgver
  setarch $CARCH make DESTDIR=$pkgdir install

  mkdir $pkgdir/usr/lib/$pkgname/python_modules

  msg2 'Generating default gmond.conf'
  ./gmond/gmond --default_config > $pkgdir/etc/ganglia/gmond.conf
}