2021-06-08 14:32:10 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
## usbguard
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2022-03-19 20:34:22 +01:00
|
|
|
USBGUARD_VERSION = 1.1.1
|
2021-06-08 14:32:10 +02:00
|
|
|
USBGUARD_SITE = https://github.com/USBGuard/usbguard/releases/download/usbguard-$(USBGUARD_VERSION)
|
|
|
|
USBGUARD_LICENSE = GPL-2.0+
|
|
|
|
USBGUARD_LICENSE_FILES = LICENSE
|
2022-03-09 22:34:59 +01:00
|
|
|
USBGUARD_CPE_ID_VENDOR = usbguard_project
|
2021-08-04 12:10:57 +02:00
|
|
|
USBGUARD_SELINUX_MODULES = usbguard
|
2021-06-23 18:59:23 +02:00
|
|
|
USBGUARD_CONF_OPTS = \
|
|
|
|
--with-bundled-catch \
|
|
|
|
--with-bundled-pegtl \
|
|
|
|
--disable-debug-build \
|
|
|
|
--without-dbus \
|
|
|
|
--without-polkit \
|
|
|
|
--disable-umockdev
|
2021-06-08 14:32:10 +02:00
|
|
|
|
|
|
|
USBGUARD_DEPENDENCIES += libqb protobuf
|
|
|
|
|
2021-08-04 12:07:36 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBSODIUM),y)
|
|
|
|
USBGUARD_CONF_OPTS += --with-crypto-library=sodium
|
|
|
|
USBGUARD_DEPENDENCIES += libsodium
|
|
|
|
else ifeq ($(BR2_PACKAGE_LIBOPENSSL),y)
|
2021-06-08 14:32:10 +02:00
|
|
|
USBGUARD_CONF_OPTS += --with-crypto-library=openssl
|
|
|
|
USBGUARD_DEPENDENCIES += libopenssl
|
2021-08-04 12:07:36 +02:00
|
|
|
else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
|
2021-06-23 18:59:24 +02:00
|
|
|
USBGUARD_CONF_ENV += \
|
|
|
|
ac_cv_path_LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config
|
2021-06-08 14:32:10 +02:00
|
|
|
USBGUARD_CONF_OPTS += --with-crypto-library=gcrypt
|
|
|
|
USBGUARD_DEPENDENCIES += libgcrypt
|
|
|
|
endif
|
2021-06-23 18:59:23 +02:00
|
|
|
|
2021-06-08 14:32:10 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD),y)
|
|
|
|
USBGUARD_CONF_OPTS += --enable-systemd
|
|
|
|
USBGUARD_DEPENDENCIES += systemd
|
2021-06-23 18:59:23 +02:00
|
|
|
else
|
|
|
|
USBGUARD_CONF_OPTS += --disable-systemd
|
2021-06-08 14:32:10 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
|
|
|
|
USBGUARD_CONF_OPTS += --enable-seccomp
|
|
|
|
USBGUARD_DEPENDENCIES += libseccomp
|
2021-06-23 18:59:23 +02:00
|
|
|
else
|
|
|
|
USBGUARD_CONF_OPTS += --disable-seccomp
|
2021-06-08 14:32:10 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBCAP_NG),y)
|
|
|
|
USBGUARD_CONF_OPTS += --enable-libcapng
|
|
|
|
USBGUARD_DEPENDENCIES += libcap-ng
|
|
|
|
endif
|
|
|
|
|
|
|
|
define USBGUARD_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -m 0755 -D package/usbguard/S20usbguard \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S20usbguard
|
|
|
|
endef
|
|
|
|
|
2021-06-18 11:47:10 +02:00
|
|
|
define USBGUARD_PERMISSIONS
|
|
|
|
/etc/usbguard/rules.conf f 0600 0 0 - - - - -
|
|
|
|
endef
|
|
|
|
|
2021-06-08 14:32:10 +02:00
|
|
|
$(eval $(autotools-package))
|