package/knock: add knockd option

Add knockd option to make libpcap and MMU optional and enable it by
default for backward compatibility

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Fabrice Fontaine 2021-10-16 11:32:34 +02:00 committed by Thomas Petazzoni
parent 04bd3edf34
commit 98728c893d
2 changed files with 19 additions and 4 deletions

View File

@ -1,7 +1,5 @@
config BR2_PACKAGE_KNOCK
bool "knock"
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_LIBPCAP
help
A port knocking implementation.
Provides a daemon and a user application. Port knocking can be
@ -11,3 +9,15 @@ config BR2_PACKAGE_KNOCK
firewall.
http://www.zeroflux.org/projects/knock
if BR2_PACKAGE_KNOCK
config BR2_PACKAGE_KNOCK_KNOCKD
bool "knockd"
default y
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_LIBPCAP
help
Enable knockd
endif

View File

@ -9,10 +9,15 @@ KNOCK_SITE = $(call github,jvinet,knock,v$(KNOCK_VERSION))
KNOCK_AUTORECONF = YES
KNOCK_LICENSE = GPL-2.0+
KNOCK_LICENSE_FILES = COPYING
KNOCK_DEPENDENCIES = libpcap
ifeq ($(BR2_PACKAGE_KNOCK_KNOCKD),y)
KNOCK_DEPENDENCIES += libpcap
KNOCK_CONF_OPTS += --enable-knockd
ifeq ($(BR2_STATIC_LIBS),y)
KNOCK_CONF_OPTS = LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`"
KNOCK_CONF_OPTS += LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`"
endif
else
KNOCK_CONF_OPTS += --disable-knockd
endif
$(eval $(autotools-package))