Skip to content

Instantly share code, notes, and snippets.

@clst

clst/PKGBUILD Secret

Created September 24, 2019 13:29
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 clst/a7e766ee1d91ef787fe12fadf4f2d351 to your computer and use it in GitHub Desktop.
Save clst/a7e766ee1d91ef787fe12fadf4f2d351 to your computer and use it in GitHub Desktop.
dive aur quick and dirty patch
# Maintainer: David Birks <david@tellus.space>
# Contributor: David Stark <david@starkers.org>
# Messed up by: JoeCool
pkgname=dive
pkgver=0.8.1
pkgrel=1
pkgdesc='A tool for exploring each layer in a docker image'
url='https://github.com/wagoodman/dive'
arch=('x86_64')
license=('MIT')
depends=('docker')
makedepends=('go')
conflicts=('dive-git')
source=("$pkgname-$pkgver.tar.gz::https://github.com/wagoodman/dive/archive/master.tar.gz")
sha256sums=('SKIP')
build() {
# Trim pwd from path
export GOFLAGS="-gcflags=all=-trimpath=${PWD} -asmflags=all=-trimpath=${PWD} -ldflags=-extldflags=-zrelro -ldflags=-extldflags=-znow"
mv $pkgname-master $pkgname-$pkgver
cd $pkgname-$pkgver
CGO_ENABLED=0 go build -o ./dist/dive_linux_amd64/dive --ldflags "-X main.version=$pkgver" .
}
package() {
install -Dm 755 "$srcdir/$pkgname-$pkgver/dist/dive_linux_amd64/dive" "$pkgdir/usr/bin/dive"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment