109 lines
2.7 KiB
Bash
109 lines
2.7 KiB
Bash
#!/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
|
|
|
|
${MKDIR} ${WRKDIRPREFIX}${CURDIR}
|
|
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 "POSTGRESQL_PORT?= databases/postgresql7"
|
|
echo "LIB_DEPENDS+= pq.3:\${PORTSDIR}/\${POSTGRESQL_PORT}"
|
|
echo "CONFIGURE_ARGS+= --with-pgsql=\${LOCALBASE}"
|
|
SUB_PGSQL=""
|
|
;;
|
|
\"OpenLDAP\")
|
|
echo "LIB_DEPENDS+= ldap.2:\${PORTSDIR}/net/openldap20"
|
|
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}\""
|