package/ecryptfs-utils: add optional dependency on linux-pam
authorYi Zheng <goodmenzy@gmail.com>
Wed, 27 Nov 2019 04:23:48 +0000 (12:23 +0800)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 24 Dec 2019 14:00:59 +0000 (15:00 +0100)
If linux-pam is enabled, we want to build pam_ecryptfs.so and install
it into /lib/security/.

Signed-off-by: Yi Zheng <goodmenzy@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/ecryptfs-utils/ecryptfs-utils.mk

index eb3194b6d0d9dc7201f50e62a94109f4c0ee3e8d..326ff4f2ddfdfad7eb427aa1d2a74dddda254dea 100644 (file)
@@ -11,13 +11,20 @@ ECRYPTFS_UTILS_LICENSE = GPL-2.0+
 ECRYPTFS_UTILS_LICENSE_FILES = COPYING
 
 ECRYPTFS_UTILS_DEPENDENCIES = keyutils libnss host-intltool
-ECRYPTFS_UTILS_CONF_OPTS = --disable-pywrap --disable-pam
+ECRYPTFS_UTILS_CONF_OPTS = --disable-pywrap
 
 #Needed for build system to find pk11func.h and libnss3.so
 ECRYPTFS_UTILS_CONF_ENV = \
        NSS_CFLAGS="-I$(STAGING_DIR)/usr/include/nss -I$(STAGING_DIR)/usr/include/nspr" \
        NSS_LIBS="-lnss3"
 
+ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
+ECRYPTFS_UTILS_CONF_OPTS += --enable-pam
+ECRYPTFS_UTILS_DEPENDENCIES += linux-pam
+else
+ECRYPTFS_UTILS_CONF_OPTS += --disable-pam
+endif
+
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 ECRYPTFS_UTILS_CONF_OPTS += --enable-openssl
 ECRYPTFS_UTILS_DEPENDENCIES += openssl