Added lighttpd support. Closes #107300.
authorMichael Imhof <tantive@gentoo.org>
Sun, 20 Nov 2005 17:46:42 +0000 (17:46 +0000)
committerMichael Imhof <tantive@gentoo.org>
Sun, 20 Nov 2005 17:46:42 +0000 (17:46 +0000)
Package-Manager: portage-2.0.53_rc7

sys-power/apcupsd/ChangeLog
sys-power/apcupsd/Manifest
sys-power/apcupsd/apcupsd-3.10.18-r2.ebuild [new file with mode: 0644]
sys-power/apcupsd/files/3.10.18/apcupsd-lighttpd.conf [new file with mode: 0644]
sys-power/apcupsd/files/digest-apcupsd-3.10.18-r2 [new file with mode: 0644]

index 51d32f7f731fb22ba0122bcd383bacd2accd6ac4..18a752f1ce9982d7faf153698d5e833e3cf419f6 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for sys-power/apcupsd
 # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/ChangeLog,v 1.11 2005/10/30 19:36:13 metalgod Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/ChangeLog,v 1.12 2005/11/20 17:46:42 tantive Exp $
+
+*apcupsd-3.10.18-r2 (20 Nov 2005)
+
+  20 Nov 2005; Michael Imhof <tantive@gentoo.org>
+  +files/3.10.18/apcupsd-lighttpd.conf, +apcupsd-3.10.18-r2.ebuild:
+  Added lighttpd support. Closes #107300.
 
   30 Oct 2005; Luis Medinas <metalgod@gentoo.org> apcupsd-3.10.18-r1.ebuild:
   Marked Stable on amd64. Bug #110904.
index 91bf2ebf22c3328d1628bbbabbf7a9d7c4c1bc4a..e2d8429c90c3e8c2c58bd427edbf17fa8b08bb0f 100644 (file)
@@ -1,11 +1,9 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 e4ff5b9d91cf42dd6083d89cf3971337 ChangeLog 12196
+MD5 e44253d5817422b7212bed7a9dc39e90 ChangeLog 12391
 MD5 90addc3e3ec4f77230cd7f491e1da84a apcupsd-3.10.15-r1.ebuild 2421
 MD5 6573c011347859fde0ecb460ecd38bad apcupsd-3.10.16-r3.ebuild 2627
 MD5 18f6513b7c5bcaa5878177f4418c5989 apcupsd-3.10.17-r1.ebuild 2599
 MD5 bc6765ffbe6de08060d019938735bc54 apcupsd-3.10.18-r1.ebuild 2598
+MD5 3dc8cbcbc71d9218d2da15ada78a0b96 apcupsd-3.10.18-r2.ebuild 2997
 MD5 69cfaea0e3937c778c710b8120cbd379 files/3.10.15/apache.conf 157
 MD5 2a93b5c4f2574caa199b3d93cf838e8c files/3.10.15/apcupsd.in.patch 315
 MD5 8f1a2aa4fd0307c2cfe3733e8454d3c2 files/3.10.15/smtp.patch 2663
@@ -16,17 +14,12 @@ MD5 27ad4b6b56ea3aef2a89dded4c19b656 files/3.10.17/apache.conf 163
 MD5 2a93b5c4f2574caa199b3d93cf838e8c files/3.10.17/apcupsd.in.patch 315
 MD5 8f1a2aa4fd0307c2cfe3733e8454d3c2 files/3.10.17/smtp.patch 2663
 MD5 27ad4b6b56ea3aef2a89dded4c19b656 files/3.10.18/apache.conf 163
+MD5 ab2e819939b9aeaeff1d04b2f76d6b3d files/3.10.18/apcupsd-lighttpd.conf 623
 MD5 2a93b5c4f2574caa199b3d93cf838e8c files/3.10.18/apcupsd.in.patch 315
 MD5 8f1a2aa4fd0307c2cfe3733e8454d3c2 files/3.10.18/smtp.patch 2663
 MD5 ec48a12c6d8b56aeffbeaa629f8835ad files/digest-apcupsd-3.10.15-r1 68
 MD5 ed12d329ca566b8f2632d425828ea5d7 files/digest-apcupsd-3.10.16-r3 68
 MD5 659d5670233b274842418c62ef15aafb files/digest-apcupsd-3.10.17-r1 68
 MD5 0477fe3f08b01a504eb26e6763f3982e files/digest-apcupsd-3.10.18-r1 68
+MD5 0477fe3f08b01a504eb26e6763f3982e files/digest-apcupsd-3.10.18-r2 68
 MD5 27ae5add10fc42e77804f1ecd768df87 metadata.xml 226
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
-
-iD8DBQFDZSBMwUpWvClEHQoRAnfqAJ9xmbarozhiHVb2cciKxVog2y4VQwCfdeOI
-CIoSzINvjzAVba2Fzl8R8iU=
-=18kD
------END PGP SIGNATURE-----
diff --git a/sys-power/apcupsd/apcupsd-3.10.18-r2.ebuild b/sys-power/apcupsd/apcupsd-3.10.18-r2.ebuild
new file mode 100644 (file)
index 0000000..82ee615
--- /dev/null
@@ -0,0 +1,110 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/apcupsd-3.10.18-r2.ebuild,v 1.1 2005/11/20 17:46:42 tantive Exp $
+
+inherit eutils depend.apache
+
+DESCRIPTION="APC UPS daemon with integrated tcp/ip remote shutdown"
+HOMEPAGE="http://www.sibbald.com/apcupsd/"
+SRC_URI="mirror://sourceforge/apcupsd/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE="doc snmp usb apache2 cgi threads ncurses nls lighttpd"
+
+DEPEND="snmp? ( net-analyzer/net-snmp )
+       cgi? ( >=media-libs/gd-1.8.4
+               apache2? ( >=net-www/apache-2.0.54-r30 )
+               lighttpd? ( www-servers/lighttpd )
+               )
+       ncurses? ( sys-libs/ncurses )
+       nls? ( sys-devel/gettext )"
+RDEPEND="${DEPEND}
+       virtual/mta"
+
+XPIDDIR=/var/run
+XLOGDIR=/var/log
+XLOCKDIR=/var/lock
+XSYSCONFDIR=/etc/apcupsd
+XPWRFAILDIR=${XSYSCONFDIR}
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}/platforms/gentoo
+       epatch ${FILESDIR}/${PV}/apcupsd.in.patch
+}
+
+src_compile() {
+       local myconf
+       use cgi && myconf="${myconf} --enable-cgi --with-css-dir=/var/www/apcupsd --with-cgi-bin=/var/www/apcupsd"
+       use usb && myconf="${myconf} --with-upstype=usb --with-upscable=usb --enable-usb"
+       use !usb && myconf="${myconf} --with-upstype=apcsmart --with-upscable=apcsmart --disable-usb"
+
+       # We force the DISTNAME to gentoo so it will use gentoo's layout also
+       # when installed on non-linux systems.
+       DISTNAME=gentoo APCUPSD_MAIL=/usr/sbin/sendmail ./configure \
+               --prefix=/usr \
+               --sbindir=/usr/sbin \
+               --sysconfdir=${XSYSCONFDIR} \
+               --with-pwrfail-dir=${XPWRFAILDIR} \
+               --with-lock-dir=${XLOCKDIR} \
+               --with-pid-dir=${XPIDDIR} \
+               --with-log-dir=${XLOGDIR} \
+               --with-net-port=6666 \
+               --with-nis-port=3551 \
+               --enable-net \
+               --enable-oldnet \
+               --enable-master-slave \
+               $(use_enable ncurses powerflute) \
+               $(use_enable threads pthreads) \
+               $(use_enable snmp net-snmp) \
+               $(use_enable nls) \
+               ${myconf} \
+               || die
+       make || die
+}
+
+src_install() {
+       make DESTDIR=${D} install || die "installed failed"
+       rm -f "${D}"/etc/init.d/halt
+
+       if use cgi; then
+               if use apache2; then
+                       insinto ${APACHE2_MODULES_CONFDIR}
+                       newins ${FILESDIR}/${PV}/apache.conf 60_apcupsd.conf
+               fi
+
+               if use lighttpd; then
+                       insinto /etc/lighttpd
+                       newins ${FILESDIR}/${PV}/apcupsd-lighttpd.conf apcupsd.conf
+                       einfo "The configuration file ${ROOT}/etc/lighttpd/apcupsd.conf should"
+                       einfo "be included in lighttpd.conf configuration file to enable apcupsd"
+                       einfo "alias and cgi execution."
+               fi
+       fi
+
+       insinto /etc/apcupsd
+       newins examples/safe.apccontrol safe.apccontrol
+
+       cd ${D}/etc/apcupsd
+       epatch ${FILESDIR}/${PV}/smtp.patch
+
+       ln -s onbattery powerout
+
+       if use doc; then
+               einfo "Installing full documentation into /usr/share/doc/${P}..."
+               cd ${S}/doc
+               dodoc README.*
+               docinto developers_manual
+               dodoc developers_manual/*
+               docinto logo
+               dodoc logo/*
+               docinto manual
+               dodoc manual/*
+               docinto old_documents
+               dodoc old_documents/*
+               docinto vim
+               dodoc vim/*
+       fi
+}
diff --git a/sys-power/apcupsd/files/3.10.18/apcupsd-lighttpd.conf b/sys-power/apcupsd/files/3.10.18/apcupsd-lighttpd.conf
new file mode 100644 (file)
index 0000000..31c7aec
--- /dev/null
@@ -0,0 +1,19 @@
+###############################################################################
+# apcupsd.conf - apcupsd cgi programs configuration
+# include'd by lighttpd.conf.
+# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/files/3.10.18/apcupsd-lighttpd.conf,v 1.1 2005/11/20 17:46:42 tantive Exp $
+###############################################################################
+
+# Uncomment this if you don'thave mod_cgi and mod_alias active already
+# server.modules += ("mod_cgi", "mod_alias")
+
+alias.url += (
+       "/apcupsd/"     => "/var/www/apcupsd/"
+)
+
+$HTTP["url"] =~ "^/apcupsd/" {
+       cgi.assign = (
+               ".cgi"  => "/usr/bin/env"
+       )
+}
+
diff --git a/sys-power/apcupsd/files/digest-apcupsd-3.10.18-r2 b/sys-power/apcupsd/files/digest-apcupsd-3.10.18-r2
new file mode 100644 (file)
index 0000000..34355c4
--- /dev/null
@@ -0,0 +1 @@
+MD5 64104a1fface0253e77318ca84948bac apcupsd-3.10.18.tar.gz 5698299