shared-macros.mk: simplify java settings
[oi-userland.git] / components / sysutils / sudo / Makefile
blob720fbbb783a94fd26a6153220c9bc6fb9f8a2a73
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
22 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
23 # Copyright (c) 2020, Michal Nowak
24 # Copyright (c) 2020-2022 Nona Hansel
27 include ../../../make-rules/shared-macros.mk
29 COMPONENT_NAME= sudo
30 SRC_VERSION= 1.9.16
31 SRC_PATCH_VERSION= 2
32 SRC_DOT_PATCH_VERSION= $(shell [ $(SRC_PATCH_VERSION) -gt 0 ] && echo .$(SRC_PATCH_VERSION))
33 SRC_P_PATCH_VERSION= $(shell [ $(SRC_PATCH_VERSION) -gt 0 ] && echo p$(SRC_PATCH_VERSION))
34 HUMAN_VERSION= $(SRC_VERSION)$(SRC_P_PATCH_VERSION)
35 COMPONENT_VERSION= $(SRC_VERSION)$(SRC_DOT_PATCH_VERSION)
36 COMPONENT_SUMMARY= sudo - tool to allow certain tasks to be run as root by ordinary users
37 COMPONENT_SRC= $(COMPONENT_NAME)-$(SRC_VERSION)$(SRC_P_PATCH_VERSION)
38 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
39 COMPONENT_ARCHIVE_HASH= sha256:976aa56d3e3b2a75593307864288addb748c9c136e25d95a9cc699aafa77239c
40 COMPONENT_PROJECT_URL= https://www.sudo.ws
41 COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)/sudo/dist/$(COMPONENT_ARCHIVE)
42 COMPONENT_SIG_URL= $(COMPONENT_ARCHIVE_URL).sig
43 COMPONENT_FMRI= security/sudo
44 COMPONENT_CLASSIFICATION= Applications/System Utilities
45 COMPONENT_LICENSE= ISC-like, BSD, zlib license
46 COMPONENT_LICENSE_FILE= LICENSE.md
48 include $(WS_MAKE_RULES)/common.mk
50 CONFIGURE_ENV += MAKE=$(GMAKE)
52 COMPONENT_PREP_ACTION = ( cd $(@D) && autoreconf -vif )
54 CONFIGURE_OPTIONS += --with-ldap
55 CONFIGURE_OPTIONS += --with-project
56 CONFIGURE_OPTIONS += --with-rundir=/var/run/sudo
57 CONFIGURE_OPTIONS += --with-pam
58 CONFIGURE_OPTIONS += --with-pam-login
59 CONFIGURE_OPTIONS += --disable-pam-session
60 CONFIGURE_OPTIONS += --with-tty-tickets
61 CONFIGURE_OPTIONS += --without-insults
62 CONFIGURE_OPTIONS += --without-lecture
63 CONFIGURE_OPTIONS += --with-ignore-dot
64 CONFIGURE_OPTIONS += --with-bsm-audit
65 CONFIGURE_OPTIONS += --libexecdir=$(USRLIBDIR64)
67 COMPONENT_BUILD_ENV += CC="$(CC)"
68 COMPONENT_BUILD_ENV += CXX="$(CXX)"
69 COMPONENT_BUILD_ENV += CFLAGS="$(CFLAGS)"
71 COMPONENT_INSTALL_TARGETS = install
73 COMPONENT_TEST_TRANSFORMS += '-ne "/OK/p" '
74 COMPONENT_TEST_TRANSFORMS += '-ne "/FAIL/p" '
75 COMPONENT_TEST_TRANSFORMS += '-ne "/errors/p" '
76 COMPONENT_TEST_TRANSFORMS += '-ne "/failed/p" '
78 # Avoid calling "chown 0" on installed files
79 COMPONENT_INSTALL_ARGS += INSTALL_OWNER=
81 # Enable aslr for this component
82 ASLR_MODE = $(ASLR_ENABLE)
84 # Auto-generated dependencies
85 REQUIRED_PACKAGES += $(OPENSSL_PKG)
86 REQUIRED_PACKAGES += library/zlib
87 REQUIRED_PACKAGES += system/library