summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorsborrill <sborrill@pkgsrc.org>2007-10-29 12:40:58 +0000
committersborrill <sborrill@pkgsrc.org>2007-10-29 12:40:58 +0000
commit1301bed0d3f3e1101a1ea2492dfae7990340c901 (patch)
treedc503ca70eb15c1db41e1b0e005ce5c6a22c7b54 /sysutils
parent75635c82f9b48902b02b85d1871fbdaac7598347 (diff)
downloadpkgsrc-1301bed0d3f3e1101a1ea2492dfae7990340c901.tar.gz
Add cgi and snmp options (on by default)
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/apcupsd/Makefile12
-rw-r--r--sysutils/apcupsd/PLIST10
-rw-r--r--sysutils/apcupsd/options.mk20
3 files changed, 29 insertions, 13 deletions
diff --git a/sysutils/apcupsd/Makefile b/sysutils/apcupsd/Makefile
index 2e51fc9db08..40505381c22 100644
--- a/sysutils/apcupsd/Makefile
+++ b/sysutils/apcupsd/Makefile
@@ -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 @@ GNU_CONFIGURE= yes
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 @@ PKG_SYSCONFSUBDIR= apcupsd
#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+= --with-cgi-bin=${PREFIX}/libexec/cgi-bin
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 --git a/sysutils/apcupsd/PLIST b/sysutils/apcupsd/PLIST
index d54a02232be..360130436cd 100644
--- a/sysutils/apcupsd/PLIST
+++ b/sysutils/apcupsd/PLIST
@@ -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 --git a/sysutils/apcupsd/options.mk b/sysutils/apcupsd/options.mk
new file mode 100644
index 00000000000..d710560f3b2
--- /dev/null
+++ b/sysutils/apcupsd/options.mk
@@ -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