summaryrefslogtreecommitdiff
blob: 985d35585d933bdf61fa6e7391bbc081b4f46122 (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
54
55
56
57
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Achim Gottinger <achim@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/nut-0.44.0-r1.ebuild,v 1.3 2000/09/15 20:09:13 drobbins Exp $

P=nut-0.44.0
A=${P}.tar.gz
S=${WORKDIR}/${P}
DESCRIPTION="Network-UPS Tools"
SRC_URI="http://www.exploits.org/nut/release/"${A}
HOMEPAGE="http://www.exploits.org/nut/"


src_unpack() {
  unpack ${A}
}

src_compile() {                           
  cd ${S}
  try ./configure --host=${CHOST} --prefix=/usr --sysconfdir=/etc/nut
  try make
  try make cgi
}

src_install() {                               
  cd ${S}
  try make BASEPATH=${D}/usr CONFPATH=${D}/etc/nut STATEPATH=${D}/var/state/ups \
	install
  cd clients
  exeinto /usr/local/httpd/cgi-bin/nut
  doexe *.cgi
  into /usr
  dolib upsfetch.o
  insinto /usr/include
  doins upsfetch.h
  cd ..
  rmdir ${D}/usr/misc
  insinto /etc/rc.d/init.d
  doins ${O}/files/upsd
  dodoc COPYING CREDITS Changes QUICKSTART README
  docinto docs
  dodoc docs/*.txt docs/FAQ docs/Changes.trust
  docinto cables
  dodoc docs/cables/*.txt
}


pkg_config() {

   . ${ROOT}/etc/rc.d/config/functions

  einfo "Generating symlinks..."
  ${ROOT}/usr/sbin/rc-update add upsd

}