summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonny Davies <woodchip@gentoo.org>2002-08-27 02:54:09 +0000
committerDonny Davies <woodchip@gentoo.org>2002-08-27 02:54:09 +0000
commit674c2e67118608e7bba0f4273c1b37b49296fb12 (patch)
tree97ddff18fe05dc2dd69ac40315e7c98c22786d0e /net-misc
parentunmask nut (diff)
downloadgentoo-2-674c2e67118608e7bba0f4273c1b37b49296fb12.tar.gz
gentoo-2-674c2e67118608e7bba0f4273c1b37b49296fb12.tar.bz2
gentoo-2-674c2e67118608e7bba0f4273c1b37b49296fb12.zip
nut went 1.0 and baselayout is out
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/nut/ChangeLog9
-rw-r--r--net-misc/nut/files/digest-nut-1.0.01
-rw-r--r--net-misc/nut/nut-1.0.0.ebuild95
3 files changed, 104 insertions, 1 deletions
diff --git a/net-misc/nut/ChangeLog b/net-misc/nut/ChangeLog
index 1ef371cfc251..96775eedd0bb 100644
--- a/net-misc/nut/ChangeLog
+++ b/net-misc/nut/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/nut
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/ChangeLog,v 1.5 2002/08/11 14:33:43 phoenix Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/ChangeLog,v 1.6 2002/08/27 02:54:09 woodchip Exp $
+
+*nut-1.0.0 (26 Aug 2002)
+
+ 26 Aug 2002; Donny Davies <woodchip@gentoo.org> nut-1.0.0.ebuild :
+
+ Glorious timing; nut went 1.0 and as of baselayout-1.8.2, halt.sh
+ support is merged.
*nut-0.50.1 (3 Aug 2002)
diff --git a/net-misc/nut/files/digest-nut-1.0.0 b/net-misc/nut/files/digest-nut-1.0.0
new file mode 100644
index 000000000000..0b63bf86d4b8
--- /dev/null
+++ b/net-misc/nut/files/digest-nut-1.0.0
@@ -0,0 +1 @@
+MD5 653c7d90eb44c57f77423baed2b9a5f4 nut-1.0.0.tar.gz 402891
diff --git a/net-misc/nut/nut-1.0.0.ebuild b/net-misc/nut/nut-1.0.0.ebuild
new file mode 100644
index 000000000000..454841b9641a
--- /dev/null
+++ b/net-misc/nut/nut-1.0.0.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/nut-1.0.0.ebuild,v 1.1 2002/08/27 02:54:09 woodchip Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="Network-UPS Tools"
+SRC_URI="http://www.exploits.org/nut/release/${P}.tar.gz"
+HOMEPAGE="http://www.exploits.org/nut/"
+KEYWORDS="x86"
+LICENSE="GPL-2"
+SLOT="0"
+
+# -- [ FIXME ] --
+# a better idea would be to have virtual/httpd dependencies and
+# USE cgi-bin support. USE png is used for now :/
+
+DEPEND="png? ( =sys-libs/zlib-1* =media-libs/libgd-1* =media-libs/libpng-1.2* )"
+RDEPEND="${DEPEND} png? ( =net-www/apache-1* ) >=sys-apps/baselayout-1.8.2"
+
+src_compile() {
+ local myconf
+ use png && myconf="--with-cgi --with-cgipath=/home/httpd/cgi-bin"
+ use png || myconf="--without-cgi"
+
+ #default is to build all drivers; but the following is common:
+ #--with-drivers=apcsmart,hidups
+ ./configure \
+ --prefix=/usr \
+ --with-user=nut \
+ --with-group=nut \
+ --with-port=3493 \
+ --with-drvpath=/sbin \
+ --sysconfdir=/etc/nut \
+ --mandir=/usr/share/man \
+ --with-pidpath=/var/run \
+ --with-logfacility=LOG_DAEMON \
+ --with-statepath=/var/state/nut \
+ --with-altpidpath=/var/state/nut \
+ --host=${CHOST} ${myconf} || die
+
+ emake || die
+
+ if [ -n "`use png`" ]
+ then
+ emake cgi || die
+ fi
+}
+
+src_install() {
+ # Makefile: user/group nut might not exist until after
+ # pkg_preinst() runs; so use root for now, and fix it
+ # up in pkg_postinst().
+ make DESTDIR=${D} RUNUID=root RUNGID=root install || die
+
+ if [ -n "`use png`" ]
+ then
+ make DESTDIR=${D} install-cgi || die
+ fi
+ # see above note...
+ rm -rf ${D}/var/state/nut
+
+ dodoc CHANGES COPYING CREDITS INSTALL NEWS \
+ README docs/{FAQ,*.txt}
+ docinto cables ; dodoc docs/cables/*.txt
+ docinto drivers ; dodoc docs/drivers/*.txt
+
+ # clean up /etc/nut/*.sample files
+ cd ${D}/etc/nut
+ for i in *.sample
+ do
+ mv $i ${i/.sample/}
+ done
+
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/upsd-init upsd
+ newexe ${FILESDIR}/upsmon-init upsmon
+}
+
+pkg_preinst() {
+ if ! groupmod nut ; then
+ groupadd -g 84 nut || die "problem adding group nut"
+ fi
+
+ # usermod returns 2 on user-exists-but-no-flags-given
+ usermod nut &>/dev/null
+ if [ $? != 2 ] ; then
+ useradd -u 84 -g nut -s /bin/false -c "nut" \
+ -d /var/state/nut nut || die "problem adding user nut"
+ fi
+}
+
+pkg_postinst() {
+ install -m0700 -o nut -g nut -d ${ROOT}/var/state/nut
+ ewarn "Dont forget to merge the changes in /etc/init.d/._cfgXXXX_halt.sh"
+}