# Contributor: Natanael Copa # Maintainer: Natanael Copa 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"