diff --git a/sys-process/audit/audit-2.3.6.ebuild b/sys-process/audit/audit-2.3.6.ebuild index dfd16b3..4999240 100644 --- a/sys-process/audit/audit-2.3.6.ebuild +++ b/sys-process/audit/audit-2.3.6.ebuild @@ -3,9 +3,10 @@ # $Header: $ EAPI="5" + PYTHON_COMPAT=( python2_7 ) -inherit autotools multilib toolchain-funcs python-r1 linux-info eutils +inherit autotools multilib multilib-minimal toolchain-funcs python-r1 linux-info eutils systemd DESCRIPTION="Userspace utilities for storing and processing auditing records" HOMEPAGE="http://people.redhat.com/sgrubb/audit/" @@ -21,7 +22,6 @@ RESTRICT="test" RDEPEND="apparmor? ( sys-apps/apparmor ) ldap? ( net-nds/openldap ) - python? ( ${PYTHON_DEPS} ) tcpd? ( sys-apps/tcp-wrappers ) sys-libs/libcap-ng" DEPEND="${RDEPEND} @@ -29,8 +29,8 @@ DEPEND="${RDEPEND} >=sys-kernel/linux-headers-2.6.34" # Do not use os-headers as this is linux specific + CONFIG_CHECK="~AUDIT" -PYTHON_DIRS="bindings/python swig" pkg_setup() { linux-info_pkg_setup @@ -61,66 +61,60 @@ src_prepare() { # Regenerate autotooling eautoreconf - # Disable byte-compilation of Python modules. - echo "#!/bin/sh" > py-compile - # Bug 352198: Avoid parallel build fail cd "${S}"/src/mt [[ ! -s private.h ]] && ln -s ../../lib/private.h . } -src_configure() { +multilib_src_configure() { + local ECONF_SOURCE=${S} econf \ --sbindir=/sbin \ --enable-systemd \ --without-prelude \ - $(use_with arm64 aarch64) \ - $(use_with alpha) \ - $(use_with arm) \ - $(use_with apparmor) \ - $(use_with python) \ - $(use_with tcpd libwrap) + --without-python \ + $(multilib_native_use_with arm64 aarch64) \ + $(multilib_native_use_with alpha) \ + $(multilib_native_use_with arm) \ + $(multilib_native_use_with apparmor) \ + $(multilib_native_use_with tcpd libwrap) + + if multilib_is_native_abi; then + python_configure() { + mkdir -p "${BUILD_DIR}" || die + cd "${BUILD_DIR}" || die + econf --with-python + } + + use python && python_foreach_impl python_configure + fi } -src_compile_python() { - python_copy_sources ${PYTHON_DIRS} +multilib_src_install() { + if multilib_is_native_abi; then + emake DESTDIR="${D}" initdir="$(systemd_get_unitdir)" install - building() { - emake \ - -C "${dir}" \ - VPATH="${BUILD_DIR}"/"${dir}" \ - pyexecdir="$(python_get_sitedir)" - } - local dir - for dir in ${PYTHON_DIRS}; do - python_foreach_impl building - done + python_install() { + emake -C "${BUILD_DIR}"/swig \ + VPATH="${native_build}/lib" \ + DESTDIR="${D}" install + emake -C "${BUILD_DIR}"/bindings/python \ + VPATH="${S}/bindings/python:${native_build}/bindings/python" \ + DESTDIR="${D}" install + } + + local native_build=${BUILD_DIR} + use python && python_foreach_impl python_install + + # things like shadow use this so we need to be in / + gen_usr_ldscript -a audit auparse + else + emake -C lib DESTDIR="${D}" install + emake -C auparse DESTDIR="${D}" install + fi } -src_compile() { - default - use python && src_compile_python -} - -src_install_python() { - installation() { - emake \ - -C "${dir}" \ - VPATH="${BUILD_DIR}"/"${dir}" \ - DESTDIR="${D}" \ - pyexecdir="$(python_get_sitedir)" \ - install - } - local dir - for dir in ${PYTHON_DIRS}; do - python_foreach_impl installation - done -} - -src_install() { - emake DESTDIR="${D}" install || die - use python && src_install_python - +multilib_src_install_all() { dodoc AUTHORS ChangeLog README* THANKS TODO docinto contrib dodoc contrib/{*.rules,avc_snap,skeleton.c} @@ -130,9 +124,6 @@ src_install() { newinitd "${FILESDIR}"/auditd-init.d-2.3.6 auditd newconfd "${FILESDIR}"/auditd-conf.d-2.3.6 auditd - # things like shadow use this so we need to be in / - gen_usr_ldscript -a audit auparse - [ -f "${D}"/sbin/audisp-remote ] && \ dodir /usr/sbin && \ mv "${D}"/{sbin,usr/sbin}/audisp-remote || die @@ -148,8 +139,7 @@ src_install() { # Security lockdown_perms "${D}" - prune_libtool_files - use python && python_foreach_impl python_optimize + prune_libtool_files --modules } pkg_postinst() {