Skip to content

Instantly share code, notes, and snippets.

@alanorth
Created October 8, 2018 12:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanorth/ef34c8c000aedcbe9d6245768e823b4c to your computer and use it in GitHub Desktop.
Save alanorth/ef34c8c000aedcbe9d6245768e823b4c to your computer and use it in GitHub Desktop.
Arch Linux PKGBUILD for libpod 0.9.3.1
# Maintainer: xstaticxgpx (optimum.reflex<at>gmail<dot>com)
pkgname=libpod
pkgver=0.9.3.1
pkgrel=1
provides=('podman')
replaces=('podman')
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'
'libselinux'
'iptables'
'runc'
'ostree'
)
makedepends=(
'libseccomp'
'libselinux'
'git'
'go'
'go-md2man'
)
source=("https://github.com/containers/${pkgname}/archive/v${pkgver}.tar.gz"
"registries.conf"
"mounts.conf"
"seccomp.json"
"policy.json"
)
sha256sums=('d7fb65494d76481fd1e6bb17183d5dae3ca0eb56dd956f71fe810acf9439018b'
'bf720633c4c9906e93665813bbf13a73a6cb0df2b412d81228c7673505513d1f'
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
'c883cff9c50b01d71ad96403a9e12cab934490fa02b0dce01a602e9c9f720db7'
'cddfaa8e6a7e5497b67cc0dd8e8517058d0c97de91bf46fff867528415f2d946')
prepare() {
export GOPATH="$srcdir/go"
# prepare go src directories
mkdir -p "$srcdir/go/src/github.com/containers"
mv "$pkgname-$pkgver" "$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