diff options
author | SiHuan | 2021-01-23 19:58:27 +0800 |
---|---|---|
committer | SiHuan | 2021-01-23 19:58:27 +0800 |
commit | 43122f8031e568a9a235037d18af18c5e33f05fb (patch) | |
tree | 82557d36228c7c2a5897aa710cf279ceef2c153a | |
download | aur-43122f8031e568a9a235037d18af18c5e33f05fb.tar.gz |
first commit
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 42 |
2 files changed, 58 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..370723e700ab --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = dockfmt-git + pkgdesc = Dockerfile format and parser. Like `gofmt` but for Dockerfiles. + pkgver = r59.1455059 + pkgrel = 1 + url = https://github.com/jessfraz/dockfmt + arch = x86_64 + license = MIT + makedepends = git + makedepends = go + provides = dockfmt + conflicts = dockfmt + source = dockfmt::git+https://github.com/jessfraz/dockfmt + sha512sums = SKIP + +pkgname = dockfmt-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8d9e3eecd0a3 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: SiHuan <sihuan at sakuya.love> +_pkgname=dockfmt +pkgname=$_pkgname-git +pkgver="r59.1455059" +pkgrel=1 +pkgdesc='Dockerfile format and parser. Like `gofmt` but for Dockerfiles.' +arch=('x86_64') +url="https://github.com/jessfraz/$_pkgname" +license=('MIT') +depends=() +makedepends=('git' 'go') +provides=("$_pkgname") +conflicts=("$_pkgname") +source=("$_pkgname::git+$url") +sha512sums=('SKIP') + +pkgver() { + cd "$srcdir/$_pkgname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + +} + +prepare() { + cd "$srcdir/$_pkgname" + go mod vendor +} + +build() { + export GOPROXY=https://goproxy.cn,direct + cd "$srcdir/$_pkgname" + go build \ + -gcflags "all=-trimpath=${PWD}" \ + -asmflags "all=-trimpath=${PWD}" \ + -ldflags "-extldflags ${LDFLAGS}" \ + -o "$_pkgname" . +} + +package() { + cd "$srcdir/$_pkgname" + install -Dm755 $_pkgname "$pkgdir/usr/bin/$_pkgname" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"} +}
\ No newline at end of file |