1 ################################################################################
5 ################################################################################
7 SETOOLS_VERSION
= 3.3.8
8 SETOOLS_SOURCE
= setools-
$(SETOOLS_VERSION
).
tar.bz2
9 SETOOLS_SITE
= https
://raw.githubusercontent.com
/wiki
/TresysTechnology
/setools3
/files
/dists
/setools-
$(SETOOLS_VERSION
)
10 SETOOLS_DEPENDENCIES
= libselinux libsepol sqlite libxml2 bzip2 host-bison host-flex
11 SETOOLS_INSTALL_STAGING
= YES
12 SETOOLS_LICENSE
= GPLv2
+, LGPLv2.1
+
13 SETOOLS_LICENSE_FILES
= COPYING COPYING.GPL COPYING.LGPL
15 # configure.ac is patched by the cross compile patch,
16 # so autoreconf is necessary
17 SETOOLS_AUTORECONF
= YES
19 # Notes: Need "disable-selinux-check" so the configure does not check to see
20 # if host has selinux enabled.
21 # No python support as only the libraries and commandline tools are
26 --disable-bwidget-check \
27 --disable-selinux-check \
29 --disable-swig-python \
31 --with-sepol-devel
="$(STAGING_DIR)/usr" \
32 --with-selinux-devel
="$(STAGING_DIR)/usr"
34 ifeq ($(BR2_sparc64
):$(BR2_STATIC_LIBS
),y
:)
35 SETOOLS_CONF_ENV
+= CFLAGS
="$(TARGET_CFLAGS) -fPIC"
38 HOST_SETOOLS_DEPENDENCIES
= host-libselinux host-libsepol host-sqlite \
39 host-libxml2 host-bzip2 host-bison
41 ifeq ($(BR2_PACKAGE_PYTHON3
),y
)
42 HOST_SETOOLS_PYTHON_VERSION
=$(PYTHON3_VERSION_MAJOR
)
43 HOST_SETOOLS_DEPENDENCIES
+= host-python3
44 HOST_SETOOLS_CONF_ENV
+= am_cv_python_version
=$(PYTHON3_VERSION
)
46 HOST_SETOOLS_PYTHON_VERSION
=$(PYTHON_VERSION_MAJOR
)
47 HOST_SETOOLS_DEPENDENCIES
+= host-python
48 HOST_SETOOLS_CONF_ENV
+= am_cv_python_version
=$(PYTHON_VERSION
)
51 HOST_SETOOLS_PYTHON_SITE_PACKAGES
= $(HOST_DIR
)/usr
/lib
/python
$(HOST_SETOOLS_PYTHON_VERSION
)/site-packages
52 HOST_SETOOLS_PYTHON_INCLUDES
= $(HOST_DIR
)/usr
/include/python
$(HOST_SETOOLS_PYTHON_VERSION
)
53 HOST_SETOOLS_PYTHON_LIB
= -lpython
$(HOST_SETOOLS_PYTHON_VERSION
)
55 # Notes: Need "disable-selinux-check" so the configure does not check to see
56 # if host has selinux enabled.
57 # Host builds with python support to enable tools for offline target
59 HOST_SETOOLS_CONF_OPTS
= \
62 --disable-bwidget-check \
63 --disable-selinux-check \
65 --disable-swig-python \
67 --with-sepol-devel
="$(HOST_DIR)/usr" \
68 --with-selinux-devel
="$(HOST_DIR)/usr" \
69 PYTHON_LDFLAGS
="-L$(HOST_DIR)/usr/lib/" \
70 PYTHON_CPPFLAGS
="-I$(HOST_SETOOLS_PYTHON_INCLUDES)" \
71 PYTHON_SITE_PKG
="$(HOST_SETOOLS_PYTHON_SITE_PACKAGES)" \
72 PYTHON_EXTRA_LIBS
="-lpthread -ldl -lutil $(HOST_SETOOLS_PYTHON_LIB)"
74 HOST_SETOOLS_CONF_ENV
+= \
75 am_cv_pathless_PYTHON
=python \
76 ac_cv_path_PYTHON
=$(HOST_DIR
)/usr
/bin
/python \
77 am_cv_python_platform
=linux2 \
78 am_cv_python_version
=$(HOST_SETOOLS_PYTHON_VERSION
) \
79 am_cv_python_pythondir
=$(HOST_SETOOLS_PYTHON_SITE_PACKAGES
) \
80 am_cv_python_pyexecdir
=$(HOST_SETOOLS_PYTHON_SITE_PACKAGES
) \
81 am_cv_python_includes
=-I
$(HOST_SETOOLS_PYTHON_INCLUDES
)
83 $(eval
$(autotools-package
))
84 $(eval
$(host-autotools-package
))