7 |
7 |
|
8 |
8 |
DESCRIPTION="An OCI container runtime monitor"
|
9 |
9 |
HOMEPAGE="https://github.com/containers/conmon"
|
10 |
|
SRC_URI="https://github.com/containers/conmon/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
10 |
|
|
11 |
if [[ ${PV} == *9999* ]]; then
|
|
12 |
inherit git-r3
|
|
13 |
EGIT_REPO_URI="https://github.com/containers/conmon.git"
|
|
14 |
else
|
|
15 |
SRC_URI="https://github.com/containers/conmon/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
|
16 |
KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
|
|
17 |
GIT_COMMIT="00e08f4a9ca5420de733bf542b930ad58e1a7e7d"
|
|
18 |
fi
|
11 |
19 |
|
12 |
20 |
LICENSE="Apache-2.0"
|
13 |
21 |
SLOT="0"
|
14 |
|
KEYWORDS="amd64 arm64 ~ppc64 ~riscv"
|
15 |
|
IUSE="systemd"
|
|
22 |
IUSE="+seccomp systemd"
|
16 |
23 |
RESTRICT="test"
|
17 |
24 |
|
18 |
25 |
RDEPEND="dev-libs/glib:=
|
19 |
|
sys-libs/libseccomp
|
|
26 |
seccomp? ( sys-libs/libseccomp )
|
20 |
27 |
systemd? ( sys-apps/systemd:= )"
|
21 |
28 |
DEPEND="${RDEPEND}"
|
22 |
29 |
BDEPEND="dev-go/go-md2man"
|
|
30 |
PATCHES=(
|
|
31 |
"${FILESDIR}/conmon-2.1.8-Makefile.patch"
|
|
32 |
)
|
23 |
33 |
|
24 |
34 |
src_prepare() {
|
25 |
35 |
default
|
|
36 |
if use systemd; then
|
|
37 |
sed -i -e 's|shell $(PKG_CONFIG) --exists libsystemd.* && echo "0"|shell echo "0"|g;' Makefile || die
|
|
38 |
else
|
|
39 |
sed -i -e 's|shell $(PKG_CONFIG) --exists libsystemd.* && echo "0"|shell echo "1"|g;' Makefile || die
|
|
40 |
fi
|
26 |
41 |
|
27 |
|
if ! use systemd; then
|
28 |
|
sed -e 's| $(PKG_CONFIG) --exists libsystemd-journal | false |' \
|
29 |
|
-e 's| $(PKG_CONFIG) --exists libsystemd | false |' \
|
30 |
|
-i Makefile || die
|
|
42 |
if use seccomp; then
|
|
43 |
echo -e '#!/usr/bin/env bash\necho "0"' > hack/seccomp-notify.sh || die
|
|
44 |
else
|
|
45 |
echo -e '#!/usr/bin/env bash\necho "1"' > hack/seccomp-notify.sh || die
|
31 |
46 |
fi
|
32 |
|
sed -e 's|make -C tools|$(MAKE) -C tools|' -i Makefile || die
|
33 |
|
sed -e 's|^GOMD2MAN = .*|GOMD2MAN = go-md2man|' -i docs/Makefile || die
|
34 |
47 |
}
|
35 |
48 |
|
36 |
49 |
src_compile() {
|
37 |
|
tc-export CC
|
38 |
|
emake GIT_COMMIT="v${PV}" \
|
39 |
|
all
|
|
50 |
tc-export CC PKG_CONFIG
|
|
51 |
export PREFIX=${EPREFIX}/usr GOMD2MAN=go-md2man
|
|
52 |
if [[ ${PV} == *9999* ]]; then
|
|
53 |
default
|
|
54 |
else
|
|
55 |
emake GIT_COMMIT="${GIT_COMMIT}"
|
|
56 |
fi
|
40 |
57 |
}
|
41 |
58 |
|
42 |
59 |
src_install() {
|
43 |
|
emake DESTDIR="${D}" \
|
44 |
|
PREFIX="${EPREFIX}/usr" \
|
45 |
|
install
|
|
60 |
default
|
46 |
61 |
dodir /usr/libexec/podman
|
47 |
|
ln "${ED}/usr/"{bin,libexec/podman}/conmon || die
|
48 |
|
dodoc README.md
|
|
62 |
dosym ../../bin/"${PN}" /usr/libexec/podman/conmon
|
49 |
63 |
}
|