diff options
author | Donny Davies <woodchip@gentoo.org> | 2003-01-28 04:05:16 +0000 |
---|---|---|
committer | Donny Davies <woodchip@gentoo.org> | 2003-01-28 04:05:16 +0000 |
commit | 7db7e523ccb70223934a4d5e32f53bce5b427c3c (patch) | |
tree | f616e0d57580a2abcde7b5079b3c2da673bf6a63 /net-misc/nut | |
parent | version bump (diff) | |
download | historical-7db7e523ccb70223934a4d5e32f53bce5b427c3c.tar.gz historical-7db7e523ccb70223934a4d5e32f53bce5b427c3c.tar.bz2 historical-7db7e523ccb70223934a4d5e32f53bce5b427c3c.zip |
fix #12947, #10745
Diffstat (limited to 'net-misc/nut')
-rw-r--r-- | net-misc/nut/ChangeLog | 24 | ||||
-rw-r--r-- | net-misc/nut/files/digest-nut-1.2.1 | 1 | ||||
-rw-r--r-- | net-misc/nut/nut-1.2.1.ebuild | 108 |
3 files changed, 121 insertions, 12 deletions
diff --git a/net-misc/nut/ChangeLog b/net-misc/nut/ChangeLog index 9a319eb3973c..5e4a3d487468 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.9 2002/12/13 11:00:14 blizzy Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/ChangeLog,v 1.10 2003/01/28 04:05:16 woodchip Exp $ + +*nut-1.2.1 (27 Jan 2003) + + 27 Jan 2003; Donny Davies <woodchip@gentoo.org> : New testing release. + Fixed SRC_URI, half-of #12947, (the other half is commited to rc-scripts + CVS). Fixed #10745. Thanks btowe@gbis.com, and + tdickenson@geminidataloggers.com. 06 Dec 2002; Rodney Rees <manson@gentoo.org> : changed sparc ~sparc keywords @@ -10,11 +17,13 @@ Added sparc sparc64 KEYWORDS. Old ebuilds have busted SRC_URI's. 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. + 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) - 3 Aug 2002; Donny Davies <woodchip@gentoo.org> nut-0.50.1.ebuild, upsd-init, upsmon-init : + 3 Aug 2002; Donny Davies <woodchip@gentoo.org> nut-0.50.1.ebuild, + upsd-init, upsmon-init : This release adds proper initscripts, the USE cgi-bin option for building the web monitoring programs, and proper shutdown sequence merged into the baselayout halt.sh shutdown script. @@ -30,12 +39,3 @@ 12 Apr 2002; Spider <spider@gentoo.org> libpng update, remove RPEND tag, unnecessary. (or typo;) - -*nut-0.44.1 (1 Feb 2002) - - 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog : - Added initial ChangeLog which should be updated whenever the package is - updated in any way. This changelog is targetted to users. This means that the - comments should well explained and written in clean English. The details about - writing correct changelogs are explained in the skel.ChangeLog file which you - can find in the root directory of the portage repository. diff --git a/net-misc/nut/files/digest-nut-1.2.1 b/net-misc/nut/files/digest-nut-1.2.1 new file mode 100644 index 000000000000..519b08fcd6db --- /dev/null +++ b/net-misc/nut/files/digest-nut-1.2.1 @@ -0,0 +1 @@ +MD5 bf1147dbc04a6d5bb982d03720d2331e nut-1.2.1.tar.gz 444256 diff --git a/net-misc/nut/nut-1.2.1.ebuild b/net-misc/nut/nut-1.2.1.ebuild new file mode 100644 index 000000000000..bf6f1c8a16d1 --- /dev/null +++ b/net-misc/nut/nut-1.2.1.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/nut-1.2.1.ebuild,v 1.1 2003/01/28 04:05:16 woodchip Exp $ + +IUSE="png" + +S=${WORKDIR}/${P} +DESCRIPTION="Network-UPS Tools" +SRC_URI="http://www.exploits.org/nut/release/${PV%.*}/${P}.tar.gz" +HOMEPAGE="http://www.exploits.org/nut/" +KEYWORDS="~x86 ~sparc" +LICENSE="GPL-2" +SLOT="0" + +# -- [ FIXME ] -- +# a better idea would be to have virtual/httpd dependencies and +# USE cgi-bin support. USE png and apache are used for now :\ + +DEPEND="png? ( =sys-libs/zlib-1* =media-libs/libgd-1* =media-libs/libpng-1.2* )" +RDEPEND="${DEPEND} png? ( net-www/apache ) >=sys-apps/baselayout-1.8.2" + +src_unpack() { + unpack ${A} || die + cd ${S} || die + cp configure.in configure.in.orig + sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \ + configure.in.orig >configure.in + WANT_AUTOCONF_2_5=1 autoconf || die +} + +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 \ + UPGRADING docs/{FAQ,*.txt,driver.list} + docinto cables ; dodoc docs/cables/* + docinto drivers ; dodoc docs/drivers/* + + # 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 + chown root.nut ${ROOT}/etc/nut/{upsd.conf,upsd.users,upsmon.conf} + chmod 640 ${ROOT}/etc/nut/{upsd.conf,upsd.users,upsmon.conf} + ewarn "Dont forget to merge any changes in /etc/init.d/._cfgXXXX_halt.sh" +} |