2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
6 include $(TOPDIR
)/rules.mk
8 PKG_NAME
:=audit-userspace
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
12 PKG_SOURCE_URL
:=https
://github.com
/linux-audit
/audit-userspace
/archive
/refs
/tags/v
$(PKG_VERSION
).
tar.gz?
13 PKG_HASH
:=aec501760acd13ebbe00e78b9b59f795d16a430b1d673628e346cd18905c594b
14 PKG_MAINTAINER
:=Thomas Petazzoni
<thomas.petazzoni@bootlin.com
>
15 PKG_LICENSE
:=GPL-2.0
-or-later
16 PKG_LICENSE_FILES
:=COPYING
17 PKG_CPE_ID
:=cpe
:/a
:linux_audit_project
:linux_audit
19 PKG_CONFIG_DEPENDS
:=CONFIG_KERNEL_IO_URING
22 PKG_BUILD_FLAGS
:=no-mips16
25 include $(INCLUDE_DIR
)/package.mk
26 include $(INCLUDE_DIR
)/host-build.mk
28 define Package
/audit
/Default
30 URL
:=https
://github.com
/linux-audit
/
33 define Package
/audit
/Default
/description
34 The audit package contains the user space utilities for
35 storing and searching the audit records generated by
36 the audit subsystem in the kernel.
39 define Package
/libaudit
40 $(call Package
/audit
/Default
)
46 define Package
/libaudit
/description
47 $(call Package
/audit
/Default
/description
)
48 This package contains the audit shared library.
51 define Package
/libauparse
52 $(call Package
/audit
/Default
)
59 define Package
/libauparse
/description
60 $(call Package
/audit
/Default
/description
)
61 This package contains the audit parsing shared library.
64 define Package
/audit-utils
65 $(call Package
/audit
/Default
)
67 CATEGORY
:=Administration
69 DEPENDS
:= +libaudit
+libauparse
72 define Package
/audit-utils
/description
73 $(call Package
/audit
/Default
/description
)
74 This package contains the audit utilities.
78 $(call Package
/audit
/Default
)
80 CATEGORY
:=Administration
82 DEPENDS
:= +libaudit
+libauparse
+audit-utils
+libev
85 define Package
/auditd
/description
86 $(call Package
/audit
/Default
/description
)
87 This package contains the audit daemon.
91 LDFLAGS_FOR_BUILD
="$(HOST_LDFLAGS)" \
92 CPPFLAGS_FOR_BUILD
="$(HOST_CPPFLAGS)" \
93 CFLAGS_FOR_BUILD
="$(HOST_CFLAGS)" \
94 CC_FOR_BUILD
="$(HOSTCC)"
99 --disable-zos-remote \
100 --disable-gssapi-krb5 \
101 --without-libcap-ng \
106 ifeq ($(ARCH
),aarch64
)
107 CONFIGURE_ARGS
+= --with-aarch64
108 else ifeq ($(ARCH
),arm
)
109 CONFIGURE_ARGS
+= --with-arm
112 HOST_CONFIGURE_ARGS
+= \
114 --disable-zos-remote \
115 --disable-gssapi-krb5 \
116 --without-libcap-ng \
122 +$(HOST_MAKE_VARS
) $(MAKE
) $(HOST_JOBS
) -C
$(HOST_BUILD_DIR
)/lib
$(HOST_MAKE_FLAGS
) install
123 +$(HOST_MAKE_VARS
) $(MAKE
) $(HOST_JOBS
) -C
$(HOST_BUILD_DIR
)/init.d
$(HOST_MAKE_FLAGS
) install
126 # We can't use the default, as the default passes $(MAKE_ARGS), which
127 # overrides CC, CFLAGS, etc. and defeats the *_FOR_BUILD definitions
128 # passed in CONFIGURE_VARS
130 $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/$(MAKE_PATH
)
134 $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/lib
$(MAKE_INSTALL_FLAGS
) install
135 $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/init.d
$(MAKE_INSTALL_FLAGS
) install
136 $(call Build
/Install
/Default
,install)
139 define Build
/InstallDev
140 $(INSTALL_DIR
) $(1)/usr
/include
141 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/* $(1)/usr
/include/
142 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
143 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/*.
pc $(1)/usr
/lib
/pkgconfig
/
144 $(INSTALL_DIR
) $(1)/usr
/lib
145 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/* $(1)/usr
/lib
/
148 define Package
/libaudit
/install
149 $(INSTALL_DIR
) $(1)/usr
/lib
150 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libaudit.so
* $(1)/usr
/lib
/
151 $(INSTALL_DIR
) $(1)/etc
152 $(CP
) $(PKG_INSTALL_DIR
)/etc
/libaudit.conf
$(1)/etc
/
155 define Package
/libauparse
/install
156 $(INSTALL_DIR
) $(1)/usr
/lib
157 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libauparse.so
* $(1)/usr
/lib
/
160 define Package
/audit-utils
/install
161 $(INSTALL_DIR
) $(1)/usr
/bin
162 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/* $(1)/usr
/bin
/
163 $(INSTALL_DIR
) $(1)/usr
/sbin
165 $(PKG_INSTALL_DIR
)/usr
/sbin
/{audisp-remote
,audisp-syslog
,auditctl
,augenrules
,aureport
,ausearch
,autrace
} \
169 define Package
/auditd
/install
170 $(INSTALL_DIR
) $(1)/etc
/audit
171 $(CP
) $(PKG_INSTALL_DIR
)/etc
/audit
/* $(1)/etc
/audit
/
172 # af_unix plugin is not installed. Remove it's .conf.
173 if
[[ -f
$(1)/etc
/audit
/plugins.d
/af_unix.conf
]] ; then
rm $(1)/etc
/audit
/plugins.d
/af_unix.conf
; fi
174 $(INSTALL_DIR
) $(1)/etc
/init.d
175 $(INSTALL_BIN
) .
/files
/audit.init
$(1)/etc
/init.d
/audit
176 $(INSTALL_DIR
) $(1)/usr
/sbin
177 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/auditd
$(1)/usr
/sbin
/
180 $(eval
$(call HostBuild
))
181 $(eval
$(call BuildPackage
,libaudit
))
182 $(eval
$(call BuildPackage
,libauparse
))
183 $(eval
$(call BuildPackage
,audit-utils
))
184 $(eval
$(call BuildPackage
,auditd
))