diff options
author | Preston A. Elder <prez@gentoo.org> | 2003-08-10 19:17:01 +0000 |
---|---|---|
committer | Preston A. Elder <prez@gentoo.org> | 2003-08-10 19:17:01 +0000 |
commit | 2af2baa4b25dacf0d0af3a3ef113d1b1f07feaec (patch) | |
tree | 958dbfd94db7cb5df8c734487c253c2aaa243cec /net-misc | |
parent | sawfish-merlin purge (diff) | |
download | gentoo-2-2af2baa4b25dacf0d0af3a3ef113d1b1f07feaec.tar.gz gentoo-2-2af2baa4b25dacf0d0af3a3ef113d1b1f07feaec.tar.bz2 gentoo-2-2af2baa4b25dacf0d0af3a3ef113d1b1f07feaec.zip |
Added NUT 1.5.1
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/nut/ChangeLog | 7 | ||||
-rw-r--r-- | net-misc/nut/Manifest | 16 | ||||
-rw-r--r-- | net-misc/nut/files/digest-nut-1.5.1 | 1 | ||||
-rw-r--r-- | net-misc/nut/nut-1.5.1.ebuild | 126 |
4 files changed, 142 insertions, 8 deletions
diff --git a/net-misc/nut/ChangeLog b/net-misc/nut/ChangeLog index 5bd7d5520801..38f0afbc70c5 100644 --- a/net-misc/nut/ChangeLog +++ b/net-misc/nut/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for net-misc/nut # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/ChangeLog,v 1.16 2003/07/30 02:51:46 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/ChangeLog,v 1.17 2003/08/10 19:17:01 prez Exp $ + +*nut-1.5.1 (10 Aug 2003) + + 10 Aug 2003; Preston A. Elder <prez@gentoo.org> nut-1.5.1.ebuild : + New development tree version. *nut-1.4.0 (29 Jul 2003) diff --git a/net-misc/nut/Manifest b/net-misc/nut/Manifest index 3f02be83feb1..5ca5187ac715 100644 --- a/net-misc/nut/Manifest +++ b/net-misc/nut/Manifest @@ -1,15 +1,17 @@ -MD5 03f934c71da26dd1b5fc6435ce7c25a4 nut-1.4.0.ebuild 3364 +MD5 4fb76914257035f2905740448c763dd9 ChangeLog 2370 MD5 6aab9abab0b73d9a5a7a78e644433734 nut-1.0.0.ebuild 2527 MD5 e7b0cec5163957ce8fbd4f6911a35e3e nut-1.2.1.ebuild 2921 -MD5 2811ea76c2865f413e5b89656e924d72 nut-1.3.6.ebuild 3361 MD5 547e8cf9de6cd5bb27e6b655a8473c38 nut-1.2.2.ebuild 3282 +MD5 2ea82ad1c37f0aec8d138c465709c317 nut-1.5.1.ebuild 3368 MD5 bb9618c8b03a1237cd7ab2ac7c060cae nut-1.2.1-r1.ebuild 3237 -MD5 4fb76914257035f2905740448c763dd9 ChangeLog 2370 +MD5 2811ea76c2865f413e5b89656e924d72 nut-1.3.6.ebuild 3361 +MD5 03f934c71da26dd1b5fc6435ce7c25a4 nut-1.4.0.ebuild 3364 +MD5 ab96c8181bf3780dae5e3377987b05c2 files/digest-nut-1.2.2 61 MD5 53b3c22e90b76d9ed4ac9cbbef393c31 files/digest-nut-1.0.0 61 MD5 4f6c951306e95660e88086bc591f03d0 files/digest-nut-1.2.1 61 -MD5 ab96c8181bf3780dae5e3377987b05c2 files/digest-nut-1.2.2 61 -MD5 391798e93c10d171a3a7f9941527e293 files/digest-nut-1.3.6 61 -MD5 de17bbc812bdd76ec7b807a0deb5e636 files/digest-nut-1.4.0 61 +MD5 c5fa9d5b07e3724f41bb5fd83bbcc4c7 files/upsd-init 596 MD5 2bbffa4aad5969fa3d0d74a6039d6070 files/upsmon-init 491 MD5 4f6c951306e95660e88086bc591f03d0 files/digest-nut-1.2.1-r1 61 -MD5 c5fa9d5b07e3724f41bb5fd83bbcc4c7 files/upsd-init 596 +MD5 884831c15f0700dbc89db196a32a2695 files/digest-nut-1.5.1 61 +MD5 391798e93c10d171a3a7f9941527e293 files/digest-nut-1.3.6 61 +MD5 de17bbc812bdd76ec7b807a0deb5e636 files/digest-nut-1.4.0 61 diff --git a/net-misc/nut/files/digest-nut-1.5.1 b/net-misc/nut/files/digest-nut-1.5.1 new file mode 100644 index 000000000000..75d9bbd7b295 --- /dev/null +++ b/net-misc/nut/files/digest-nut-1.5.1 @@ -0,0 +1 @@ +MD5 38117286a322b13bb3df28a7437deb37 nut-1.5.1.tar.gz 471282 diff --git a/net-misc/nut/nut-1.5.1.ebuild b/net-misc/nut/nut-1.5.1.ebuild new file mode 100644 index 000000000000..8297fa0c0a82 --- /dev/null +++ b/net-misc/nut/nut-1.5.1.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/nut-1.5.1.ebuild,v 1.1 2003/08/10 19:17:01 prez Exp $ + +S=${WORKDIR}/${P} +DESCRIPTION="Network-UPS Tools" +SRC_URI="http://www.exploits.org/nut/development/${PV%.*}/${P}.tar.gz" +HOMEPAGE="http://www.exploits.org/nut/" +KEYWORDS="~x86 ~sparc" +LICENSE="GPL-2" +SLOT="0" + +DEPEND="" +RDEPEND=">=sys-apps/baselayout-1.8.2" + +if [ "`use apache2`" ]; then + APACHEBIN="apache2" +else + APACHEBIN="apache" +fi + +APACHE="`which ${APACHEBIN}`" +if [ -z "${APACHE}" -a -x /usr/sbin/${APACHEBIN} ]; then + APACHE=/usr/sbin/${APACHEBIN} +fi + +if [ -n "${APACHE}" ]; then + DEPEND="${DEPEND} =sys-libs/zlib-1* =media-libs/libgd-1* =media-libs/libpng-1.2*" + RDEPEND="${RDEPEND} net-www/apache" +fi +RDEPEND="${RDEPEND} ${DEPEND}" + +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 + [ -n "${APACHE}" ] && myconf="--with-cgi --with-cgipath=/home/httpd/cgi-bin" || 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 \ + --with-linux-hiddev \ + --host=${CHOST} ${myconf} || die + + cp ${S}/drivers/Makefile ${S}/drivers/Makefile.orig + sed -e "s:= bestups:= hidups bestups:" ${S}/drivers/Makefile.orig \ + > ${S}/drivers/Makefile + cp ${S}/man/Makefile ${S}/man/Makefile.orig + sed -e "s:= powercom.8:= hidups.8 powercom.8:" \ + ${S}/man/Makefile.orig > ${S}/man/Makefile + + emake || die + + if [ -n "${APACHE}" ] + 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 "${APACHE}" ] + 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" +} |