blob: 89005fbf881386cfa4985a1b60eeb3d36b3170b6 [file] [log] [blame]
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
CROS_WORKON_PROJECT="chromiumos/third_party/libqrtr"
inherit autotools cros-sanitizers cros-workon user
DESCRIPTION="QRTR userspace helper library"
HOMEPAGE="https://github.com/andersson/qrtr"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~*"
IUSE="-asan -qrtr_ns"
DEPEND="
sys-kernel/linux-headers
virtual/pkgconfig
"
src_prepare() {
default
sed -i "/^libdir/s:/lib:/$(get_libdir):" Makefile || die
}
src_configure() {
sanitizers-setup-env
}
src_install() {
emake DESTDIR="${D}" prefix="${EPREFIX}/usr" install
if use qrtr_ns; then
insinto /etc/init
doins "${FILESDIR}/qrtr-ns.conf"
insinto /usr/share/policy
newins "${FILESDIR}/qrtr-ns-seccomp-${ARCH}.policy" \
qrtr-ns-seccomp.policy
fi
}
src_test() {
# TODO(ejcaruso): upstream some tests for this thing
:
}
pkg_preinst() {
if use qrtr_ns; then
enewuser "qrtr"
enewgroup "qrtr"
fi
}