pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/apcupsd Add cgi and snmp options (on by default)



details:   https://anonhg.NetBSD.org/pkgsrc/rev/952d086dda2a
branches:  trunk
changeset: 534679:952d086dda2a
user:      sborrill <sborrill%pkgsrc.org@localhost>
date:      Mon Oct 29 12:40:58 2007 +0000

description:
Add cgi and snmp options (on by default)

diffstat:

 sysutils/apcupsd/Makefile   |  12 ++++--------
 sysutils/apcupsd/PLIST      |  10 +++++-----
 sysutils/apcupsd/options.mk |  20 ++++++++++++++++++++
 3 files changed, 29 insertions(+), 13 deletions(-)

diffs (83 lines):

diff -r 3a4ba7d46672 -r 952d086dda2a sysutils/apcupsd/Makefile
--- a/sysutils/apcupsd/Makefile Mon Oct 29 12:40:02 2007 +0000
+++ b/sysutils/apcupsd/Makefile Mon Oct 29 12:40:58 2007 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.54 2007/10/09 19:19:15 martti Exp $
+# $NetBSD: Makefile,v 1.55 2007/10/29 12:40:58 sborrill Exp $
 
 DISTNAME=              apcupsd-3.14.1
-PKGREVISION=           2
+PKGREVISION=           3
 CATEGORIES=            sysutils
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=apcupsd/}
 
@@ -16,6 +16,8 @@
 
 PKG_SYSCONFSUBDIR=     apcupsd
 
+.include "options.mk"
+
 # Thread support is needed to compile powerflute, which has a curses
 # interface (apparently needing ncurses), but pthreads isn't very
 # efficient and is less preferred.
@@ -24,9 +26,6 @@
 #CONFIGURE_ARGS+=      --enable-threads        # compile threading code
 #CONFIGURE_ARGS+=      --enable-powerflute     # compile powerflute program
 
-# XXX this should be an option...
-CONFIGURE_ARGS+=       --enable-cgi            # include CGI support
-CONFIGURE_ARGS+=       --with-cgi-bin=${PREFIX}/libexec/cgi-bin
 #CONFIGURE_ARGS+=      --with-net-port=${APCUPSD_NET_PORT}     # un-registered port is 7000
 
 #CONFIGURE_ARGS+=      --with-nis-port=${APCUPSD_NIS_PORT}     # registered port is 3551
@@ -35,9 +34,6 @@
 
 CONFIGURE_ARGS+=       --enable-net            # enable NIS network driver
 CONFIGURE_ARGS+=       --enable-usb            # enable USB network driver
-# XXX this should be an option...
-.include "../../net/net-snmp/buildlink3.mk"
-CONFIGURE_ARGS+=       --enable-snmp           # enable SNMP driver
 CONFIGURE_ARGS+=       --with-catgets          # use catgets functions
 CONFIGURE_ARGS+=       --enable-nls            # i18n support
 CONFIGURE_ARGS+=       --with-lock-dir=${VARBASE}/spool/lock
diff -r 3a4ba7d46672 -r 952d086dda2a sysutils/apcupsd/PLIST
--- a/sysutils/apcupsd/PLIST    Mon Oct 29 12:40:02 2007 +0000
+++ b/sysutils/apcupsd/PLIST    Mon Oct 29 12:40:58 2007 +0000
@@ -1,8 +1,8 @@
-@comment $NetBSD: PLIST,v 1.9 2007/06/19 22:22:55 bouyer Exp $
-libexec/cgi-bin/upsstats.cgi
-libexec/cgi-bin/upsfstats.cgi
-libexec/cgi-bin/upsimage.cgi
-libexec/cgi-bin/multimon.cgi
+@comment $NetBSD: PLIST,v 1.10 2007/10/29 12:40:58 sborrill Exp $
+${CGI}libexec/cgi-bin/upsstats.cgi
+${CGI}libexec/cgi-bin/upsfstats.cgi
+${CGI}libexec/cgi-bin/upsimage.cgi
+${CGI}libexec/cgi-bin/multimon.cgi
 sbin/apcaccess
 sbin/apctest
 sbin/apcupsd
diff -r 3a4ba7d46672 -r 952d086dda2a sysutils/apcupsd/options.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/apcupsd/options.mk       Mon Oct 29 12:40:58 2007 +0000
@@ -0,0 +1,20 @@
+# $NetBSD: options.mk,v 1.1 2007/10/29 12:40:58 sborrill Exp $
+
+PKG_OPTIONS_VAR=               PKG_OPTIONS.apcupsd
+PKG_SUPPORTED_OPTIONS=         snmp cgi
+PKG_SUGGESTED_OPTIONS=         snmp cgi
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Msnmp)
+.  include "../../net/net-snmp/buildlink3.mk"
+CONFIGURE_ARGS+=       --enable-snmp           # enable SNMP driver
+.endif
+
+.if !empty(PKG_OPTIONS:Mcgi)
+CONFIGURE_ARGS+=       --enable-cgi            # include CGI support
+CONFIGURE_ARGS+=       --with-cgi-bin=${PREFIX}/libexec/cgi-bin
+PLIST_SUBST+=  CGI=
+.else
+PLIST_SUBST+=  CGI="@comment "
+.endif



Home | Main Index | Thread Index | Old Index