summaryrefslogtreecommitdiffstats
path: root/main/pingu/APKBUILD
blob: 2aab349441e9464309db562af016f3401a24ffd6 (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pingu
pkgver=1.2
pkgrel=2
pkgdesc="Small daemon that pings hosts and executes a script when status change"
url="http://git.alpinelinux.org/cgit/pingu"
arch="all"
license="GPL"
makedepends="libev-dev lua-dev"
depends=
subpackages="$pkgname-doc lua-pingu:_lua mtu"
source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2
	0001-pingu_route-allow-default-routes-that-has-no-via-add.patch
	pingu.initd
	"

_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"
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install install-lua
	install -m644 -D pingu.conf "$pkgdir"/etc/pingu/pingu.conf
	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
}

mtu() {
	pkgdesc="Utility to detect MTU"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

_lua() {
	pkgdesc="lua module for pingu client"
	mkdir -p "$subpkgdir"/usr/lib 
	mv "$pkgdir"/usr/lib "$pkgdir"/usr/share "$subpkgdir"/usr/
}

md5sums="a874d852ae0d8e10f8c22e0008d1b529  pingu-1.2.tar.bz2
dbd6e66d4c9c694fd0436e91555bf750  0001-pingu_route-allow-default-routes-that-has-no-via-add.patch
70f56b0f506e1c2e725d0ec062667c32  pingu.initd"