From d6b10c1653498f53f7ed20fc1b4c7df8ff234cbe Mon Sep 17 00:00:00 2001 From: jlam Date: Tue, 19 Jun 2001 09:03:30 +0000 Subject: Convert to use buildlink.mk files and remove unnecessary config.cache entry to prevent finding libncurses and unnecessary patches to configure script to handle SSL location and probing libcups. Also use FILES_SUBST instead of repeating a sed script throughout the Makefile. --- net/samba/Makefile | 56 +++++++-------- net/samba/distinfo | 4 +- net/samba/patches/patch-aa | 61 ---------------- net/samba/patches/patch-ab | 176 --------------------------------------------- 4 files changed, 28 insertions(+), 269 deletions(-) delete mode 100644 net/samba/patches/patch-aa delete mode 100644 net/samba/patches/patch-ab (limited to 'net/samba') diff --git a/net/samba/Makefile b/net/samba/Makefile index 1daad50ec09..b51bc326a81 100644 --- a/net/samba/Makefile +++ b/net/samba/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.57 2001/06/11 06:34:47 jlam Exp $ +# $NetBSD: Makefile,v 1.58 2001/06/19 09:03:30 jlam Exp $ DISTNAME= samba-2.2.0 PKGNAME= ${DISTNAME}nb1 @@ -15,18 +15,18 @@ MAINTAINER= packages@netbsd.org HOMEPAGE= http://www.samba.org/ COMMENT= SMB/CIFS protocol server suite for UNIX -USE_SSL= # defined +#USE_SSL= # defined GNU_CONFIGURE= # defined USE_LIBTOOL= # defined LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig +USE_BUILDLINK_ONLY= # defined USE_GNU_READLINE= # uses rl_event_hook interface to GNU readline -CFLAGS+= -I${SSLBASE}/include/openssl # ssl.h, err.h - .include "../../mk/bsd.prefs.mk" .include "../../devel/readline/buildlink.mk" +.include "../../security/openssl/buildlink.mk" SAMBA_LOGDIR= /var/log SAMBA_LOCKDIR= /var/run/samba @@ -45,12 +45,13 @@ CONFIGURE_ARGS+= --with-swatdir=${PREFIX}/share/swat CONFIGURE_ARGS+= --with-readline CONFIGURE_ARGS+= --with-ssl -CONFIGURE_ENV+= ac_cv_lib_ncurses_tgetent=no +CONFIGURE_ARGS+= --with-sslinc=${BUILDLINK_DIR} +CFLAGS+= -I${BUILDLINK_DIR}/include/openssl # ssl.h, err.h + CONFIGURE_ENV+= ac_cv_lib_curses_tgetent=no .if defined(SAMBA_WITH_CUPS) .include "../../print/cups/buildlink.mk" -CONFIGURE_ARGS+= --with-cups .endif .if defined(USE_PAM) @@ -68,34 +69,33 @@ DEINSTALL_FILE= ${WRKDIR}/DEINSTALL DOCDIR= ${PREFIX}/share/doc/samba HTMLDIR= ${PREFIX}/share/doc/html/samba +FILES_SUBST= SAMBA_PRIVATE=${SAMBA_PRIVATE} +FILES_SUBST+= SAMBA_LOCKDIR=${SAMBA_LOCKDIR} +FILES_SUBST+= SAMBA_LOGDIR=${SAMBA_LOGDIR} +FILES_SUBST+= SAMBA_ETCDIR=${SAMBA_ETCDIR} +FILES_SUBST+= PREFIX=${PREFIX} +FILES_SUBST+= CAT=${CAT:Q} +FILES_SUBST+= CHMOD=${CHMOD:Q} +FILES_SUBST+= CHOWN=${CHOWN:Q} +FILES_SUBST+= CP=${CP:Q} +FILES_SUBST+= ECHO=${ECHO:Q} +FILES_SUBST+= MKDIR=${MKDIR:Q} +FILES_SUBST+= RM=${RM:Q} +FILES_SUBST+= RMDIR=${RMDIR:Q} +FILES_SUBST+= TRUE=${TRUE:Q} +FILES_SUBST_SED= ${FILES_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} + post-extract: ${FIND} ${WRKDIR}/${DISTNAME} -name ".cvsignore" -print0 | \ ${XARGS} -0 ${RM} -f pre-install: for file in nmbd.sh smbd.sh; do \ - ${SED} -e "s,@PREFIX@,${PREFIX},g" \ - -e "s,@ECHO@,${ECHO},g" \ + ${SED} ${FILES_SUBST_SED} \ ${FILESDIR}/$${file} > ${WRKDIR}/$${file}; \ done - ${SED} -e "s|@SAMBA_PRIVATE@|${SAMBA_PRIVATE}|g" \ - -e "s|@SAMBA_LOCKDIR@|${SAMBA_LOCKDIR}|g" \ - -e "s|@SAMBA_ETCDIR@|${SAMBA_ETCDIR}|g" \ - -e "s|@CAT@|${CAT}|g" \ - -e "s|@CHMOD@|${CHMOD}|g" \ - -e "s|@CHOWN@|${CHOWN}|g" \ - -e "s|@CP@|${CP}|g" \ - -e "s|@MKDIR@|${MKDIR}|g" \ - -e "s|@RM@|${RM}|g" \ - ${PKGDIR}/INSTALL > ${INSTALL_FILE} - ${SED} -e "s|@SAMBA_PRIVATE@|${SAMBA_PRIVATE}|g" \ - -e "s|@SAMBA_LOCKDIR@|${SAMBA_LOCKDIR}|g" \ - -e "s|@SAMBA_ETCDIR@|${SAMBA_ETCDIR}|g" \ - -e "s|@CAT@|${CAT}|g" \ - -e "s|@RM@|${RM}|g" \ - -e "s|@RMDIR@|${RMDIR}|g" \ - -e "s|@TRUE@|${TRUE}|g" \ - ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE} + ${SED} ${FILES_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} post-install: # Install Samba documentation. @@ -115,9 +115,7 @@ post-install: ${INSTALL_SCRIPT} ${WRKSRC}/script/mksmbpasswd.sh \ ${PREFIX}/sbin/mksmbpasswd - ${SED} -e "s|@SAMBA_LOGDIR@|${SAMBA_LOGDIR}|g" \ - -e "s|@SAMBA_ETCDIR@|${SAMBA_ETCDIR}|g" \ - -e "s|@PREFIX@|${PREFIX}|g" \ + ${SED} ${FILES_SUBST_SED} \ ${FILESDIR}/smb.conf.sample > ${WRKDIR}/smb.conf.sample ${INSTALL_DATA} ${WRKDIR}/smb.conf.sample ${PREFIX}/share/examples/samba diff --git a/net/samba/distinfo b/net/samba/distinfo index 2a39d73800a..3bf64dda4ea 100644 --- a/net/samba/distinfo +++ b/net/samba/distinfo @@ -1,8 +1,6 @@ -$NetBSD: distinfo,v 1.9 2001/06/01 15:21:53 groo Exp $ +$NetBSD: distinfo,v 1.10 2001/06/19 09:03:30 jlam Exp $ SHA1 (samba-2.2.0.tar.gz) = a7010ff4b3e99a94e8a618184e551e3e61909859 Size (samba-2.2.0.tar.gz) = 5835104 bytes -SHA1 (patch-aa) = 191875ae477167a1937a011c5b2f9baf033e41d8 -SHA1 (patch-ab) = 28cfc5703a2c04b48a3e52047453c27d30aab160 SHA1 (patch-ac) = 851ad9368742f02bdfa20a640e876447f895f5f8 SHA1 (patch-ad) = 9881d62319bd6d582c69e303f5aaa4e7c0c5e823 diff --git a/net/samba/patches/patch-aa b/net/samba/patches/patch-aa deleted file mode 100644 index f7174da3455..00000000000 --- a/net/samba/patches/patch-aa +++ /dev/null @@ -1,61 +0,0 @@ -$NetBSD: patch-aa,v 1.15 2001/05/22 21:49:29 jlam Exp $ - ---- configure.in.orig Tue Apr 17 01:44:30 2001 -+++ configure.in Tue May 22 15:58:59 2001 -@@ -392,9 +392,6 @@ - AC_CHECK_TYPE(ssize_t, int) - AC_CHECK_TYPE(wchar_t, unsigned short) - --# we need libcups for CUPS support... --AC_CHECK_LIB(cups,httpConnect) -- - # we need libdl for PAM and the new VFS code - AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl"; - AC_DEFINE(HAVE_LIBDL)]) -@@ -1460,6 +1457,24 @@ - fi - - -+################################################ -+# check for CUPS support -+AC_MSG_CHECKING(whether to use CUPS) -+AC_ARG_WITH(cups, -+[ --with-cups Include CUPS support -+ --without-cups Don't include CUPS support (default)], -+[ case "$withval" in -+ yes) -+ AC_MSG_RESULT(yes) -+ AC_CHECK_LIB(cups, httpConnect) -+ ;; -+ *) -+ AC_MSG_RESULT(no) -+ ;; -+ esac ], -+ AC_MSG_RESULT(no) -+) -+ - ################################################# - # check for smbwrapper support - AC_MSG_CHECKING(whether to use smbwrapper) -@@ -1724,6 +1739,9 @@ - LIBS="-lssl -lcrypto $LIBS" - LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS" - ;; -+ /usr) -+ LIBS="-lssl -lcrypto $LIBS" -+ ;; - * ) - CFLAGS="-I${withval}/include $CFLAGS" - LIBS="-lssl -lcrypto $LIBS" -@@ -1738,11 +1756,6 @@ - LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS" - - fi -- -- if test ! -d ${withval}; then -- echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2 -- exit 1 -- fi - - CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS" # Damn, SSLeay defines its own - diff --git a/net/samba/patches/patch-ab b/net/samba/patches/patch-ab deleted file mode 100644 index 51c4d36e593..00000000000 --- a/net/samba/patches/patch-ab +++ /dev/null @@ -1,176 +0,0 @@ -$NetBSD: patch-ab,v 1.11 2001/05/22 21:49:29 jlam Exp $ - ---- configure.orig Tue Apr 17 01:44:24 2001 -+++ configure Tue May 22 16:07:36 2001 -@@ -40,6 +40,9 @@ - --with-readline[=DIR] Look for readline include/libs in DIR - --without-readline Don't include readline support" - ac_help="$ac_help -+ --with-cups Include CUPS support -+ --without-cups Don't include CUPS support (default)" -+ac_help="$ac_help - --with-smbwrapper Include SMB wrapper support - --without-smbwrapper Don't include SMB wrapper support (default)" - ac_help="$ac_help -@@ -3870,58 +3873,9 @@ - fi - - --# we need libcups for CUPS support... --echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6 --echo "configure:3876: checking for httpConnect in -lcups" >&5 --ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 --else -- ac_save_LIBS="$LIBS" --LIBS="-lcups $LIBS" --cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" --else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" --fi --rm -f conftest* --LIBS="$ac_save_LIBS" -- --fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` -- cat >> confdefs.h <&6 --fi -- -- - # we need libdl for PAM and the new VFS code - echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 --echo "configure:3925: checking for dlopen in -ldl" >&5 -+echo "configure:3879: checking for dlopen in -ldl" >&5 - ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -@@ -11044,10 +10998,78 @@ - fi - - -+################################################ -+# check for CUPS support -+echo $ac_n "checking whether to use CUPS""... $ac_c" 1>&6 -+echo "configure:11005: checking whether to use CUPS" >&5 -+# Check whether --with-cups or --without-cups was given. -+if test "${with_cups+set}" = set; then -+ withval="$with_cups" -+ case "$withval" in -+ yes) -+ echo "$ac_t""yes" 1>&6 -+ echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6 -+echo "configure:11013: checking for httpConnect in -lcups" >&5 -+ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'` -+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -+ echo $ac_n "(cached) $ac_c" 1>&6 -+else -+ ac_save_LIBS="$LIBS" -+LIBS="-lcups $LIBS" -+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -+ rm -rf conftest* -+ eval "ac_cv_lib_$ac_lib_var=yes" -+else -+ echo "configure: failed program was:" >&5 -+ cat conftest.$ac_ext >&5 -+ rm -rf conftest* -+ eval "ac_cv_lib_$ac_lib_var=no" -+fi -+rm -f conftest* -+LIBS="$ac_save_LIBS" -+ -+fi -+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -+ echo "$ac_t""yes" 1>&6 -+ ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` -+ cat >> confdefs.h <&6 -+fi -+ -+ ;; -+ *) -+ echo "$ac_t""no" 1>&6 -+ ;; -+ esac -+else -+ echo "$ac_t""no" 1>&6 -+ -+fi -+ -+ - ################################################# - # check for smbwrapper support - echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 --echo "configure:11051: checking whether to use smbwrapper" >&5 -+echo "configure:11073: checking whether to use smbwrapper" >&5 - # Check whether --with-smbwrapper or --without-smbwrapper was given. - if test "${with_smbwrapper+set}" = set; then - withval="$with_smbwrapper" -@@ -11427,6 +11449,9 @@ - LIBS="-lssl -lcrypto $LIBS" - LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS" - ;; -+ /usr) -+ LIBS="-lssl -lcrypto $LIBS" -+ ;; - * ) - CFLAGS="-I${withval}/include $CFLAGS" - LIBS="-lssl -lcrypto $LIBS" -@@ -11441,11 +11466,6 @@ - LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS" - - fi -- -- if test ! -d ${withval}; then -- echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2 -- exit 1 -- fi - - CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS" # Damn, SSLeay defines its own - -- cgit v1.2.3