aboutsummaryrefslogtreecommitdiffstats
path: root/testing/apache2-mod-sflow/APKBUILD
blob: 9bfe298c81798b5f2eeea1a23e1963b63674b87a (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
# Contributor: Florian Heigl <florian.heigl@gmail.com>
# Maintainer: Florian Heigl <florian.heigl@gmail.com>
pkgname=apache2-mod-sflow
pkgver=1.0.5
pkgrel=0
pkgdesc="Apache module to implement logging using sFlow for monitoring of large web clusters."
url="https://code.google.com/p/mod-sflow/"
arch="all"
license="InMon sFlow (http://www.inmon.com/technology/sflowlicense.txt)"
depends="apache2"
# add svn?
makedepends="apache2-dev apr-dev autoconf"
install=""
subpackages=""
source="http://dev.alpinelinux.org/archive/mod-sflow/mod-sflow-$pkgver.tar.gz"

_builddir="$srcdir"/mod-sflow-$pkgver

prepare() {
	return 0
}

snapshot() {
	cd "$srcdir"
	svn checkout http://mod-sflow.googlecode.com/svn/tags/REL-$pkgver \
		mod-sflow-$pkgver || return 1
	tar -zcf mod-sflow-$pkgver.tar.gz \
		--exclude mod-sflow-$pkgver/.svn \
		mod-sflow-$pkgver || return 1
	scp mod-sflow-$pkgver.tar.gz dev.alpinelinux.org:/archive/mod-sflow/
}

build() {
	cd "$_builddir"
	/usr/bin/apxs -Wc -c mod_sflow.c sflow_api.c
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/usr/lib/apache2 "$pkgdir"/etc/apache2/conf.d
	install -D -m755 "$_builddir"/.libs/mod_sflow.so \
		"$pkgdir"/usr/lib/apache2/mod_sflow.so || return 1

	install -d "$pkgdir"/etc/httpd/conf.d

	cat > "$pkgdir"/etc/httpd/conf.d/sflow.conf <<EOF
LoadModule sflow_module modules/mod_sflow.so

<IfModule mod_sflow.c>
  <Location /sflow>
    SetHandler sflow
  </Location>
</IfModule>
EOF
}
md5sums="0279b545f433fa8aa5f74647b6ec567f  mod-sflow-1.0.5.tar.gz"
sha256sums="5639e6953269afb418514c288614083f1a39d6f58ab8d59d98f0260cf4499673  mod-sflow-1.0.5.tar.gz"
sha512sums="66cb95364d32ca2a5cdfc84f022b14aeb8a6af2eeec899e7a2424ad64063616ff6e349fb4ecae6d6d07c5256d2187a439995c027151ce720e40fae05cbcee270  mod-sflow-1.0.5.tar.gz"