summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e51aa81e093362d7554a2e9a408fdf7278204ae1 (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
# Maintainer: shulhan <ms@kilabit.info>

pkgname=stackdriver-collectd
pkgver=6.1.0
pkgrel=1

pkgdesc="Stackdriver's monitoring agent based on collectd"
arch=(x86_64)
url='https://github.com/Stackdriver/collectd'
license=('MIT')
groups=()

depends=(
	'curl'
	'iptables'
	'libxml2'
	'lua'
	'systemd-libs'
	'yajl'
)
makedepends=(
	'autoconf'
	'automake'
	'bison'
	'flex'
	'gcc'
	'libtool'
	'pkg-config'
)
optdepends=(
	'mariadb-libs'
)

provides=('stackdriver-collectd')
conflicts=('collectd')

backup=('etc/collectd.conf')
source=(
	"${pkgname}-v${pkgver}.tar.gz::https://github.com/Stackdriver/collectd/archive/${pkgver}.tar.gz"
	"collectd.conf"
	"stackdriver-collectd.service"
	"stackdriver-collectd.sh"
)
md5sums=('fef6db9b22153903ed98d4c888ccc35a'
         '7a2c4528d4ff161d7ac665daedc5fb3c'
         '251922321b6d566c8f1750402e4cfd21'
         'e4da9e61c35f6d74d3d76a02eb441ff2')

prepare() {
    cd collectd-${pkgver}
    ./build.sh
}

build() {
    cd collectd-${pkgver}
    ./configure
    make
}

package() {
    cd collectd-${pkgver}

    # install binaries and libraries
    make DESTDIR="${pkgdir}/" install

    # install license file and documentation
    cd "${srcdir}/collectd-${pkgver}"
    install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}/"

    cd ${srcdir}
    install -Dm 644 collectd.conf -t "${pkgdir}/opt/collectd/etc/"
    install -Dm 644 stackdriver-collectd.service -t "${pkgdir}/usr/lib/systemd/system/"
    install -Dm 644 stackdriver-collectd.sh -t "${pkgdir}/etc/profile.d/"
}