1 ################################################################################
5 ################################################################################
8 SUDO_SITE = https://www.sudo.ws/sudo/dist
9 SUDO_LICENSE = ISC, BSD-3-Clause
10 SUDO_LICENSE_FILES = doc/LICENSE
11 # This is to avoid sudo's make install from chown()ing files which fails
12 SUDO_INSTALL_TARGET_OPTS = INSTALL_OWNER="" DESTDIR="$(TARGET_DIR)" install
17 --with-logging=syslog \
18 --without-interfaces \
21 ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
22 define SUDO_INSTALL_PAM_CONF
23 $(INSTALL) -D -m 0644 package/sudo/sudo.pam $(TARGET_DIR)/etc/pam.d/sudo
26 SUDO_DEPENDENCIES += linux-pam
27 SUDO_CONF_OPTS += --with-pam
28 SUDO_POST_INSTALL_TARGET_HOOKS += SUDO_INSTALL_PAM_CONF
30 SUDO_CONF_OPTS += --without-pam
33 ifeq ($(BR2_PACKAGE_ZLIB),y)
34 SUDO_CONF_OPTS += --enable-zlib
35 SUDO_DEPENDENCIES += zlib
37 SUDO_CONF_OPTS += --disable-zlib
40 ifeq ($(BR2_PACKAGE_OPENLDAP),y)
41 SUDO_DEPENDENCIES += openldap
42 SUDO_CONF_OPTS += --with-ldap
43 # If we are building sudo statically and openldap was linked with openssl, then
44 # when we link sudo with openldap we need to specify the openssl libs, otherwise
45 # it will fail with "undefined reference" errors.
46 ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_OPENSSL),yy)
47 SUDO_DEPENDENCIES += host-pkgconf
48 SUDO_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`"
51 SUDO_CONF_OPTS += --without-ldap
54 # mksigname/mksiglist needs to run on build host to generate source files
55 define SUDO_BUILD_MKSIGNAME_MKSIGLIST_HOST
56 $(MAKE) $(HOST_CONFIGURE_OPTS) \
57 CPPFLAGS="$(HOST_CPPFLAGS) -I../../include -I../.." \
58 -C $(@D)/lib/util mksigname mksiglist
61 SUDO_POST_CONFIGURE_HOOKS += SUDO_BUILD_MKSIGNAME_MKSIGLIST_HOST
63 define SUDO_PERMISSIONS
64 /usr/bin/sudo f 4755 0 0 - - - - -
67 $(eval $(autotools-package))