summaryrefslogtreecommitdiffstats
path: root/main/pingu/APKBUILD
blob: 023d2eb2b3dc4fe5d6ab81354f1865d68dbb5535 (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pingu
pkgver=1.1
pkgrel=0
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
	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="0732926c3ee689598656811b348a2bcb  pingu-1.1.tar.bz2
70f56b0f506e1c2e725d0ec062667c32  pingu.initd"