summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorzxp198210052023-03-29 12:56:05 +0800
committerzxp198210052023-03-29 12:56:05 +0800
commited8062abab427a79254e95ab6b0abda37f3ac917 (patch)
tree0c59a53a6a574aa4a5ef6c8eb291c772d8c547e8 /PKGBUILD
parent2e65a0891e8b424c4db566fc20c8d5658c78c070 (diff)
downloadaur-ed8062abab427a79254e95ab6b0abda37f3ac917.tar.gz
update to 2.23.1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD39
1 files changed, 22 insertions, 17 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c943152d4295..82ec13d9bb9e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,30 @@
-# Maintainer: ml <>
-pkgname=golang-mockery
-pkgver=2.21.1
+# Contributor: matthias.lisin
+# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
+_pkgname=mockery
+pkgname="golang-${_pkgname}"
+pkgver=2.23.1
pkgrel=1
pkgdesc='A mock code autogenerator for golang'
arch=('aarch64' 'x86_64')
url='https://github.com/vektra/mockery'
-license=('BSD')
-depends=('glibc')
-makedepends=('go')
-source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
-sha256sums=('a58e4ac8be76f422e4d7a93ed786b32bcd3b817024b81d652493a6eedd9c6bea')
+license=(BSD)
+depends=(glibc)
+makedepends=(go)
+source=("${_pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
+sha256sums=('9172cbc0f722047175fc030b61adef9a74ec2d35ca1fc1d9cbc53fb0b4faf27d')
build() {
- cd mockery-"$pkgver"
+ cd "${_pkgname}"-"${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 mockery -ldflags "-linkmode=external -X github.com/vektra/mockery/v2/pkg/config.SemVer=v$pkgver" main.go
+ # For Chinese Only
+ #export GO111MODULE=on
+ #export GOPROXY=https://goproxy.cn
+ go build -o "${_pkgname}" -ldflags "-linkmode=external -X github.com/vektra/mockery/v2/pkg/config.SemVer=v${pkgver}" main.go
for i in bash zsh fish; do
# --config=/dev/null to avoid reading .mockery.yaml
@@ -28,10 +33,10 @@ build() {
}
package() {
- cd mockery-"$pkgver"
- install -Dm755 mockery -t "$pkgdir"/usr/bin
- install -Dm755 LICENSE -t "$pkgdir"/usr/share/licenses/"$pkgname"
- install -Dm644 completion.bash "$pkgdir"/usr/share/bash-completion/completions/mockery
- install -Dm644 completion.zsh "$pkgdir"/usr/share/zsh/site-functions/_mockery
- install -Dm644 completion.fish "$pkgdir"/usr/share/fish/vendor_completions.d/mockery.fish
-}
+ cd "${srcdir}/${_pkgname}-${pkgver}"
+ install -Dm755 "${_pkgname}" -t "${pkgdir}/usr/bin"
+ install -Dm644 "LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 "completion.bash" "${pkgdir}/usr/share/bash-completion/completions/${_pkgname}"
+ install -Dm644 "completion.zsh" "${pkgdir}/usr/share/zsh/site-functions/_${_pkgname}"
+ install -Dm644 "completion.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/${_pkgname}.fish"
+} \ No newline at end of file