strace: Update to version 5.8
[openwrt/staging/wigyori.git] / package / utils / audit / Makefile
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
4 #
5
6 include $(TOPDIR)/rules.mk
7
8 PKG_NAME:=audit
9 PKG_VERSION:=2.8.5
10 PKG_RELEASE:=1
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
13 PKG_SOURCE_URL:=http://people.redhat.com/sgrubb/audit
14 PKG_HASH:=0e5d4103646e00f8d1981e1cd2faea7a2ae28e854c31a803e907a383c5e2ecb7
15
16 PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
17 PKG_FIXUP:=autoreconf
18
19 PKG_USE_MIPS16:=0
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/audit/Default
24 SECTION:=utils
25 TITLE:=Audit Daemon
26 URL:=http://people.redhat.com/sgrubb/audit/
27 endef
28
29 define Package/audit/Default/description
30 The audit package contains the user space utilities for
31 storing and searching the audit records generated by
32 the audit subsystem in the Linux 2.6 kernel
33 endef
34
35 define Package/libaudit
36 $(call Package/audit/Default)
37 CATEGORY:=Libraries
38 TITLE+= (library)
39 DEPENDS:=+@KERNEL_AUDIT
40 endef
41
42 define Package/libaudit/description
43 $(call Package/audit/Default/description)
44 This package contains the audit shared library.
45 endef
46
47 define Package/audit
48 $(call Package/audit/Default)
49 CATEGORY:=Utilities
50 TITLE+= (daemon)
51 DEPENDS:= +libaudit
52 endef
53
54 define Package/audit/description
55 $(call Package/audit/Default/description)
56 This package contains the audit daemon.
57 endef
58
59 CONFIGURE_VARS += \
60 LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
61 CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \
62 CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
63 CC_FOR_BUILD="$(HOSTCC)"
64
65 CONFIGURE_ARGS += \
66 --without-libcap-ng \
67 --disable-systemd \
68 --without-python \
69 --without-python3 \
70 --disable-zos-remote
71
72 ifeq ($(ARCH),aarch64)
73 CONFIGURE_ARGS += --with-aarch64
74 else ifeq ($(ARCH),arm)
75 CONFIGURE_ARGS += --with-arm
76 endif
77
78 # We can't use the default, as the default passes $(MAKE_ARGS), which
79 # overrides CC, CFLAGS, etc. and defeats the *_FOR_BUILD definitions
80 # passed in CONFIGURE_VARS
81 define Build/Compile
82 $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
83 endef
84
85 define Build/Install
86 $(call Build/Install/Default,install)
87 $(SED) 's%^dispatcher *=.*%dispatcher = /usr/sbin/audispd%' $(PKG_INSTALL_DIR)/etc/audit/auditd.conf
88 endef
89
90 define Build/InstallDev
91 $(INSTALL_DIR) $(1)/usr/include
92 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
93 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
94 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
95 $(INSTALL_DIR) $(1)/usr/lib
96 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
97 endef
98
99 define Package/libaudit/install
100 $(INSTALL_DIR) $(1)/usr/lib
101 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
102 $(INSTALL_DIR) $(1)/etc
103 $(CP) $(PKG_INSTALL_DIR)/etc/libaudit.conf $(1)/etc/
104 endef
105
106 define Package/audit/install
107 $(INSTALL_DIR) $(1)/usr/bin
108 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
109 $(INSTALL_DIR) $(1)/usr/sbin
110 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
111 $(INSTALL_DIR) $(1)/etc/audit
112 $(CP) $(PKG_INSTALL_DIR)/etc/audit/* $(1)/etc/audit/
113 $(INSTALL_DIR) $(1)/etc/init.d
114 $(INSTALL_BIN) ./files/audit.init $(1)/etc/init.d/audit
115 endef
116
117 include $(INCLUDE_DIR)/host-build.mk
118
119 HOST_CONFIGURE_ARGS += \
120 --without-python \
121 --without-python3 \
122 --disable-zos-remote \
123 --without-libcap-ng
124
125 $(eval $(call HostBuild))
126 $(eval $(call BuildPackage,libaudit))
127 $(eval $(call BuildPackage,audit))