Initial version

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2020-08-08 20:06:25 +02:00
commit be2ae5e418
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
2 changed files with 48 additions and 0 deletions

14
.SRCINFO Normal file
View file

@ -0,0 +1,14 @@
pkgbase = gofumpt-git
pkgdesc = A stricter gofmt
pkgver = r111.ab5a819
pkgrel = 1
url = https://github.com/mvdan/gofumpt
arch = i686
arch = x86_64
license = custom
makedepends = go
source = gofumpt-git::git+https://github.com/mvdan/gofumpt.git
sha512sums = SKIP
pkgname = gofumpt-git

34
PKGBUILD Normal file
View file

@ -0,0 +1,34 @@
# Maintainer: Knut Ahlers <knut at ahlers dot me>
pkgname=gofumpt-git
pkgver=r111.ab5a819
pkgrel=1
pkgdesc="A stricter gofmt"
arch=('i686' 'x86_64')
url="https://github.com/mvdan/gofumpt"
license=('custom')
makedepends=('go')
source=("${pkgname}::git+${url}.git")
sha512sums=('SKIP')
build() {
cd "${srcdir}/${pkgname}"
GO111MODULE=on go build -mod=readonly
cd "${srcdir}/${pkgname}/gofumports"
GO111MODULE=on go build -mod=readonly
}
package() {
cd ${pkgname}
install -Dm755 -t "${pkgdir}/usr/bin" gofumpt gofumports/gofumports
install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE LICENSE.google
}
pkgver() {
cd "${srcdir}/${pkgname}"
(
set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}