Makefile revision 1273
7cb128dc4cae2a03a742f63ba7afee23c78e3af0Phil Carmody#
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen# CDDL HEADER START
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen#
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen# The contents of this file are subject to the terms of the
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen# Common Development and Distribution License (the "License").
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen# You may not use this file except in compliance with the License.
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen#
5fbccc935e3f7b916aa7c6e302a212821072e83aTimo Sirainen# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen# or http://www.opensolaris.org/os/licensing.
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen# See the License for the specific language governing permissions
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen# and limitations under the License.
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo Sirainen#
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo Sirainen# When distributing Covered Code, include this CDDL HEADER in each
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo Sirainen# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo Sirainen# If applicable, add the following below this CDDL HEADER, with the
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo Sirainen# fields enclosed by brackets "[]" replaced with your own identifying
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen# information: Portions Copyright [yyyy] [name of copyright owner]
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo Sirainen#
5fbccc935e3f7b916aa7c6e302a212821072e83aTimo Sirainen# CDDL HEADER END
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen#
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo Sirainen#
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo Sirainen#
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo Siraineninclude ../../make-rules/shared-macros.mk
12224fcf2de6724c89f63c0f9ee857f28a270df5Timo Sirainen
4eecd3e2aadb20768a60f701e329b4345d04430cTimo SirainenCOMPONENT_NAME= proftpd
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo SirainenCOMPONENT_VERSION= 1.3.3
c57ba1788a6598993a9625bbf26a4fedca23815eTimo SirainenCOMPONENT_SUBVERSION= g
4eecd3e2aadb20768a60f701e329b4345d04430cTimo SirainenHUMAN_VERSION= $(COMPONENT_VERSION)$(COMPONENT_SUBVERSION)
4eecd3e2aadb20768a60f701e329b4345d04430cTimo SirainenCOMPONENT_PROJECT_URL= http://www.proftpd.org/
eef4ba0cc3e78f8c26804c1c9251a76580a41f0cTimo SirainenCOMPONENT_SRC= $(COMPONENT_NAME)-$(HUMAN_VERSION)
4eecd3e2aadb20768a60f701e329b4345d04430cTimo SirainenCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
4eecd3e2aadb20768a60f701e329b4345d04430cTimo SirainenCOMPONENT_ARCHIVE_HASH= \
402e999a878e0cc41a0afb830fea0a93afc75f0dTimo Sirainen sha256:1705192f8053978fdfc02d89ff500b385d7703555ac311d31c0d1c3accaaec76
4eecd3e2aadb20768a60f701e329b4345d04430cTimo SirainenCOMPONENT_ARCHIVE_URL= ftp://ftp.proftpd.org/distrib/source/$(COMPONENT_ARCHIVE)
4eecd3e2aadb20768a60f701e329b4345d04430cTimo SirainenCOMPONENT_BUGDB= service/ftp-server
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo Sirainen# mod_gss subcomponent
12224fcf2de6724c89f63c0f9ee857f28a270df5Timo SirainenCOMPONENT_NAME_1= mod_gss
12224fcf2de6724c89f63c0f9ee857f28a270df5Timo SirainenCOMPONENT_VERSION_1= $(COMPONENT_VERSION)
12224fcf2de6724c89f63c0f9ee857f28a270df5Timo SirainenCOMPONENT_SRC_1= $(COMPONENT_NAME_1)-$(COMPONENT_VERSION_1)
6a262c9bd8f57cf1e57112e0522dbdab28ae8c29Timo SirainenCOMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1).tar.gz
6a262c9bd8f57cf1e57112e0522dbdab28ae8c29Timo SirainenCOMPONENT_ARCHIVE_HASH_1= \
6a262c9bd8f57cf1e57112e0522dbdab28ae8c29Timo Sirainen sha256:24702cf0333720730cc269eb30529061365b1384fdce274bc3d46ccfc300934e
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo SirainenCOMPONENT_ARCHIVE_URL_1= http://downloads.sourceforge.net/gssmod/$(COMPONENT_ARCHIVE_1)
12224fcf2de6724c89f63c0f9ee857f28a270df5Timo Sirainen
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo Siraineninclude ../../make-rules/prep.mk
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo Siraineninclude ../../make-rules/configure.mk
12224fcf2de6724c89f63c0f9ee857f28a270df5Timo Siraineninclude ../../make-rules/ips.mk
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo Sirainen
b66d803de86bfb411165b3465b0d9ef64ecfe2a1Timo Sirainen# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but it is not
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo Sirainen# enough for us. We need to include the $(COMPONENT_SUBVERSION) somehow.
6a262c9bd8f57cf1e57112e0522dbdab28ae8c29Timo Sirainen# Because the IPS_COMPONENT_VERSION cannot contain letters we used '.0.5'
6a262c9bd8f57cf1e57112e0522dbdab28ae8c29Timo Sirainen# instead of 'e'.
6a262c9bd8f57cf1e57112e0522dbdab28ae8c29Timo SirainenIPS_COMPONENT_VERSION= $(COMPONENT_VERSION).0.7
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo Sirainen
12224fcf2de6724c89f63c0f9ee857f28a270df5Timo SirainenCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS) -I/usr/include/kerberosv5 -DHAVE_KRB5_H=1 -DKRB5_DLLIMP= -DHAVE__GETGRPSBYMEMBER"
12224fcf2de6724c89f63c0f9ee857f28a270df5Timo Sirainen# Force immediate binding because of chroot().
12224fcf2de6724c89f63c0f9ee857f28a270df5Timo SirainenCONFIGURE_OPTIONS += LDFLAGS="-z guidance=nolazyload -z nolazyload -lbsm"
12224fcf2de6724c89f63c0f9ee857f28a270df5Timo SirainenCONFIGURE_OPTIONS += install_user=$(LOGNAME)
6a262c9bd8f57cf1e57112e0522dbdab28ae8c29Timo SirainenCONFIGURE_OPTIONS += install_group=`groups | cut -f 1 -d ' '`
6a262c9bd8f57cf1e57112e0522dbdab28ae8c29Timo SirainenCONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)
6a262c9bd8f57cf1e57112e0522dbdab28ae8c29Timo SirainenCONFIGURE_OPTIONS += --localstatedir=/var/run
12224fcf2de6724c89f63c0f9ee857f28a270df5Timo SirainenCONFIGURE_OPTIONS += --libexecdir=$(USRLIBDIR)/proftpd
12224fcf2de6724c89f63c0f9ee857f28a270df5Timo SirainenCONFIGURE_OPTIONS += --enable-ipv6
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo SirainenCONFIGURE_OPTIONS += --enable-ctrls
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo SirainenCONFIGURE_OPTIONS += --enable-facl
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo SirainenCONFIGURE_OPTIONS += --enable-nls
1a3f9d72e15fb931edf58f104fb7ff12d238f051Timo SirainenCONFIGURE_OPTIONS += --enable-dso
12224fcf2de6724c89f63c0f9ee857f28a270df5Timo SirainenCONFIGURE_OPTIONS += --enable-openssl
4eecd3e2aadb20768a60f701e329b4345d04430cTimo SirainenCONFIGURE_OPTIONS += --disable-static
4eecd3e2aadb20768a60f701e329b4345d04430cTimo SirainenCONFIGURE_OPTIONS += --with-modules=mod_solaris_audit:mod_solaris_priv
4eecd3e2aadb20768a60f701e329b4345d04430cTimo SirainenCONFIGURE_OPTIONS += --with-shared=mod_facl:mod_wrap:mod_tls:mod_auth_gss:mod_gss
4eecd3e2aadb20768a60f701e329b4345d04430cTimo SirainenCONFIGURE_OPTIONS += --enable-buffer-size=16384
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen# Copy Solaris modules and GSSAPI modules to proftpd source tree
4eecd3e2aadb20768a60f701e329b4345d04430cTimo SirainenCOMPONENT_PRE_CONFIGURE_ACTION = \
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen ($(CP) mod_solaris_audit.c $(SOURCE_DIR)/contrib ; \
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen $(CP) mod_solaris_priv.c $(SOURCE_DIR)/contrib ; \
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen cd $(BUILD_DIR) ; \
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen $(UNPACK) $(UNPACK_ARGS) ../$(COMPONENT_ARCHIVE_1) ; \
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen cd $(COMPONENT_SRC_1) ; \
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen $(GPATCH) -p1 < ../../mod_gss-patches/*; \
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen ./configure CC="$(CC)" CFLAGS="-I/usr/include/kerberosv5" ; \
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen $(CP) mod_gss.c mod_auth_gss.c $(SOURCE_DIR)/contrib ; \
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen $(CP) mod_gss.h $(SOURCE_DIR)/include ; \
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen $(CP) mod_gss.html $(SOURCE_DIR)/doc/contrib ; \
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen $(CLONEY) $(SOURCE_DIR) $(@D))
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen# proftpd configure and build is not ready for run out of the source tree
4eecd3e2aadb20768a60f701e329b4345d04430cTimo SirainenCONFIGURE_SCRIPT = $(@D)/configure
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen
f77da594de6318312a7f31589c9e4c38e2b74c73Timo Sirainenbuild: $(BUILD_32)
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Siraineninstall: $(INSTALL_32)
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainentest: $(NO_TESTS)
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen# libcheck and specific Perl Test::Unit version is required for full test
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen
4eecd3e2aadb20768a60f701e329b4345d04430cTimo SirainenBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Siraineninclude ../../make-rules/depend.mk
4eecd3e2aadb20768a60f701e329b4345d04430cTimo Sirainen