# $Id: PKGBUILD 39400 2009-05-16 01:59:03Z thomas $ # Maintainer: Thomas Bächler pkgname=watchdog pkgver=5.6 pkgrel=1 pkgdesc="Watchdog daemon" arch=(i686 x86_64) url="http://sourceforge.net/projects/watchdog" license=('GPL') depends=('glibc') backup=(etc/watchdog.conf etc/conf.d/watchdog etc/conf.d/wd_keepalive) source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz watchdog.sh watchdog.cf) md5sums=('6df285569dd1d85528b983c98c9b2b7c' '854451f554718b55186599faaa8d85f6' '01c1e2e13f515131180b4ebe9b8b7cc3') build() { cd "${srcdir}/${pkgname}-${pkgver}" ./configure \ --prefix=/usr \ --mandir=/usr/share/man \ --sysconfdir=/etc \ --localstatedir=/var make || return 1 make install DESTDIR=${pkgdir} || return 1 for fil in watchdog wd_keepalive ; do install -D -m755 ${srcdir}/watchdog.sh ${pkgdir}/etc/rc.d/${fil} || return 1 install -D -m644 ${srcdir}/watchdog.cf ${pkgdir}/etc/conf.d/${fil} || return 1 done sed -i 's/watchdog/wd_keepalive/g' ${pkgdir}/etc/rc.d/wd_keepalive || return 1 sed -i 's/watchdog/wd_keepalive/g' ${pkgdir}/etc/conf.d/wd_keepalive || return 1 sed -i 's/Watchdog/Simple Watchdog/' ${pkgdir}/etc/rc.d/wd_keepalive || return 1 }