Makefile revision 7299
460N/A#
460N/A# CDDL HEADER START
460N/A#
460N/A# The contents of this file are subject to the terms of the
460N/A# Common Development and Distribution License (the "License").
460N/A# You may not use this file except in compliance with the License.
460N/A#
460N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
460N/A# or http://www.opensolaris.org/os/licensing.
460N/A# See the License for the specific language governing permissions
460N/A# and limitations under the License.
460N/A#
460N/A# When distributing Covered Code, include this CDDL HEADER in each
460N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
460N/A# If applicable, add the following below this CDDL HEADER, with the
460N/A# fields enclosed by brackets "[]" replaced with your own identifying
460N/A# information: Portions Copyright [yyyy] [name of copyright owner]
460N/A#
460N/A# CDDL HEADER END
460N/A
460N/A#
460N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
5649N/A#
460N/ABUILD_BITS= 64
460N/Ainclude ../../make-rules/shared-macros.mk
460N/A
460N/ACOMPONENT_NAME= sudo
5649N/ASRC_VERSION= 1.8.18
783N/ASRC_PATCH_VERSION=1
1244N/Aifdef SRC_PATCH_VERSION
1472N/ACOMPONENT_VERSION= $(SRC_VERSION).$(SRC_PATCH_VERSION)
618N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(SRC_VERSION)p$(SRC_PATCH_VERSION)
1244N/Aelse
1244N/ACOMPONENT_VERSION= $(SRC_VERSION)
460N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(SRC_VERSION)
844N/Aendif
1472N/ACOMPONENT_ARCHIVE_HASH= \
460N/A sha256:e5a0471c721281a693025bbde33ebd9d3db43245d83ab8516bbfc23980379434
1258N/ACOMPONENT_ARCHIVE_URL= http://www.sudo.ws/sudo/dist/$(COMPONENT_ARCHIVE)
460N/ACOMPONENT_PROJECT_URL= http://www.sudo.ws/
3817N/A
3817N/ATPNO= 32515
3817N/A
460N/Ainclude $(WS_MAKE_RULES)/common.mk
460N/A
460N/A# Fix 64-bit linking via compiler.
460N/ALDFLAGS += $(CC_BITS)
1472N/ALDFLAGS += -lldap_r-2.4
1472N/A
1472N/A# Enable adiheap and adistack security extensions
1472N/AADIHEAP_MODE = $(ADIHEAP_ENABLE)
1472N/AADISTACK_MODE = $(ADISTACK_ENABLE)
1472N/A
1472N/A# Allows zero-sized struct/union declarations and void functions with return
1472N/A# statements returning a value to work.
460N/ACFLAGS += -features=extensions
460N/A
460N/ACOMPONENT_PREP_ACTION = ( cd $(@D) ; $(AUTORECONF) -f -I m4 )
460N/A
460N/ACPPFLAGS += -I$(USRINCDIR)/openldap
1472N/ACONFIGURE_ENV += "MAKE=$(GMAKE)"
1472N/A
1472N/ACONFIGURE_OPTIONS += --with-ldap
1472N/ACONFIGURE_OPTIONS += --with-project
1472N/ACONFIGURE_OPTIONS += --with-rundir=/system/volatile/sudo
460N/ACONFIGURE_OPTIONS += --with-pam
460N/ACONFIGURE_OPTIONS += --with-pam-login
460N/ACONFIGURE_OPTIONS += --with-tty-tickets
460N/ACONFIGURE_OPTIONS += --without-insults
460N/ACONFIGURE_OPTIONS += --without-lecture
460N/ACONFIGURE_OPTIONS += --with-ignore-dot
460N/ACONFIGURE_OPTIONS += --with-solaris-audit
460N/ACONFIGURE_OPTIONS += --libexecdir=$(USRLIBDIR64)/sudo
460N/ACONFIGURE_OPTIONS += "sudo_cv_var_nroff_opt_Tascii=no"
460N/A
460N/ACOMPONENT_INSTALL_TARGETS = install
460N/A
3959N/A# Avoid calling "chown 0" on installed files
5649N/ACOMPONENT_INSTALL_ARGS += INSTALL_OWNER=
5649N/A
5649N/A# Make sure that sudo is NOT built with its internal sha2 implementation
460N/A# http://www.sudo.ws/bugs/show_bug.cgi?id=641
460N/ACOMPONENT_TEST_ENV_CMD =
460N/ACOMPONENT_TEST_CMD = \
460N/A if [[ -n $$( elfdump -s "$(VISUDO)" | grep SHA256Init | grep -v UNDEF ) ]]; then \
460N/A echo "SHA256Init is not an undefined symbol in $(VISUDO)"; \
460N/A exit 1; \
460N/A fi; \
460N/A $(GMAKE)
460N/A
460N/A# Tests may output some compilation lines, so just pull out the relevant test
460N/A# output lines for the test results comparison
460N/ACOMPONENT_TEST_TRANSFORMS += '-e "/^parse_gids_test\|^strsplit_test\|^atofoo_test\|^hltq_test\|^sudo_conf\|^sudo_parseln\|^check_addr\|^check_base64\|^check_fill\|^iolog_path\|^check_symbols\|^sudoers\|^testsudoers\|^visudo\|^check_ttyname/!d"'
460N/ACOMPONENT_TEST_TRANSFORMS += '-e "s/\(\/dev\/pts\/\)[0-9][0-9]*/\1\#/"'
460N/A
3701N/AVISUDO=$(BUILD_DIR_64)/plugins/sudoers/visudo
3701N/A
1472N/AREQUIRED_PACKAGES += library/openldap
1472N/AREQUIRED_PACKAGES += library/zlib
1472N/AREQUIRED_PACKAGES += system/library/security/crypto
460N/AREQUIRED_PACKAGES += system/network/ldap/openldap
460N/AREQUIRED_PACKAGES += text/groff/groff-core
1522N/A