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