Skip to content

Instantly share code, notes, and snippets.

@undu
Last active September 18, 2018 09:47
Show Gist options
  • Save undu/895898ee6317186aa38cea41fbc91d80 to your computer and use it in GitHub Desktop.
Save undu/895898ee6317186aa38cea41fbc91d80 to your computer and use it in GitHub Desktop.
podman-0.9.2.1-0
# Maintainer: xstaticxgpx (optimum.reflex<at>gmail<dot>com)
pkgname=podman
pkgver=0.9.2.1
pkgrel=2
pkgdesc="Utility for running OCI-based containers."
arch=('x86_64')
url="https://github.com/containers/libpod"
license=('Apache-2.0')
depends=(
'cri-o' # Doesn't need the crio service running, uses conmon
'device-mapper'
'libseccomp'
'iptables'
'runc'
'go'
'ostree'
)
makedepends=(
'libseccomp'
'libselinux'
'git'
'go-md2man'
)
source=("https://github.com/containers/libpod/archive/v0.8.5.tar.gz"
"registries.conf"
"mounts.conf"
"seccomp.json"
"policy.json"
)
sha256sums=('14a92bf7c6905e8fa042c1b46cd42cc94f2b517dead0ff31c3d2d97ae98ab7ae'
'bf720633c4c9906e93665813bbf13a73a6cb0df2b412d81228c7673505513d1f'
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
'cfa7dd2c35c8e9cba74a68810e1f377e448988ccb0a54b98232313967677326e'
'cddfaa8e6a7e5497b67cc0dd8e8517058d0c97de91bf46fff867528415f2d946')
prepare() {
export GOPATH="$srcdir/go"
# prepare go src directories
mkdir -p "$srcdir/go/src/github.com/containers"
mv "libpod-0.8.5" "$srcdir/go/src/github.com/containers/libpod"
go get -d github.com/containernetworking/plugins 2>/dev/null || :
}
build() {
export GOPATH="$srcdir/go"
cd "$GOPATH/src/github.com/containers/libpod"
make install.tools
LDFLAGS= make BUILDTAGS='seccomp apparmor selinux'
# cni plugins
cd "$GOPATH/src/github.com/containernetworking/plugins"
./build.sh
}
package() {
export GOPATH="$srcdir/go"
cd "$GOPATH/src/github.com/containers/libpod"
make install DESTDIR="$pkgdir" PREFIX="$pkgdir/usr"
install -Dm644 "$srcdir/registries.conf" "$pkgdir/etc/containers/registries.conf"
install -Dm644 "$srcdir/mounts.conf" "$pkgdir/etc/containers/mounts.conf"
install -Dm644 "$srcdir/seccomp.json" "$pkgdir/usr/share/containers/seccomp.json"
install -Dm644 "$srcdir/policy.json" "$pkgdir/etc/containers/policy.json"
# cni plugins
install -d "$pkgdir/opt/cni/bin"
find "$GOPATH/src/github.com/containernetworking/plugins/bin" -type f -exec install -Dm 755 "{}" "$pkgdir/opt/cni/bin/" \;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment