diff options
author | Sam | 2021-08-11 00:15:30 +0000 |
---|---|---|
committer | Sam | 2021-08-11 00:15:30 +0000 |
commit | b4214a2007a5246173d74ce4128d74936cebfe48 (patch) | |
tree | 7a404797d4421ca680695bb018e1fe5099af2877 /PKGBUILD | |
download | aur-b4214a2007a5246173d74ce4128d74936cebfe48.tar.gz |
wip
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ac591b22b2ca --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: samarthj <dev@samarthj.com> +# Contributor: Morten Linderud <morten@linderud.pw> + +pkgname=buildah-git +_pkgname=buildah +pkgver=1.22.0.r21.g88f55c8f +pkgrel=1 +pkgdesc="A tool which facilitates building OCI images (git)" +arch=('any') +depends=(crun skopeo slirp4netns) +makedepends=('go' 'go-md2man' 'git' 'bash-bats' + 'btrfs-progs' 'libassuan' 'bzip2' + 'go-md2man' 'runc' 'skopeo' + 'systemd' 'containers-common') +provides=("$_pkgname") +conflicts=("$_pkgname") +url="https://github.com/containers/$_pkgname.git" +license=(Apache) +source=("git+$url") +sha256sums=('SKIP') + +pkgver() { + cd "${_pkgname}" + ver=$(git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g') + echo ${ver#v} +} + +build() { + export SECURITYTAGS='seccomp apparmor' + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath" + + cd $_pkgname + make EXTRA_LDFLAGS='-s -w -linkmode=external' +} + +package() { + depends+=('libseccomp.so' 'libdevmapper.so' 'libgpgme.so') + + cd $_pkgname + make install install.completions DESTDIR="$pkgdir" PREFIX=/usr + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} |