summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorml2022-01-25 07:50:44 +0100
committerml2022-01-25 07:50:44 +0100
commit8493a4269aefee5e3302660ad37bcb7f98fe14dc (patch)
tree3b1ebf175315d63c78eee67819362bb28175cee2 /PKGBUILD
parentf1c2a42ddd015c902c141390b60ff02e3465179e (diff)
downloadaur-8493a4269aefee5e3302660ad37bcb7f98fe14dc.tar.gz
updpkg: golang-mockery 2.10.0-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD19
1 files changed, 6 insertions, 13 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 739503ba4de3..d304fcda6fae 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,6 @@
# Maintainer: ml <>
pkgname=golang-mockery
-_pkgname=${pkgname##golang-}
-pkgver=2.9.4
+pkgver=2.10.0
pkgrel=1
pkgdesc='A mock code autogenerator for golang'
arch=('x86_64')
@@ -10,27 +9,21 @@ license=('BSD')
depends=('glibc')
makedepends=('go')
source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
-sha256sums=('9c490eaa5dd509581e7c272d6af22b17c22b2915267e242ce927f17850ff4a59')
+sha256sums=('a3dcfa1f0599858bbc3ac1cdb17a09702ce0236fd329ddad80f975b8ee11efd1')
build() {
- cd "$_pkgname-$pkgver"
+ cd mockery-"$pkgver"
export CGO_ENABLED=1
export CGO_LDFLAGS="$LDFLAGS"
export CGO_CFLAGS="$CFLAGS"
export CGO_CPPFLAGS="$CPPFLAGS"
export CGO_CXXFLAGS="$CXXFLAGS"
export GOFLAGS='-buildmode=pie -modcacherw -trimpath'
- go build -o bin/"$_pkgname" -ldflags "-linkmode=external -X github.com/vektra/mockery/v2/pkg/config.SemVer=$pkgver"
+ go build -o mockery -ldflags "-linkmode=external -X github.com/vektra/mockery/v2/pkg/config.SemVer=$pkgver" main.go
}
-# TODO: review
-#check() {
-# cd "$_pkgname-$pkgver"
-# go test ./...
-#}
-
package() {
- cd "$_pkgname-$pkgver"
- install -Dm755 bin/"$_pkgname" -t "$pkgdir/usr/bin"
+ cd mockery-"$pkgver"
+ install -Dm755 mockery -t "$pkgdir/usr/bin"
install -Dm755 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}