xref: /OK3568_Linux_fs/buildroot/package/audit/audit.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# audit
4#
5################################################################################
6
7AUDIT_VERSION = 3.0.6
8AUDIT_SITE = http://people.redhat.com/sgrubb/audit
9AUDIT_LICENSE = GPL-2.0+ (programs), LGPL-2.1+ (libraries)
10AUDIT_LICENSE_FILES = COPYING COPYING.LIB
11AUDIT_CPE_ID_VENDOR = linux_audit_project
12AUDIT_CPE_ID_PRODUCT = linux_audit
13
14AUDIT_INSTALL_STAGING = YES
15
16AUDIT_CONF_OPTS = --without-python --without-python3 --disable-zos-remote
17
18ifeq ($(BR2_PACKAGE_LIBCAP_NG),y)
19AUDIT_DEPENDENCIES += libcap-ng
20AUDIT_CONF_OPTS += --with-libcap-ng=yes
21else
22AUDIT_CONF_OPTS += --with-libcap-ng=no
23endif
24
25# For i386, x86-64 and PowerPC, the system call tables are
26# unconditionally included. However, for ARM(eb) and AArch64, then
27# need to be explicitly enabled.
28
29ifeq ($(BR2_arm)$(BR2_armeb),y)
30AUDIT_CONF_OPTS += --with-arm
31endif
32ifeq ($(BR2_aarch64),y)
33AUDIT_CONF_OPTS += --with-aarch64
34endif
35
36ifeq ($(BR2_INIT_SYSTEMD),y)
37AUDIT_CONF_OPTS += --enable-systemd
38else
39AUDIT_CONF_OPTS += --disable-systemd
40endif
41
42define AUDIT_INSTALL_INIT_SYSV
43	$(INSTALL) -D -m 755 package/audit/S02auditd $(TARGET_DIR)/etc/init.d/S02auditd
44endef
45
46define AUDIT_INSTALL_INIT_SYSTEMD
47	$(INSTALL) -D -m 644 package/audit/audit_tmpfiles.conf \
48		$(TARGET_DIR)/usr/lib/tmpfiles.d/audit.conf
49endef
50
51define AUDIT_INSTALL_CLEANUP
52	$(RM) $(TARGET_DIR)/etc/rc.d/init.d/auditd
53	$(RM) $(TARGET_DIR)/etc/sysconfig/auditd
54endef
55AUDIT_POST_INSTALL_TARGET_HOOKS += AUDIT_INSTALL_CLEANUP
56
57define AUDIT_LINUX_CONFIG_FIXUPS
58	$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
59	$(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT)
60endef
61
62HOST_AUDIT_CONF_OPTS = \
63	--without-python \
64	--without-python3 \
65	--disable-zos-remote \
66	--without-libcap-ng
67
68$(eval $(autotools-package))
69$(eval $(host-autotools-package))
70