void-packages/srcpkgs/cri-o/template

62 lines
1.8 KiB
Bash
Raw Normal View History

2018-12-10 05:12:24 +00:00
# Template file for 'cri-o'
pkgname=cri-o
2019-02-01 05:23:06 +00:00
version=1.13.0
2018-12-10 05:12:24 +00:00
revision=1
build_style=go
go_import_path="github.com/kubernetes-sigs/cri-o"
go_package="${go_import_path}/cmd/crio ${go_import_path}/cmd/crio-config"
go_build_tags="apparmor seccomp exclude_graphdriver_btrfs btrfs_noversion
containers_image_ostree_stub"
conf_files="/etc/crictl.yaml /etc/crio/crio.conf /etc/crio/seccomp.json"
hostmakedepends="pkg-config go-md2man"
makedepends="gpgme-devel libglib-devel libseccomp-devel libapparmor-devel
device-mapper-devel"
short_desc="OCI-based implementation of Kubernetes Container Runtime Interface"
maintainer="Cameron Nemo <camerontnorman@gmail.com>"
license="Apache-2.0"
homepage="https://github.com/kubernetes-sigs/cri-o"
distfiles="https://github.com/kubernetes-sigs/cri-o/archive/v${version}.tar.gz"
2019-02-01 05:23:06 +00:00
checksum=92588998dbb79002c38f65f84602b5659f0d0ef1cd36b1a568a2e40269b66816
2018-12-10 05:12:24 +00:00
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" cri-o-devel"
fi
post_build() {
cd conmon
if [ "$CROSS_BUILD" ]; then
crio-config
else
"${GOPATH}"/bin/crio-config
fi
cd ..
CFLAGS+=' -fPIC' make -C conmon
make -C pause
if [ "$CROSS_BUILD" ]; then
crio --config="" config --default > crio.conf
else
"${GOPATH}"/bin/crio --config="" config --default > crio.conf
fi
make docs
}
post_install() {
vinstall bin/conmon 755 usr/libexec/crio
vinstall bin/pause 755 usr/libexec/crio
make install.man PREFIX="${DESTDIR}/usr"
vinstall crio.conf 644 etc/crio
vinstall seccomp.json 644 etc/crio
vinstall crictl.yaml 644 etc
vinstall crio-umount.conf 644 usr/share/oci-umount/oci-umount.d
vmkdir usr/share/examples/"${pkgname}"
vcopy contrib/cni usr/share/examples/"${pkgname}"
}
cri-o-devel_package() {
short_desc+=" - development tools"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/bin/crio-config
}
}