components/samba/samba/Makefile
author Jiri Sasek <jurasek@opensolaris.org>
Wed, 25 May 2011 18:33:43 +0200
changeset 264 84a67a54e8fd
child 446 ba4f3a6be7f7
permissions -rw-r--r--
7044174 Move samba(s) and its dependencies to Userland. 7025146 Update samba to 3.5.8 (bugfix release) 7011577 Impossible to rename a file on a ZFS filesystem when installing 146364-01 (Samba 3.5.5) 7011579 Request to add shadow_copy2 in the next Samba patch or Solaris Samba package 7013885 User cannot delete a file on a share-se_access_check algorithmreturns access (2) denied 7010973 GPLv3 licensing issue with pkg:/library/samba/libsmbclient 7031097 Mozilla LDAP C-SDK (project private library for Samba) should be moved to Userland prior of Samba.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
264
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
     1
#
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
     2
# CDDL HEADER START
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
     3
#
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
     7
#
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    11
# and limitations under the License.
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    12
#
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    18
#
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    19
# CDDL HEADER END
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    20
#
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    21
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    22
#
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    23
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    24
#
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    25
include ../../../make-rules/shared-macros.mk
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    26
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    27
COMPONENT_NAME=		samba
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    28
COMPONENT_VERSION=	3.5.8
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    29
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    30
COMPONENT_PROJECT_URL=	http://www.samba.org/
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    31
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    32
COMPONENT_ARCHIVE_HASH=	sha1:ffb71de38442eee14aafb44f819671354dc5cce9
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    33
COMPONENT_ARCHIVE_URL=	http://www.samba.org/samba/ftp/stable/$(COMPONENT_ARCHIVE)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    34
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    35
COMPONENT_NAME_1=		docbook-xsl
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    36
COMPONENT_VERSION_1=		1.76.1
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    37
COMPONENT_SRC_1=		$(COMPONENT_NAME_1)-$(COMPONENT_VERSION_1)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    38
COMPONENT_ARCHIVE_1=		$(COMPONENT_SRC_1).tar.bz2
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    39
COMPONENT_ARCHIVE_HASH_1=	sha1:dc9fa422c53e0a4f0e32b5c8ec896b39080bc14d
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    40
COMPONENT_ARCHIVE_URL_1=	http://sourceforge.net/projects/docbook/files/$(COMPONENT_NAME_1)/$(COMPONENT_VERSION_1)/$(COMPONENT_ARCHIVE_1)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    41
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    42
COMPONENT_ARCHIVE_2=		libsam-LGPL.tar
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    43
COMPONENT_ARCHIVE_HASH_2=	sha1:58871eebb9ebfe57a3db0490616786972cb858fe
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    44
COMPONENT_ARCHIVE_URL_2=	http://hub.opensolaris.org/bin/download/Project+samqfs/files/libsam%2DLGPL.tar
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    45
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    46
include ../../../make-rules/prep.mk
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    47
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    48
SRC_OFFSET =	source3
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    49
# Now we override paths to .built
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    50
BUILD_DIR_32 = $(BUILD_DIR)/$(MACH32)/$(SRC_OFFSET)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    51
BUILD_DIR_64 = $(BUILD_DIR)/$(MACH64)/$(SRC_OFFSET)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    52
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    53
include ../../../make-rules/configure.mk
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    54
include ../../../make-rules/ips.mk
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    55
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    56
PATCH_LEVEL =	0
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    57
CONFIGURE_SCRIPT = $(BUILD_DIR_$(BITS))/configure
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    58
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    59
PKG_OPTIONS += -I $(COMPONENT_DIR)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    60
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    61
DOCS-XML_DIR =	$(SOURCE_DIR)/docs-xml
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    62
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    63
# Build mozldap if not yet built.
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    64
$(COMPONENT_DIR)/../mozldap/build/$(MACH32)/.installed \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    65
$(COMPONENT_DIR)/../mozldap/build/$(MACH64)/.installed:
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    66
	$(GMAKE) -C $(COMPONENT_DIR)/../mozldap install
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    67
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    68
# Clone mozldap libs and headers to $(PROTO_DIR).
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    69
# Create also $(PROTO_DIR).
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    70
$(PROTO_DIR)/.mozldap:	   $(COMPONENT_DIR)/../mozldap/build/$(MACH32)/.installed \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    71
			   $(COMPONENT_DIR)/../mozldap/build/$(MACH64)/.installed
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    72
	$(MKDIR) $(PROTO_DIR)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    73
	$(CLONEY) $(COMPONENT_DIR)/../mozldap/build/prototype/$(MACH) $(PROTO_DIR)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    74
	$(TOUCH) [email protected]
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    75
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    76
# Solve dependencies before the 32bits configure.
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    77
$(BUILD_DIR_32)/.configured: $(DOCS-XML_DIR)/.built $(PROTO_DIR)/.mozldap \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    78
			$(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    79
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    80
# Start 64bits configure after the 32bits one is finished
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    81
# to have all dependecies solved.
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    82
$(BUILD_DIR_64)/.configured: $(BUILD_DIR_32)/.configured
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    83
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    84
# re-create configure dir with respect of SRC_OFFSET
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    85
# (target $(BUILD_DIR_64)/.configured does not know about
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    86
# the lower level of directories)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    87
COMPONENT_PRE_CONFIGURE_ACTION = \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    88
	$(RM) -r $(BUILD_DIR)/$(MACH$(BITS)) ; \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    89
	$(MKDIR) $(BUILD_DIR)/$(MACH$(BITS)) ;
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    90
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    91
# Clone SOURCE_DIR and remove links to all of the files generated
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    92
# from *.in to distinguish then between the 32/64bits builds.
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    93
COMPONENT_PRE_CONFIGURE_ACTION += \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    94
	( $(CLONEY) $(SOURCE_DIR) $(BUILD_DIR)/$(MACH$(BITS)) ; \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    95
	  find $(@D)/.. -name '*.in' | sed -e 's/.in$$//' | xargs $(RM) ) ;
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    96
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    97
# finish preparation
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    98
COMPONENT_PRE_CONFIGURE_ACTION += \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
    99
	( cd $(@D) ; $(CONFIG_SHELL) autogen.sh )
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   100
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   101
# Depend on $(PROTO_DIR)/.mozldap because this target creates $(PROTO_DIR).
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   102
$(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so: Solaris/libsam.c \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   103
		$(COMPONENT_ARCHIVE_2) $(PROTO_DIR)/.mozldap
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   104
	$(MKDIR) $(PROTO_DIR)/opt/SUNWsamfs/lib
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   105
	$(CC) -G -Kpic -hlibsam.so Solaris/libsam.c \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   106
		-o $(PROTO_DIR)/opt/SUNWsamfs/lib/libsam.so
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   107
	cd $(BUILD_DIR) ; $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_2)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   108
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   109
CFLAGS +=	$(CC_BITS)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   110
CFLAGS +=	$(studio_C99_ENABLE)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   111
CFLAGS +=	$(CFLAGS.studio)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   112
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   113
CPPFLAGS +=	-I$(PROTOINCDIR)/samba -I$(PROTOINCDIR)/samba/ldap6
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   114
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   115
LIBS +=		-lrt -lsocket -lnsl
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   116
# libavahi is not for 64bits but we do not need it
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   117
LIBS32 =	-lsendfile -lavahi-common -lavahi-core
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   118
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   119
LDFLAGS.32 +=	-L $(PROTOUSRLIBDIR)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   120
LDFLAGS.32 +=	-L $(PROTOUSRLIBDIR)/samba -R/usr/lib/samba
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   121
LDFLAGS.32 +=	-L $(PROTO_DIR)/opt/SUNWsamfs/lib
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   122
LDFLAGS.32 +=	$(LIBS) $(LIBS32)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   123
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   124
LDFLAGS.64 +=	-L $(PROTOUSRLIBDIR)/$(MACH64)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   125
LDFLAGS.64 +=	-L $(PROTOUSRLIBDIR)/samba/$(MACH64) -R/usr/lib/samba/$(MACH64)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   126
LDFLAGS.64 +=	$(LIBS)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   127
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   128
LDFLAGS +=	$(LDFLAGS.$(BITS)) $(LD_OPTIONS)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   129
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   130
CONFIGURE_LIBDIR.32 = /usr/lib/samba
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   131
CONFIGURE_LIBDIR.64 = /usr/lib/samba/$(MACH64)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   132
CONFIGURE_OPTIONS += --includedir=/usr/include/samba
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   133
CONFIGURE_OPTIONS += --sysconfdir=/etc/samba
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   134
CONFIGURE_OPTIONS += --with-configdir=/etc/samba
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   135
CONFIGURE_OPTIONS += --with-privatedir=/etc/samba/private
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   136
CONFIGURE_OPTIONS += --with-swatdir=/usr/share/samba/swat
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   137
CONFIGURE_OPTIONS += --localstatedir=/var/samba
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   138
CONFIGURE_OPTIONS += --with-lockdir=/var/samba/locks
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   139
CONFIGURE_OPTIONS += --with-piddir=/var/samba/locks
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   140
CONFIGURE_OPTIONS += --with-logfilebase=/var/samba/log
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   141
CONFIGURE_OPTIONS += --enable-shared=yes
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   142
CONFIGURE_OPTIONS += --enable-static=no
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   143
CONFIGURE_OPTIONS += --with-static-modules=
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   144
CONFIGURE_OPTIONS.32 += --with-shared-modules=vfs_zfsacl,vfs_samfs,vfs_prealloc,vfs_cacheprime,vfs_commit,idmap_ldap,idmap_tdb2,idmap_rid,idmap_ad,idmap_hash,idmap_adex
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   145
CONFIGURE_OPTIONS.64 += --with-shared-modules=
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   146
CONFIGURE_OPTIONS += --with-readline
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   147
CONFIGURE_OPTIONS += --with-aio-support
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   148
CONFIGURE_OPTIONS += --with-acl-support
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   149
CONFIGURE_OPTIONS += --with-ads
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   150
CONFIGURE_OPTIONS += --with-ldap
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   151
CONFIGURE_OPTIONS += --with-automount
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   152
CONFIGURE_OPTIONS += --with-dnsupdate
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   153
CONFIGURE_OPTIONS += --with-pam
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   154
CONFIGURE_OPTIONS += --with-winbind
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   155
CONFIGURE_OPTIONS += 	LD="$(LD)"
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   156
CONFIGURE_OPTIONS +=	CFLAGS="$(CFLAGS)"
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   157
CONFIGURE_OPTIONS.32 +=	CPPFLAGS="$(CPPFLAGS) -I$(BUILD_DIR)/libsam-LGPL/include"
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   158
CONFIGURE_OPTIONS.64 +=	CPPFLAGS="$(CPPFLAGS)"
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   159
CONFIGURE_OPTIONS +=	LDFLAGS="$(LDFLAGS)"
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   160
CONFIGURE_OPTIONS.32 +=	LIBS="$(LIBS) $(LIBS32)"
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   161
CONFIGURE_OPTIONS.64 +=	LIBS="$(LIBS)"
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   162
CONFIGURE_OPTIONS +=	LDAP_LIBS=-lldap60
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   163
CONFIGURE_OPTIONS +=	CUPS_CONFIG=$(USRBINDIR)/cups-config
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   164
CONFIGURE_OPTIONS.32 +=	SAMFS_LIBS="-R/opt/SUNWsamfs/lib -lsam"
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   165
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   166
# download recent docbook-xsl and unpack it
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   167
$(BUILD_DIR)/$(COMPONENT_SRC_1)/.docbook-xsl-prep: $(COMPONENT_ARCHIVE_1) \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   168
		$(SOURCE_DIR)/.prep $(PROTO_DIR)/.mozldap
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   169
	cd $(BUILD_DIR) ; $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   170
	cd $(DOCS-XML_DIR) ; $(GMAKE) clobber
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   171
	$(TOUCH) [email protected]
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   172
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   173
# create also the: $(DOCS-XML_DIR)/configure and $(DOCS-XML_DIR)/build/catalog.xml
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   174
# needed to buils docs from XML sources
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   175
$(DOCS-XML_DIR)/Makefile.settings: $(BUILD_DIR)/$(COMPONENT_SRC_1)/.docbook-xsl-prep
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   176
	cd $(@D) ; $(GMAKE) configure \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   177
		BUILDDIR=$(@D) \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   178
		DOCBOOKXSLVER=$(COMPONENT_VERSION_1) \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   179
		DOCBOOKXSLDIR=$(BUILD_DIR)/$(COMPONENT_SRC_1)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   180
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   181
# Build docs from DocBook XML sources.
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   182
$(DOCS-XML_DIR)/.built: $(DOCS-XML_DIR)/Makefile.settings
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   183
	cd $(@D) ; \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   184
	env - XML_CATALOG_FILES="catalog.xml file:///$(@D)/build/catalog.xml" \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   185
		$(GMAKE) smbdotconf/parameters.all.xml manpages3 htmlman3
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   186
	$(TOUCH) [email protected]
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   187
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   188
$(PROTO_DIR)/etc/samba/smb.conf-example: $(BUILD_32)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   189
	$(MKDIR) $(@D)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   190
	sed -f $(COMPONENT_DIR)/Solaris/smbconf.sed > [email protected] \
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   191
	   $(BUILD_DIR)/$(MACH32)/examples/smb.conf.default
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   192
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   193
# Samba targets
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   194
$(BUILD_32): COMPONENT_BUILD_TARGETS = showlayout everything
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   195
$(BUILD_64): COMPONENT_BUILD_TARGETS = showlayout nss_modules pam_modules pam_smbpass wins pam_winbind
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   196
$(INSTALL_32): COMPONENT_INSTALL_TARGETS = showlayout install-everything
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   197
$(INSTALL_64): COMPONENT_INSTALL_TARGETS = showlayout installpammodules
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   198
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   199
# common targets
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   200
build:		$(BUILD_32_and_64)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   201
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   202
include ../../../make-rules/shared-targets.mk
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   203
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   204
install:	$(PROTO_DIR)/etc/samba/smb.conf-example $(INSTALL_32_and_64)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   205
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   206
test:		$(NO_TESTS)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   207
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   208
clean::
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   209
	$(GMAKE) -C $(COMPONENT_DIR)/../mozldap clean
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   210
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   211
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   212
84a67a54e8fd 7044174 Move samba(s) and its dependencies to Userland.
Jiri Sasek <jurasek@opensolaris.org>
parents:
diff changeset
   213
include ../../../make-rules/depend.mk