package/openvpn: enable pam plugin support
authorAdam Duskett <Aduskett@gmail.com>
Wed, 30 Oct 2019 00:56:02 +0000 (17:56 -0700)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 2 Jan 2020 08:28:25 +0000 (09:28 +0100)
If the linux-pam package is selected, add the package to the
dependency list and explicitly set --enable-plugin-auth-pam.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/openvpn/openvpn.mk

index ce86b5eff70d28a8404027de7bc1864e59062d92..64f459eee3bf27cc6a349798004c478019628727 100644 (file)
@@ -11,7 +11,6 @@ OPENVPN_DEPENDENCIES = host-pkgconf openssl
 OPENVPN_LICENSE = GPL-2.0
 OPENVPN_LICENSE_FILES = COPYRIGHT.GPL
 OPENVPN_CONF_OPTS = \
-       --disable-plugin-auth-pam \
        --enable-iproute2 \
        --with-crypto-library=openssl \
        $(if $(BR2_STATIC_LIBS),--disable-plugins)
@@ -45,6 +44,13 @@ else
 OPENVPN_CONF_OPTS += --disable-selinux
 endif
 
+ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
+OPENVPN_DEPENDENCIES += linux-pam
+OPENVPN_CONF_OPTS += --enable-plugin-auth-pam
+else
+OPENVPN_CONF_OPTS += --disable-plugin-auth-pam
+endif
+
 ifeq ($(BR2_PACKAGE_SYSTEMD),y)
 OPENVPN_DEPENDENCIES += systemd
 OPENVPN_CONF_OPTS += --enable-systemd