#Maintainer: Thorsten Muehlfelder <thenktor(at)gmx.de>

pkgname=watchdog
pkgver=5.6
pkgrel=1tm
arch=x86_64
source=("http://heanet.dl.sourceforge.net/sourceforge/watchdog/watchdog-$pkgver.tar.gz" "rc.watchdog")
dotnew=('etc/watchdog.conf')
url="http://freshmeat.net/projects/watchdog"
docs=('AUTHORS' 'README' 'COPYING' 'TODO')

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (a watchdog daemon)"
"The Linux kernel can reset the system if serious problems are"
"detected. This can be implemented via special watchdog hardware, or"
"via a slightly less reliable software-only watchdog inside the kernel."
"Either way, there needs to be a daemon that tells the kernel the"
"system is working fine. If the daemon stops doing that, the system is"
"reset. watchdog is such a daemon."
)

build() {
	cd $startdir/src/${pkgname}-${pkgver}
	./configure --prefix=/usr  --libdir=/usr/lib${LIBDIRSUFFIX} --sysconfdir=/etc
	make -j3 || return 1
	make DESTDIR=$startdir/pkg/ install

	# install rc script
	cd $startdir/src/
	mkdir -p $startdir/pkg/etc/rc.d/
	install -m755 -o root -g root rc.watchdog $startdir/pkg/etc/rc.d/
}
