--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/samba3oi/Makefile Tue Jun 14 13:59:11 2011 -0400
@@ -0,0 +1,96 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL"), version 1.0.
+# You may only use this file in accordance with the terms of version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source. A copy of the CDDL is also available via the Internet at
+# http://www.illumos.org/license/CDDL.
+#
+# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+#
+
+include ../../make-rules/shared-macros.mk
+
+COMPONENT_NAME= samba
+COMPONENT_VERSION= 3.5.8
+COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
+COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
+COMPONENT_ARCHIVE_HASH= sha1:ffb71de38442eee14aafb44f819671354dc5cce9
+COMPONENT_ARCHIVE_URL= http://ftp.samba.org/pub/samba/$(COMPONENT_ARCHIVE)
+COMPONENT_PROJECT_URL= http://www.samba.org/
+
+COMPONENT_PREP_ACTION = (cd $(SOURCE_DIR)/source3; sh autogen.sh)
+
+include ../../make-rules/prep.mk
+
+# SS12u1 barfs on Samba lib/crypto/sha256.c
+# so go back to SS12. Also need C99
+SPRO_VROOT = $(SPRO_ROOT)/SS12
+studio_C99MODE=$(studio_99_ENABLE)
+
+# Samba runs CC without CFLAGS to link programs.
+CC.studio.64 += -m64
+
+# override paths to .built
+BUILD_DIR_32 = $(BUILD_DIR)/$(MACH32)/source3
+BUILD_DIR_64 = $(BUILD_DIR)/$(MACH64)/source3
+
+include ../../make-rules/configure.mk
+include ../../make-rules/ips.mk
+
+PATCH_LEVEL=0
+
+# Override some paths
+# Note: configure.mk provides --prefix, --libdir, (others)
+CONFIGURE_LIBDIR.32 = $(CONFIGURE_PREFIX)/lib/samba
+CONFIGURE_LIBDIR.64 = $(CONFIGURE_PREFIX)/lib/samba/$(MACH64)
+
+# We need to work two levels down, and this needs to be relative
+CONFIGURE_SCRIPT = ../../../samba-3.5.8/source3/configure
+
+CONFIGURE_OPTIONS += --includedir=/usr/include/samba
+CONFIGURE_OPTIONS += --sysconfdir=/etc/samba
+CONFIGURE_OPTIONS += --with-configdir=/etc/samba
+CONFIGURE_OPTIONS += --with-privatedir=/etc/samba/private
+CONFIGURE_OPTIONS += --with-swatdir=/usr/share/samba/swat
+CONFIGURE_OPTIONS += --localstatedir=/var/samba
+CONFIGURE_OPTIONS += --with-lockdir=/var/samba/locks
+CONFIGURE_OPTIONS += --with-piddir=/var/samba/locks
+CONFIGURE_OPTIONS += --with-logfilebase=/var/samba/log
+CONFIGURE_OPTIONS += --enable-shared=yes
+CONFIGURE_OPTIONS += --enable-static=no
+CONFIGURE_OPTIONS += --with-static-modules=
+CONFIGURE_OPTIONS += --with-shared-modules=vfs_zfsacl,vfs_prealloc,vfs_cacheprime,vfs_commit,idmap_ldap,idmap_tdb2,idmap_rid,idmap_ad,idmap_hash,idmap_adex
+CONFIGURE_OPTIONS += --with-readline
+CONFIGURE_OPTIONS += --with-aio-support
+CONFIGURE_OPTIONS += --with-acl-support
+CONFIGURE_OPTIONS += --with-ads
+CONFIGURE_OPTIONS += --with-krb5
+CONFIGURE_OPTIONS += --with-ldap
+CONFIGURE_OPTIONS += --with-automount
+CONFIGURE_OPTIONS += --with-dnsupdate
+CONFIGURE_OPTIONS += --with-pam
+CONFIGURE_OPTIONS += --with-winbind
+CONFIGURE_OPTIONS += CPP=/usr/sfw/bin/cpp
+CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
+CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
+CONFIGURE_OPTIONS += CUPS_CONFIG=/usr/bin/cups-config
+CONFIGURE_OPTIONS += INSTALLCMD=/usr/bin/ginstall
+CONFIGURE_OPTIONS += LIBREPLACE_NETWORK_LIBS=" -lsocket -lnsl"
+CONFIGURE_OPTIONS.32 += LDFLAGS=-R/usr/lib/samba
+CONFIGURE_OPTIONS.64 += LDFLAGS=-R/usr/lib/samba/$(MACH64)
+CONFIGURE_OPTIONS += MAKE=gmake
+
+build: $(BUILD_32) $(BUILD_64)
+
+# We only need a few 64-bit objects and we get them
+# directly from the build area, so no INSTALL_64.
+install: $(INSTALL_32)
+
+test: $(NO_TESTS)
+
+BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
+
+include ../../make-rules/depend.mk