blob: 4f6a35a97f354d24f5e3dd7186ea1606ac6add7b (
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
45
46
47
48
49
50
51
52
53
|
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/watchdog/watchdog-5.2.4.ebuild,v 1.3 2004/08/23 15:36:37 vapier Exp $
inherit eutils
DESCRIPTION="A software watchdog"
HOMEPAGE="http://www.ibiblio.org/pub/Linux/system/daemons/watchdog/"
SRC_URI="mirror://debian/pool/main/w/watchdog/${PN}_${PV}.orig.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~arm ~amd64"
IUSE=""
DEPEND="virtual/libc"
S=${WORKDIR}/${P}.orig
src_unpack() {
unpack ${A}
cd ${S}
epatch ${FILESDIR}/${PV}-sundries.patch
[ "${PORTAGE_LIBC}" == "uclibc" ] && epatch ${FILESDIR}/${PV}-uclibc.patch
}
src_compile() {
econf \
--sysconfdir=/etc/watchdog \
--with-configfile=/etc/watchdog/watchdog.conf \
|| die "econf failed"
emake || die
}
src_install() {
dodir /etc/watchdog
make DESTDIR="${D}" install || die
exeinto /etc/init.d
doexe ${FILESDIR}/watchdog
insinto /etc/conf.d
newins ${FILESDIR}/watchdog.conf.d watchdog
}
pkg_postinst() {
einfo "To enable the start-up script run \"rc-update add watchdog boot\"."
if [ ! -e ${ROOT}/dev/watchdog ]
then
ewarn "No /dev/watchdog found! Make sure your kernel has watchdog support"
ewarn "compiled in or the kernel module is loaded. The watchdog service"
ewarn "will not start at boot until your kernel is configured properly."
fi
}
|