aboutsummaryrefslogtreecommitdiffstats
path: root/main/rrdtool/APKBUILD
blob: 75f489b896e10bfe4bf1aa0d0b8ae286162fa6ee (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: Natanael Copa <ncopa@alpinelinux.org>
pkgname=rrdtool
pkgver=1.4.7
pkgrel=4
pkgdesc="Data logging and graphing application"
url="http://www.rrdtool.org"
arch="all"
license="GPL"
depends=
makedepends="libart-lgpl-dev libpng-dev freetype-dev perl-dev cairo-dev
	pango-dev lua-dev python-dev man
	autoconf automake"
subpackages="$pkgname-dev $pkgname-doc perl-rrd:perl_rrd lua-rrd:lua_rrd py-rrd:py_rrd"
source="http://oss.oetiker.ch/$pkgname/pub/$pkgname-$pkgver.tar.gz
	lua-install-cmod.patch
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--disable-tcl \
		--disable-ruby \
		--enable-rrdcgi \
		--enable-perl-site-install \
		--enable-lua-site-install \
		--enable-python-site-install \
		--with-perl-options="INSTALLDIRS=vendor" \
		|| return 1
	make || return 1 
}

package() {
	cd "$_builddir"
	export INSTALLDIRS=vendor
	make DESTDIR="$pkgdir" install || return 1
	find "$pkgdir" -name '.packlist' -delete
	find "$pkgdir" -name 'perllocal.pod' -delete
	find "$pkgdir" -name '*.la' -delete
}

dev() {
	default_dev
	mkdir -p "$subpkgdir"/usr/share/$pkgname
	mv "$pkgdir"/usr/share/$pkgname/examples "$subpkgdir"/usr/share/$pkgname/
}

perl_rrd() {
	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() {
	pkgdesc="Lua interface for rrdtool"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/lua "$subpkgdir"/usr/lib/
}

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

md5sums="ffe369d8921b4dfdeaaf43812100c38f  rrdtool-1.4.7.tar.gz
f94e916381af48dcf5687aa046b35aac  lua-install-cmod.patch"