mirror of
https://github.com/luzifer-aur/gofumpt-git.git
synced 2024-11-12 21:02:42 +00:00
35 lines
843 B
Text
35 lines
843 B
Text
|
# 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)"
|
||
|
)
|
||
|
}
|