diff options
author | Dirk Froemberg <dirk@FreeBSD.org> | 2001-04-16 11:42:07 +0000 |
---|---|---|
committer | Dirk Froemberg <dirk@FreeBSD.org> | 2001-04-16 11:42:07 +0000 |
commit | 199f814e16a85e7a3c819308899b68b920850f20 (patch) | |
tree | 7ff1f81b80bae0d589995d7f48af19c94038025e /net/netsaint-plugins/scripts | |
parent | e8260625db5d9e82261aa5adb0a44f144df51b9c (diff) |
Notes
Diffstat (limited to 'net/netsaint-plugins/scripts')
-rw-r--r-- | net/netsaint-plugins/scripts/configure | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/net/netsaint-plugins/scripts/configure b/net/netsaint-plugins/scripts/configure new file mode 100644 index 000000000000..efb83034f1d2 --- /dev/null +++ b/net/netsaint-plugins/scripts/configure @@ -0,0 +1,107 @@ +#!/bin/sh +# $FreeBSD$ + +if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then + exit +fi + +tempfile=`mktemp -t checklist` + +if [ "${BATCH}" = "yes" ]; then +else + /usr/bin/dialog --title "NetSaint plugins configuration options" --clear \ + --checklist "\n\ +Please select desired options:" -1 -1 16 \ +QStat "Game server query support" OFF \ +FPing "Support for non-flooding fast ping" OFF \ +NetSNMP "SNMP support" OFF \ +Radiusclient "Radius support" OFF \ +MySQL "MySQL support" OFF \ +PostgreSQL "PostgreSQL support" OFF \ +OpenLDAP "OpenLDAP support" OFF \ +2> $tempfile + + retval=$? + + if [ -s $tempfile ]; then + set `cat $tempfile` + fi + rm -f $tempfile + + case $retval in + 0) if [ -z "$*" ]; then + echo "Nothing selected" + fi + ;; + 1) echo "Cancel pressed." + exit 1 + ;; + esac +fi + +exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + +SUB_QSTAT="@comment " +SUB_FPING="@comment " +SUB_SNMP="@comment " +SUB_RADIUS="@comment " +SUB_MYSQL="@comment " +SUB_PGSQL="@comment " +SUB_LDAP="@comment " + +while [ "$1" ]; do + case $1 in + \"QStat\") + echo "BUILD_DEPENDS+= qstat:\${PORTSDIR}/games/qstat" + echo "RUN_DEPENDS+= qstat:\${PORTSDIR}/games/qstat" + echo "CONFIGURE_ARGS+= --enable-qstat" + SUB_QSTAT="" + ;; + \"FPing\") + echo "BUILD_DEPENDS+= fping:\${PORTSDIR}/net/fping" + echo "RUN_DEPENDS+= fping:\${PORTSDIR}/net/fping" + echo "CONFIGURE_ARGS+= --enable-fping" + SUB_FPING="" + ;; + \"NetSNMP\") + echo "BUILD_DEPENDS+= snmpcheck:\${PORTSDIR}/net/net-snmp" + echo "RUN_DEPENDS+= snmpcheck:\${PORTSDIR}/net/net-snmp" + echo "CONFIGURE_ARGS+= --enable-snmp" + SUB_SNMP="" + ;; + \"Radiusclient\") + echo "LIB_DEPENDS+= radiusclient.0:\${PORTSDIR}/net/radiusclient" + echo "CONFIGURE_ARGS+= --enable-radius" + SUB_RADIUS="" + ;; + \"MySQL\") + echo "LIB_DEPENDS+= mysqlclient.10:\${PORTSDIR}/databases/mysql323-client" + echo "CONFIGURE_ARGS+= --with-mysqllibdir=\${LOCALBASE}/lib/mysql" + SUB_MYSQL="" + ;; + \"PostgreSQL\") + echo "LIB_DEPENDS+= pq.2:\${PORTSDIR}/databases/postgresql7" + echo "CONFIGURE_ARGS+= --with-pgsql=\${LOCALBASE}/pgsql" + SUB_PGSQL="" + ;; + \"OpenLDAP\") + echo "LIB_DEPENDS+= ldap.2:\${PORTSDIR}/net/openldap2" + echo "CONFIGURE_ARGS+= --enable-ldap" + SUB_LDAP="" + ;; + *) + echo "Invalid option(s): $*" > /dev/stderr + rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc + exit 1 + ;; + esac + shift +done + +echo "PLIST_SUB+= SUB_QSTAT=\"${SUB_QSTAT}\"" +echo "PLIST_SUB+= SUB_FPING=\"${SUB_FPING}\"" +echo "PLIST_SUB+= SUB_SNMP=\"${SUB_SNMP}\"" +echo "PLIST_SUB+= SUB_RADIUS=\"${SUB_RADIUS}\"" +echo "PLIST_SUB+= SUB_MYSQL=\"${SUB_MYSQL}\"" +echo "PLIST_SUB+= SUB_PGSQL=\"${SUB_PGSQL}\"" +echo "PLIST_SUB+= SUB_LDAP=\"${SUB_LDAP}\"" |