2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
6 include $(TOPDIR
)/rules.mk
12 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
13 PKG_SOURCE_URL
:=http
://people.redhat.com
/sgrubb
/audit
14 PKG_HASH
:=0e5d4103646e00f8d1981e1cd2faea7a2ae28e854c31a803e907a383c5e2ecb7
16 PKG_MAINTAINER
:=Thomas Petazzoni
<thomas.petazzoni@bootlin.com
>
17 PKG_LICENSE
:=GPL-2.0
-or-later
18 PKG_LICENSE_FILES
:=COPYING
19 PKG_CPE_ID
:=cpe
:/a
:linux_audit_project
:linux_audit
22 PKG_BUILD_DIR
=$(BUILD_DIR
)/$(PKG_NAME
)-packages
/$(PKG_NAME
)-$(PKG_VERSION
)
24 PKG_BUILD_FLAGS
:=no-mips16
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/audit
/Default
30 URL
:=http
://people.redhat.com
/sgrubb
/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 Linux
2.6 kernel
39 define Package
/libauparse
40 $(call Package
/audit
/Default
)
43 TITLE
+= (parsing shared library
)
47 define Package
/libauparse
/description
48 $(call Package
/audit
/Default
/description
)
49 This package contains the audit parsing shared library.
52 define Package
/audit-utils
53 $(call Package
/audit
/Default
)
57 DEPENDS
:= +libaudit
+libauparse
60 define Package
/audit-utils
/description
61 $(call Package
/audit
/Default
/description
)
62 This package contains the audit utilities.
66 $(call Package
/audit
/Default
)
70 DEPENDS
:= +libaudit
+libauparse
+audit-utils
+libev
73 define Package
/audit
/description
74 $(call Package
/audit
/Default
/description
)
75 This package contains the audit daemon.
79 LDFLAGS_FOR_BUILD
="$(HOST_LDFLAGS)" \
80 CPPFLAGS_FOR_BUILD
="$(HOST_CPPFLAGS)" \
81 CFLAGS_FOR_BUILD
="$(HOST_CFLAGS)" \
82 CC_FOR_BUILD
="$(HOSTCC)"
91 ifeq ($(ARCH
),aarch64
)
92 CONFIGURE_ARGS
+= --with-aarch64
93 else ifeq ($(ARCH
),arm
)
94 CONFIGURE_ARGS
+= --with-arm
97 # We can't use the default, as the default passes $(MAKE_ARGS), which
98 # overrides CC, CFLAGS, etc. and defeats the *_FOR_BUILD definitions
99 # passed in CONFIGURE_VARS
101 $(MAKE
) $(PKG_JOBS
) -C
$(PKG_BUILD_DIR
)/$(MAKE_PATH
)
105 $(call Build
/Install
/Default
,install)
106 $(SED
) 's%^dispatcher *=.*%dispatcher = /usr/sbin/audispd%' $(PKG_INSTALL_DIR
)/etc
/audit
/auditd.conf
109 define Build
/InstallDev
110 $(INSTALL_DIR
) $(1)/usr
/include
111 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/* $(1)/usr
/include/
112 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
113 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/*.
pc $(1)/usr
/lib
/pkgconfig
/
114 $(INSTALL_DIR
) $(1)/usr
/lib
115 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/* $(1)/usr
/lib
/
118 define Package
/libauparse
/install
119 $(INSTALL_DIR
) $(1)/usr
/lib
120 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libauparse.so.
* $(1)/usr
/lib
/
123 define Package
/audit-utils
/install
124 $(INSTALL_DIR
) $(1)/usr
/bin
125 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/* $(1)/usr
/bin
/
126 $(INSTALL_DIR
) $(1)/usr
/sbin
128 $(PKG_INSTALL_DIR
)/usr
/sbin
/{augenrules
,audispd
,audisp-remote
,auditctl
,autrace
,aureport
,ausearch
} \
132 define Package
/audit
/install
133 $(INSTALL_DIR
) $(1)/etc
/audit
134 $(CP
) $(PKG_INSTALL_DIR
)/etc
/audit
/* $(1)/etc
/audit
/
135 $(INSTALL_DIR
) $(1)/etc
/init.d
136 $(INSTALL_BIN
) .
/files
/audit.init
$(1)/etc
/init.d
/audit
137 $(INSTALL_DIR
) $(1)/usr
/sbin
138 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/auditd
$(1)/usr
/sbin
/
141 $(eval
$(call BuildPackage
,libauparse
))
142 $(eval
$(call BuildPackage
,audit-utils
))
143 $(eval
$(call BuildPackage
,audit
))