aboutsummaryrefslogtreecommitdiffstats
path: root/main/pingu/APKBUILD
blob: a470d9b942c2182fa388a4c0a5d5131aa40cc1ec (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.0
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"
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="23741d643d62b0bade8bc88576245357  pingu-1.0.tar.bz2
70f56b0f506e1c2e725d0ec062667c32  pingu.initd"