package/strongswan: add systemd support

When systemd is enabled, configure strongswan with --enable-systemd
and add the systemd dependency. This builds the charon-systemd IKE
daemon, which is designed for native systemd integration (using the
systemd libraries) and is managed by systemd through a service file,
with configuration handled by the swanctl backend.

Pass --disable-systemd when systemd is not selected to keep the
build deterministic.

Signed-off-by: Wei Dai <daiwei@sunkaisens.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Wei Dai
2026-09-20 15:40:56 +08:00
committed by Thomas Petazzoni
parent 3b04245882
commit 69d99305e5

View File

@@ -70,6 +70,13 @@ endif
# setup piddir if BR2_PACKAGE_STRONGSWAN_PIDDIR is not empty
STRONGSWAN_CONF_OPTS += $(if $(call qstrip,$(BR2_PACKAGE_STRONGSWAN_PIDDIR)),--with-piddir=$(BR2_PACKAGE_STRONGSWAN_PIDDIR))
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
STRONGSWAN_DEPENDENCIES += systemd
STRONGSWAN_CONF_OPTS += --enable-systemd
else
STRONGSWAN_CONF_OPTS += --disable-systemd
endif
ifeq ($(BR2_PACKAGE_STRONGSWAN_NONROOT),y)
STRONGSWAN_CONF_OPTS += \
--with-user=charon \