# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-power/nut/nut-2.0.5-r2.ebuild,v 1.4 2007/05/12 15:34:39 corsair Exp $ inherit eutils fixheadtails MY_P="${P/_/-}" DESCRIPTION="Network-UPS Tools" HOMEPAGE="http://www.networkupstools.org/" # Nut mirrors are presently broken #SRC_URI="mirror://nut/source/${PV%.*}/${MY_P}.tar.gz" SRC_URI="http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" S="${WORKDIR}/${MY_P}" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha amd64 ~ppc ppc64 sparc ~x86 ~x86-fbsd" IUSE="cgi snmp usb ssl" RDEPEND="cgi? ( >=media-libs/gd-2 ) snmp? ( net-analyzer/net-snmp ) usb? ( >=dev-libs/libusb-0.1.12 ) ssl? ( dev-libs/openssl ) !/dev/null chmod 0700 ${ROOT}/var/lib/nut 2>/dev/null eval chown root:nut ${ROOT}${NUT_PRIVATE_FILES} 2>/dev/null eval chmod 0640 ${ROOT}${NUT_PRIVATE_FILES} 2>/dev/null eval chown root:root ${ROOT}${NUT_PUBLIC_FILES} 2>/dev/null eval chmod 0644 ${ROOT}${NUT_PUBLIC_FILES} 2>/dev/null warningmsg elog } warningmsg() { msgfunc="$1" [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!" ${msgfunc} "Please note that NUT now runs under the 'nut' user." ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS." ${msgfunc} "However if you use a USB UPS you may need to look at the udev or" ${msgfunc} "hotplug rules that are installed, and alter them suitably." }