summaryrefslogtreecommitdiffstats
path: root/main/pingu/APKBUILD
blob: 6ccad9a8c9b3b9442ef8d2b2c154784a6195e53f (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pingu
pkgver=1.2
pkgrel=1
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

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"