Makefile revision 2362
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
c92c50783e4e93699f2a42643b8f200b9b719c87Automatic Updater# CDDL HEADER START
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The contents of this file are subject to the terms of the
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# Common Development and Distribution License (the "License").
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You may not use this file except in compliance with the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# or http://www.opensolaris.org/os/licensing.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# See the License for the specific language governing permissions
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# and limitations under the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
c92c50783e4e93699f2a42643b8f200b9b719c87Automatic Updater# information: Portions Copyright [yyyy] [name of copyright owner]
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER END
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrewsinclude ../../make-rules/shared-macros.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_NAME= proftpd
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_VERSION= 1.3.4
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_SUBVERSION= c
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsHUMAN_VERSION= $(COMPONENT_VERSION)$(COMPONENT_SUBVERSION)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_PROJECT_URL= http://www.proftpd.org/
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_SRC= $(COMPONENT_NAME)-$(HUMAN_VERSION)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE_HASH= \
582f8b9a8d170a80ef67475bddb8ad5cf7cd7cadMark Andrews sha256:fb80dd422969b8c900920a30a56f5e272862275d244d3857a980f5f2386ea912
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE_URL= ftp://ftp.proftpd.org/distrib/source/$(COMPONENT_ARCHIVE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# mod_gss subcomponent
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_NAME_1= mod_gss
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_VERSION_1= 1.3.6
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_SRC_1= $(COMPONENT_NAME_1)-$(COMPONENT_VERSION_1)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1).tar.gz
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE_HASH_1= \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews sha256:bd1cb3f8ba0668981beb54d8b4de10ab204199327a464debd9da19196bbb23c4
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_ARCHIVE_URL_1= http://downloads.sourceforge.net/gssmod/$(COMPONENT_ARCHIVE_1)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../../make-rules/prep.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../../make-rules/configure.mk
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrewsinclude ../../make-rules/ips.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but it is not
c92c50783e4e93699f2a42643b8f200b9b719c87Automatic Updater# enough for us. We need to include the $(COMPONENT_SUBVERSION) somehow.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Because the IPS_COMPONENT_VERSION cannot contain letters we used '.0.5'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# instead of 'e'.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsIPS_COMPONENT_VERSION= $(COMPONENT_VERSION).0.3
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS) -I/usr/include/kerberosv5 -DHAVE_KRB5_H=1 -DKRB5_DLLIMP= -DHAVE__GETGRPSBYMEMBER"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Force immediate binding because of chroot().
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += LDFLAGS="-z guidance=nolazyload -z nolazyload -lbsm"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += install_user=`id -nu`
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += install_group=`groups | cut -f 1 -d ' '`
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --localstatedir=/var/run
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --libexecdir=$(USRLIBDIR)/proftpd
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-ipv6
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-ctrls
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-facl
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-nls
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-dso
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-openssl
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --disable-static
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --with-modules=mod_solaris_audit:mod_solaris_priv
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --with-shared=mod_facl:mod_wrap:mod_tls:mod_auth_gss:mod_gss
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_OPTIONS += --enable-buffer-size=16384
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Copy Solaris modules and GSSAPI modules to proftpd source tree
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMPONENT_PRE_CONFIGURE_ACTION = \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ($(CP) mod_solaris_audit.c $(SOURCE_DIR)/contrib ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(CP) mod_solaris_priv.c $(SOURCE_DIR)/contrib ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews cd $(BUILD_DIR) ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews cd $(COMPONENT_SRC_1) ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(GPATCH) -p1 < ../../mod_gss-patches/*; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ./configure CC="$(CC)" CFLAGS="-I/usr/include/kerberosv5" ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(CP) mod_gss.c mod_auth_gss.c $(SOURCE_DIR)/contrib ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(CP) mod_gss.h $(SOURCE_DIR)/include ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(CP) mod_gss.html $(SOURCE_DIR)/doc/contrib ; \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(CLONEY) $(SOURCE_DIR) $(@D))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# proftpd configure and build is not ready for run out of the source tree
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIGURE_SCRIPT = $(@D)/configure
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsbuild: $(BUILD_32)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinstall: $(INSTALL_32)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewstest: $(NO_TESTS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# libcheck and specific Perl Test::Unit version is required for full test
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../../make-rules/depend.mk
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews