1################################################################################
2#
3# audit
4#
5################################################################################
6
7AUDIT_VERSION = 3.1.2
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
18# src/libev has some assembly function that is not present in Thumb mode:
19# Error: selected processor does not support `mcr p15,0,r3,c7,c10,5' in Thumb mode
20# so, we desactivate Thumb mode
21ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
22AUDIT_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -marm"
23endif
24
25ifeq ($(BR2_PACKAGE_LIBCAP_NG),y)
26AUDIT_DEPENDENCIES += libcap-ng
27AUDIT_CONF_OPTS += --with-libcap-ng=yes
28else
29AUDIT_CONF_OPTS += --with-libcap-ng=no
30endif
31
32# For i386, x86-64 and PowerPC, the system call tables are
33# unconditionally included. However, for ARM(eb) and AArch64, then
34# need to be explicitly enabled.
35
36ifeq ($(BR2_arm)$(BR2_armeb),y)
37AUDIT_CONF_OPTS += --with-arm
38endif
39ifeq ($(BR2_aarch64),y)
40AUDIT_CONF_OPTS += --with-aarch64
41endif
42
43ifeq ($(BR2_INIT_SYSTEMD),y)
44AUDIT_CONF_OPTS += --enable-systemd
45else
46AUDIT_CONF_OPTS += --disable-systemd
47endif
48
49define AUDIT_INSTALL_INIT_SYSV
50	$(INSTALL) -D -m 755 package/audit/S02auditd $(TARGET_DIR)/etc/init.d/S02auditd
51endef
52
53define AUDIT_INSTALL_INIT_SYSTEMD
54	$(INSTALL) -D -m 644 package/audit/audit_tmpfiles.conf \
55		$(TARGET_DIR)/usr/lib/tmpfiles.d/audit.conf
56endef
57
58define AUDIT_INSTALL_CLEANUP
59	$(RM) $(TARGET_DIR)/etc/rc.d/init.d/auditd
60	$(RM) $(TARGET_DIR)/etc/sysconfig/auditd
61endef
62AUDIT_POST_INSTALL_TARGET_HOOKS += AUDIT_INSTALL_CLEANUP
63
64define AUDIT_LINUX_CONFIG_FIXUPS
65	$(call KCONFIG_ENABLE_OPT,CONFIG_NET)
66	$(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT)
67endef
68
69HOST_AUDIT_CONF_OPTS = \
70	--without-python \
71	--without-python3 \
72	--disable-zos-remote \
73	--without-libcap-ng
74
75$(eval $(autotools-package))
76$(eval $(host-autotools-package))
77