mirror of
https://github.com/luzifer-aur/gofumpt-git.git
synced 2024-11-13 21:32:43 +00:00
Initial version
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
commit
be2ae5e418
2 changed files with 48 additions and 0 deletions
14
.SRCINFO
Normal file
14
.SRCINFO
Normal 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
34
PKGBUILD
Normal 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)"
|
||||||
|
)
|
||||||
|
}
|
Loading…
Reference in a new issue