HOST_LIBSELINUX_PYLIBVER = python$(PYTHON_VERSION_MAJOR)
endif
+# DESTDIR is needed during the compile to compute library and header paths.
HOST_LIBSELINUX_MAKE_OPTS = \
$(HOST_CONFIGURE_OPTS) \
+ DESTDIR=$(HOST_DIR) \
+ PREFIX=$(HOST_DIR) \
LDFLAGS="$(HOST_LDFLAGS) -lpcre -lpthread" \
PYINC="$(HOST_LIBSELINUX_PYINC)" \
PYSITEDIR="$(HOST_DIR)/lib/$(HOST_LIBSELINUX_PYLIBVER)/site-packages" \
SWIG_LIB="$(HOST_DIR)/share/swig/$(SWIG_VERSION)/"
define HOST_LIBSELINUX_BUILD_CMDS
- # DESTDIR is needed during the compile to compute library and
- # header paths.
$(HOST_MAKE_ENV) $(MAKE1) -C $(@D) \
- $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) \
- SHLIBDIR=$(HOST_DIR)/lib all
+ $(HOST_LIBSELINUX_MAKE_OPTS) all
# Generate python interface wrapper
$(HOST_MAKE_ENV) $(MAKE1) -C $(@D) \
- $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) swigify pywrap
+ $(HOST_LIBSELINUX_MAKE_OPTS) swigify pywrap
endef
define HOST_LIBSELINUX_INSTALL_CMDS
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) \
- $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) \
- SHLIBDIR=$(HOST_DIR)/lib SBINDIR=$(HOST_DIR)/sbin install
- (cd $(HOST_DIR)/lib; $(HOSTLN) -sf libselinux.so.1 libselinux.so)
+ $(HOST_LIBSELINUX_MAKE_OPTS) install
+ ln -sf libselinux.so.1 $(HOST_DIR)/lib/libselinux.so
# Install python interface wrapper
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) \
- $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) install-pywrap
+ $(HOST_LIBSELINUX_MAKE_OPTS) install-pywrap
endef
$(eval $(generic-package))