diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 58 |
1 files changed, 30 insertions, 28 deletions
@@ -1,44 +1,46 @@ -# Maintainer: Morten Linderud <morten@linderud.pw> +# Maintainer: samarthj <dev@samarthj.com> +# Contributor: Morten Linderud <morten@linderud.pw> pkgname=buildah-git _pkgname=buildah -pkgver=r1330.391a5bea +pkgver=1.21.0.r64.g814868e7 pkgrel=1 -pkgdesc="A tool which facilitates building OCI images" -arch=('x86_64' 'i686') -url="https://github.com/containers/buildah" -license=('Apache') -makedepends=('go' 'git' 'bash-bats' - 'btrfs-progs' 'device-mapper' - 'gpgme' 'libassuan' 'bzip2' - 'go-md2man' 'runc' 'skopeo' - 'libselinux') -provides=("buildah") -conflicts=("buildah") -source=("git://github.com/containers/buildah.git") +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}" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" -} - -prepare() { - rm -rf "${srcdir}/src" - mkdir -p "${srcdir}"/src/github.com/containers - ln -sf "${srcdir}/${_pkgname}" "${srcdir}/src/github.com/containers/buildah" + ver=$(git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g') + echo ${ver#v} } build() { - export GOPATH="${srcdir}" - cd "${GOPATH}/src/github.com/containers/buildah" - make PREFIX=/usr + 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() { - cd "${_pkgname}" - make -C "${srcdir}/${_pkgname}" DESTDIR="$pkgdir" PREFIX=usr install + 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" } - -# vim:set ts=2 sw=2 et: |