aboutsummaryrefslogtreecommitdiffstats
path: root/main/rrdtool/APKBUILD
blob: 637521538337765745eca005405ff2aca1b3c123 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=rrdtool
pkgver=1.7.2
pkgrel=2
pkgdesc="Data logging and graphing application"
url="http://www.rrdtool.org"
arch="all"
license="GPL-2.0-or-later"
depends="font-sony-misc"
makedepends="libart-lgpl-dev libpng-dev freetype-dev perl-dev cairo-dev libxml2-dev
	pango-dev lua lua-dev python2-dev py-setuptools groff
	autoconf automake libtool"
checkdepends="diffutils"
subpackages="$pkgname-dev $pkgname-doc perl-rrd:perl_rrd lua-rrd:lua_rrd py-rrd:py_rrd
	$pkgname-cached $pkgname-cgi $pkgname-utils librrd:libs"
source="http://oss.oetiker.ch/$pkgname/pub/$pkgname-$pkgver.tar.gz
	lua-install-cmod.patch
	libm-underlinking.patch
	no-posix-fallocate.patch
	dont-install-in-usr-local.patch
	rrdcached.initd
	"
options="!check" # As of 1.7.2 1/22 tests fails.

prepare() {
	cd "$builddir"
	default_prepare
	libtoolize --force && aclocal && autoconf --force && automake --add-missing
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-nls \
		--disable-tcl \
		--disable-ruby \
		--enable-rrdcgi \
		--enable-perl-site-install \
		--enable-lua-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/
}

lua_rrd() {
	depends=
	pkgdesc="Lua interface for rrdtool"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/lua "$subpkgdir"/usr/lib/
}

py_rrd() {
	depends=
	pkgdesc="Python interface for rrdtool"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

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 create,update,info utilities"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/rrdinfo \
		"$pkgdir"/usr/bin/rrdcreate \
		"$pkgdir"/usr/bin/rrdupdate \
		"$subpkgdir"/usr/bin
}

libs() {
	depends=
	default_libs
}

sha512sums="453230efc68aeb4a12842d20a9d246ba478a79c2f6bfd9693a91837c1c1136abe8af177be64fe29aa40bf84ccfce7f2f15296aefe095e89b8b62aef5a7623e29  rrdtool-1.7.2.tar.gz
904fb16b065d879d8cec95e1f4bf67f5a3ff29afc023e8ba2b5636ba1cf5213f24279f2e9179e8a1acb889eee68b0b6527803aad14fcae9c3b98afdbf9e1f89f  lua-install-cmod.patch
49c1d9a8523d9b5a3e4df8e9cc8da58490d4329e88ec12021d50db0b45c780ed465a30521f3a397c0d28bab5d5c1a3839bbe1ae062d8bc645420d16690b9797c  libm-underlinking.patch
853f21b1d4935fd25184e8ac1be683a95952237705e6f7b9072a8247d1307e38c4b31117bcdc12ce1a812d7a6ac711cebfba833ef640b01e4fff1f2b7d0018ef  no-posix-fallocate.patch
7b01d5b7c83270e0e45f3186cd0882c206173d2801678c98f1a427be1927898e602535a4cd9c808e2ab8fd393a1fb5267efae53c889c368a502a06d18cfae9aa  dont-install-in-usr-local.patch
c0c27b2c2dfa8e7ec1cb1160d2bda8d7996bbea67f4ce7779da029f583c35e5e415cf46e2a1e5cb8ed2e63d2c58a68fd7471ee6bd820db4c0f4eeeb5c252f8a3  rrdcached.initd"