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