blob: bc6a9b3b102da6a20e5573fb8e473afef59f0dbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# Maintainer: Knut Ahlers <knut at ahlers dot me>
pkgname=gofumpt-git
pkgver=r140.0c61c1e
pkgrel=1
pkgdesc="A stricter gofmt"
arch=('i686' 'x86_64')
url="https://github.com/mvdan/gofumpt"
license=('custom')
makedepends=('git' 'go')
source=("${pkgname}::git+${url}.git")
sha512sums=('SKIP')
build() {
cd "${srcdir}/${pkgname}"
GO111MODULE=on go build -mod=readonly
}
package() {
cd ${pkgname}
install -Dm755 -t "${pkgdir}/usr/bin" gofumpt
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)"
)
}
|