diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2005-02-14 07:57:16 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2005-02-14 07:57:16 +0000 |
commit | 86533e66432a6fb43ed654ddd19ee42263a59d72 (patch) | |
tree | 5bc63f01acae08137c43fb2522c4f5b17b88a662 /www-apps | |
parent | repoman: Trim trailing whitespace (diff) | |
download | gentoo-2-86533e66432a6fb43ed654ddd19ee42263a59d72.tar.gz gentoo-2-86533e66432a6fb43ed654ddd19ee42263a59d72.tar.bz2 gentoo-2-86533e66432a6fb43ed654ddd19ee42263a59d72.zip |
Bug #47482. Move stuff away from the root filesystem where it wouldn't work anyway.
(Portage version: 2.0.51.16)
Diffstat (limited to 'www-apps')
-rw-r--r-- | www-apps/nut/ChangeLog | 11 | ||||
-rw-r--r-- | www-apps/nut/Manifest | 11 | ||||
-rw-r--r-- | www-apps/nut/files/digest-nut-2.0.0-r1 | 1 | ||||
-rw-r--r-- | www-apps/nut/files/upsd-init | 25 | ||||
-rwxr-xr-x | www-apps/nut/files/upsdrv.rc6-r1 | 21 | ||||
-rw-r--r-- | www-apps/nut/files/upsmon-init | 20 | ||||
-rw-r--r-- | www-apps/nut/nut-2.0.0-r1.ebuild | 123 | ||||
-rw-r--r-- | www-apps/nut/nut-2.0.0.ebuild | 4 |
8 files changed, 162 insertions, 54 deletions
diff --git a/www-apps/nut/ChangeLog b/www-apps/nut/ChangeLog index d92483ffedd9..a2a9d0dc96c4 100644 --- a/www-apps/nut/ChangeLog +++ b/www-apps/nut/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for www-apps/nut -# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-apps/nut/ChangeLog,v 1.9 2004/12/29 01:49:52 ciaranm Exp $ +# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/www-apps/nut/ChangeLog,v 1.10 2005/02/14 07:57:16 robbat2 Exp $ + +*nut-2.0.0-r1 (13 Feb 2005) + + 13 Feb 2005; Robin H. Johnson <robbat2@gentoo.org> -files/upsd-init, + +files/upsdrv.rc6-r1, -files/upsmon-init, +nut-2.0.0-r1.ebuild: + Bug #47482. Move stuff away from the root filesystem where it wouldn't work + anyway. 29 Dec 2004; Ciaran McCreesh <ciaranm@gentoo.org> : Change encoding to UTF-8 for GLEP 31 compliance diff --git a/www-apps/nut/Manifest b/www-apps/nut/Manifest index 58bcc8947a6c..51e09342b5ff 100644 --- a/www-apps/nut/Manifest +++ b/www-apps/nut/Manifest @@ -1,9 +1,10 @@ -MD5 c3283c5dc7f2f8e9ce695f620f47160b ChangeLog 6515 MD5 3985c4f776f13d702e1ae7fe5929a74f nut-2.0.0.ebuild 3080 +MD5 5bf177abd01c4bed2141bd2ff8e1e294 nut-2.0.0-r1.ebuild 3099 +MD5 c3283c5dc7f2f8e9ce695f620f47160b ChangeLog 6515 MD5 91a159b983332d5ed0fb985cc1fe1b80 metadata.xml 330 -MD5 057b35a5ced412ebf01c952b55d2e4db files/upsd.rc6 585 -MD5 5962635c2a91e3df315cc69f5aa52f6a files/upsmon.rc6 471 MD5 891b50cff5827a4e77573ee8f2f40e48 files/digest-nut-2.0.0 61 +MD5 39517fd3475eecaf0b2f3a4f8f1037ae files/upsdrv.rc6-r1 485 +MD5 057b35a5ced412ebf01c952b55d2e4db files/upsd.rc6 585 MD5 d369e7d9bf8a83e47b0a958ec30baf43 files/upsdrv.rc6 477 -MD5 aff23b23415c3ce12e107ef874db2607 files/upsd-init 577 -MD5 5ebf68a5c1e2be25b436841a91ccac0a files/upsmon-init 472 +MD5 891b50cff5827a4e77573ee8f2f40e48 files/digest-nut-2.0.0-r1 61 +MD5 5962635c2a91e3df315cc69f5aa52f6a files/upsmon.rc6 471 diff --git a/www-apps/nut/files/digest-nut-2.0.0-r1 b/www-apps/nut/files/digest-nut-2.0.0-r1 new file mode 100644 index 000000000000..21263cf7a3cc --- /dev/null +++ b/www-apps/nut/files/digest-nut-2.0.0-r1 @@ -0,0 +1 @@ +MD5 84649ad95809737b5ffc19efdd9e9952 nut-2.0.0.tar.gz 530492 diff --git a/www-apps/nut/files/upsd-init b/www-apps/nut/files/upsd-init deleted file mode 100644 index d76f19c9e424..000000000000 --- a/www-apps/nut/files/upsd-init +++ /dev/null @@ -1,25 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-apps/nut/files/upsd-init,v 1.1 2004/08/15 15:19:10 stuart Exp $ - -depend() { - need net - before upsmon -} - -start() { - ebegin "Starting upsd" - /sbin/upsdrvctl start - start-stop-daemon --start --quiet --startas /usr/sbin/upsd \ - --pidfile=/var/state/nut/upsd.pid - eend $? -} - -stop() { - ebegin "Stopping upsd" - start-stop-daemon --stop --quiet --pidfile=/var/state/nut/upsd.pid - rc=$? - /sbin/upsdrvctl stop - eend $rc -} diff --git a/www-apps/nut/files/upsdrv.rc6-r1 b/www-apps/nut/files/upsdrv.rc6-r1 new file mode 100755 index 000000000000..794f53359c89 --- /dev/null +++ b/www-apps/nut/files/upsdrv.rc6-r1 @@ -0,0 +1,21 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-apps/nut/files/upsdrv.rc6-r1,v 1.1 2005/02/14 07:57:16 robbat2 Exp $ + +depend() { + need net + before upsd +} + +start() { + ebegin "Starting UPS drivers" + /usr/sbin/upsdrvctl start + eend $? "Failed to start UPS drivers!" +} + +stop() { + ebegin "Stopping UPS drivers" + /usr/sbin/upsdrvctl stop + eend $? "Failed to stop UPS drivers!" +} diff --git a/www-apps/nut/files/upsmon-init b/www-apps/nut/files/upsmon-init deleted file mode 100644 index a8db61a945b4..000000000000 --- a/www-apps/nut/files/upsmon-init +++ /dev/null @@ -1,20 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-apps/nut/files/upsmon-init,v 1.1 2004/08/15 15:19:10 stuart Exp $ - -depend() { - need net -} - -start() { - ebegin "Starting upsmon" - start-stop-daemon --start --quiet --exec /usr/sbin/upsmon - eend $? -} - -stop() { - ebegin "Stopping upsmon" - start-stop-daemon --stop --quiet --pidfile=/var/run/upsmon.pid - eend $? -} diff --git a/www-apps/nut/nut-2.0.0-r1.ebuild b/www-apps/nut/nut-2.0.0-r1.ebuild new file mode 100644 index 000000000000..b81859dc0f3b --- /dev/null +++ b/www-apps/nut/nut-2.0.0-r1.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-apps/nut/nut-2.0.0-r1.ebuild,v 1.1 2005/02/14 07:57:16 robbat2 Exp $ + +inherit fixheadtails + +DESCRIPTION="Network-UPS Tools" +HOMEPAGE="http://www.networkupstools.org/" +SRC_URI="mirror://nut/source/${PV%.*}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="x86 sparc ppc ~alpha ~amd64" +IUSE="cgi snmp usb" + +RDEPEND="cgi? ( media-libs/gd ) + snmp? ( virtual/snmp )" +DEPEND="$RDEPEND + >=sys-apps/sed-4 + >=sys-devel/autoconf-2.58" + +src_unpack() { + unpack ${A} && cd "${S}" + + sed -e "s/install: install-dirs/install: install-dirs install-conf/" \ + -i Makefile.in || die "sed failed" + + ht_fix_file configure.in + + sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \ + -i configure.in || die "sed failed" + + ebegin "Recreating configure" + WANT_AUTOCONF=2.5 autoconf || die "autoconf failed" + eend $? +} + +src_compile() { + local myconf + myconf="${myconf} `use_with cgi` `use_with cgi cgipath /usr/share/nut`" + + if [ -n "${NUT_DRIVERS}" ]; then + myconf="${myconf} --with-drivers=${NUT_DRIVERS// /,}" + fi + + econf \ + --with-user=nut \ + --with-group=nut \ + --with-drvpath=/usr/lib/nut \ + --sysconfdir=/etc/nut \ + --with-logfacility=LOG_DAEMON \ + --with-statepath=/var/lib/nut \ + ${myconf} || die "econf failed" + + emake || die "compile problem" + + if use snmp; then + emake snmp || die "snmp compile problem" + fi + + if use usb; then + emake usb || die "snmp compile problem" + fi + + if use cgi; then + emake cgi || die "compile cgi problem" + fi +} + +src_install() { + make DESTDIR="${D}" install install-lib || die "make install failed" + + dodir /usr/sbin + dosym /usr/lib/nut/upsdrvctl /usr/sbin/upsdrvctl + + for i in "${D}"/etc/nut/*.sample ; do + mv "${i}" "${i/.sample/}" + done + + if use snmp; then + make DESTDIR="${D}" install-snmp || die "make install-snmp failed" + fi + + if use usb; then + make DESTDIR="${D}" install-usb || die "make install-usb failed" + fi + + if use cgi; then + make DESTDIR="${D}" install-cgi || die "make install-cgi failed" + einfo "CGI monitoring scripts are installed in /usr/share/nut," + einfo "copy them to your web server's ScriptPath to activate." + fi + + dodoc CHANGES COPYING CREDITS INSTALL MAINTAINERS NEWS README UPGRADING \ + docs/{FAQ,*.txt} + + newdoc lib/README README.lib + + docinto cables + dodoc docs/cables/* + + + exeinto /etc/init.d + newexe "${FILESDIR}/upsd.rc6" upsd + newexe "${FILESDIR}/upsdrv.rc6-r1" upsdrv + newexe "${FILESDIR}/upsmon.rc6" upsmon + + keepdir /var/lib/nut + + fperms 0700 /var/lib/nut + fperms 0640 /etc/nut/{upsd.conf,upsd.users,upsmon.conf} + fowners nut:nut /var/lib/nut + fowners root:nut /etc/nut/{upsd.conf,upsd.users,upsmon.conf} +} + +pkg_postinst() { + # this is to ensure that everybody that installed old versions still has correct + # permissions + chown nut:nut ${ROOT}/var/lib/nut 2>/dev/null + chmod 0700 ${ROOT}/var/lib/nut 2>/dev/null + chown root:nut ${ROOT}/etc/nut/{upsd.conf,upsd.users,upsmon.conf} 2>/dev/null + chmod 0640 ${ROOT}/etc/nut/{upsd.conf,upsd.users,upsmon.conf} 2>/dev/null +} diff --git a/www-apps/nut/nut-2.0.0.ebuild b/www-apps/nut/nut-2.0.0.ebuild index a0c00a923e8b..5b7459a03a81 100644 --- a/www-apps/nut/nut-2.0.0.ebuild +++ b/www-apps/nut/nut-2.0.0.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-apps/nut/nut-2.0.0.ebuild,v 1.7 2004/11/12 20:14:59 blubb Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-apps/nut/nut-2.0.0.ebuild,v 1.8 2005/02/14 07:57:16 robbat2 Exp $ inherit fixheadtails |