aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordwcjr <dwcjr@FreeBSD.org>2002-05-29 05:03:12 +0800
committerdwcjr <dwcjr@FreeBSD.org>2002-05-29 05:03:12 +0800
commitc0a8166e8f7b0e01081c2f2f878d1992d04b7cbd (patch)
tree53f758eb8c349f43a5674e2968b0f498fb72460d
parent0ca77572e59d997a36df0e4d06df0475ee10fc8b (diff)
downloadfreebsd-ports-gnome-c0a8166e8f7b0e01081c2f2f878d1992d04b7cbd.tar.gz
freebsd-ports-gnome-c0a8166e8f7b0e01081c2f2f878d1992d04b7cbd.tar.zst
freebsd-ports-gnome-c0a8166e8f7b0e01081c2f2f878d1992d04b7cbd.zip
Add menu support to samba
Submitted by: weisswange@liwing.de, rehsack@liwing.de
-rw-r--r--net/samba/Makefile22
-rw-r--r--net/samba/scripts/configure.samba84
2 files changed, 106 insertions, 0 deletions
diff --git a/net/samba/Makefile b/net/samba/Makefile
index c16de4e3ef41..39178e3aca92 100644
--- a/net/samba/Makefile
+++ b/net/samba/Makefile
@@ -19,6 +19,7 @@ MASTER_SITE_SUBDIR= . old-versions old
MAINTAINER= dwcjr@FreeBSD.org
USE_BZIP2= YES
+USE_SUBMAKE= YES
.if defined(WITH_AUDIT) || defined(WITH_RECYCLE)
USE_GMAKE= YES
@@ -39,8 +40,23 @@ LIBSAMBA= ""
.endif
# directories
+.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
+IS_INTERACTIVE= yes
+.endif
+
+.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
+.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
+.endif
+
VARDIR= /var
SAMBA_SPOOL= ${VARDIR}/spool/samba
+SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
+ TOUCH="${TOUCH}" \
+ MKDIR="${MKDIR}" \
+ CAT="${CAT}" \
+ SAMBA_OPTIONS="${SAMBA_OPTIONS}" \
+ REALCURDIR="${.CURDIR}"
+
SAMBA_LOGDIR= ${VARDIR}/log
SAMBA_PRIVATE= ${PREFIX}/private
SAMBA_CONFDIR= ${PREFIX}/etc
@@ -91,6 +107,12 @@ CONFIGURE_ENV+= CPPFLAGS=-I${LOCALBASE}/include \
WITH_CUPS= yes
.endif
+pre-fetch:
+ @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.samba
+
+post-clean:
+ @${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
+
.if defined(WITH_CUPS)
LIB_DEPENDS+= cups.2:${PORTSDIR}/print/cups-base
CONFIGURE_ENV+= CPPFLAGS=-I${LOCALBASE}/include \
diff --git a/net/samba/scripts/configure.samba b/net/samba/scripts/configure.samba
new file mode 100644
index 000000000000..82eb1a15e5d8
--- /dev/null
+++ b/net/samba/scripts/configure.samba
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+if [ -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc ]; then
+ exit
+fi
+
+tempfile=`/usr/bin/mktemp -t checklist`
+
+if [ "${BATCH}" ]; then
+ if [ "${SAMBA_OPTIONS}" ]; then
+ set ${SAMBA_OPTIONS}
+ fi
+else
+ /usr/bin/dialog --title "configuration options" --clear \
+ --checklist "\n\
+Please select desired options:" -1 -1 9 \
+syslog "With syslog support" OFF \
+ssl "With ssl support" OFF \
+ldap "With LDAP2 support" OFF \
+nocups "Without CUPS" OFF \
+krb5 "With Kerberos support" OFF \
+acl "With ACL support" OFF \
+utmp "With UTMP support" OFF \
+msdfs "With MSDFS support" OFF \
+quota "With Quota 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
+
+echo "SCRIPT_RUN=yes" >${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
+
+while [ "$1" ]; do
+ case $1 in
+ \"syslog\")
+ echo "WITH_SYSLOG=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
+ ;;
+ \"ssl\")
+ echo "WITH_SSL=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
+ ;;
+ \"ldap\")
+ echo "WITH_LDAP=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
+ ;;
+ \"nocups\")
+ echo "WITHOUT_CUPS=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
+ ;;
+ \"krb5\")
+ echo "KRB5_HOME=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
+ ;;
+ \"acl\")
+ echo "WITH_ACL_SUPPORT=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
+ ;;
+ \"utmp\")
+ echo "WITH_UTMP=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
+ ;;
+ \"msdfs\")
+ echo "WITH_MSDFS=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
+ ;;
+ \"quota\")
+ echo "WITH_QUOTA=YES" >>${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
+ ;;
+ *)
+ echo "Invalid option: $1"
+ rm -f ${WRKDIRPREFIX}${REALCURDIR}/Makefile.inc
+ exit 1
+ ;;
+ esac
+ shift
+done