[sys-process/audit] sync with in-tree multilib version

This commit is contained in:
Robert Förster 2014-05-30 03:51:58 +02:00
parent dc399d929c
commit 569c9cb8c5

View File

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