xref: /OK3568_Linux_fs/buildroot/package/libapparmor/libapparmor.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# libapparmor
4#
5################################################################################
6
7# When updating the version here, please also update the apparmor package
8LIBAPPARMOR_VERSION_MAJOR = 3.0
9LIBAPPARMOR_VERSION = $(LIBAPPARMOR_VERSION_MAJOR).3
10LIBAPPARMOR_SOURCE = apparmor-$(LIBAPPARMOR_VERSION).tar.gz
11LIBAPPARMOR_SITE = https://launchpad.net/apparmor/$(LIBAPPARMOR_VERSION_MAJOR)/$(LIBAPPARMOR_VERSION)/+download
12LIBAPPARMOR_LICENSE = LGPL-2.1
13LIBAPPARMOR_LICENSE_FILES = LICENSE libraries/libapparmor/COPYING.LGPL
14
15LIBAPPARMOR_DEPENDENCIES = host-bison host-flex host-pkgconf
16LIBAPPARMOR_SUBDIR = libraries/libapparmor
17LIBAPPARMOR_INSTALL_STAGING = YES
18
19# Patches 0001 and 0002 touch Makefile.am and an m4 file
20LIBAPPARMOR_AUTORECONF = YES
21
22# Most AppArmor tools will want to link to the static lib.
23# ac_cv_prog_cc_c99 is required for BR2_USE_WCHAR=n because the C99 test
24# provided by autoconf relies on wchar_t.
25LIBAPPARMOR_CONF_OPTS = \
26	ac_cv_prog_cc_c99=-std=gnu99 \
27	--enable-static \
28	--disable-man-pages
29
30ifeq ($(BR2_PACKAGE_PYTHON3),y)
31LIBAPPARMOR_DEPENDENCIES += host-python3 host-swig python3
32LIBAPPARMOR_CONF_OPTS += \
33	--with-python \
34	PYTHON=$(HOST_DIR)/usr/bin/python3 \
35	PYTHON_CONFIG=$(STAGING_DIR)/usr/bin/python3-config \
36	SWIG=$(SWIG)
37else
38LIBAPPARMOR_CONF_OPTS += --without-python
39endif
40
41define LIBAPPARMOR_LINUX_CONFIG_FIXUPS
42	$(call KCONFIG_ENABLE_OPT,CONFIG_AUDIT)
43	$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY)
44	$(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_APPARMOR)
45	$(call KCONFIG_ENABLE_OPT,CONFIG_DEFAULT_SECURITY_APPARMOR)
46endef
47
48$(eval $(autotools-package))
49