mirror of
https://github.com/built-aur/packages
synced 2024-08-14 23:01:15 +00:00
addpkg: goreleaser
This commit is contained in:
parent
f5d50f0a59
commit
72aae3117a
2 changed files with 43 additions and 0 deletions
42
packages/goreleaser/PKGBUILD
Normal file
42
packages/goreleaser/PKGBUILD
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
# Maintainer: MedzikUser <nivua1fn@duck.com>
|
||||||
|
pkgname='goreleaser'
|
||||||
|
pkgver='1.9.2'
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='Deliver Go binaries as fast and easily as possible'
|
||||||
|
arch=('x86_64')
|
||||||
|
url="https://github.com/goreleaser/goreleaser"
|
||||||
|
license=('MIT')
|
||||||
|
|
||||||
|
depends=('go')
|
||||||
|
makedepends=('go')
|
||||||
|
|
||||||
|
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
|
||||||
|
sha256sums=('f50f8d7c4809eacb0824a215a7b70329b10f241b0a8bbf9cec0fcba3329914a6')
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$pkgname-$pkgver"
|
||||||
|
|
||||||
|
local _flags
|
||||||
|
_flags=(
|
||||||
|
-X main.version="$pkgver"
|
||||||
|
-X main.builtBy="medzikuser"
|
||||||
|
)
|
||||||
|
|
||||||
|
export CGO_CPPFLAGS="$CPPFLAGS"
|
||||||
|
export CGO_CFLAGS="$CFLAGS"
|
||||||
|
export CGO_CXXFLAGS="$CXXFLAGS"
|
||||||
|
export CGO_LDFLAGS="$LDFLAGS"
|
||||||
|
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -modcacherw"
|
||||||
|
|
||||||
|
go build \
|
||||||
|
-v \
|
||||||
|
-ldflags "${_flags[*]}" \
|
||||||
|
-o bin/$pkgname \
|
||||||
|
.
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$pkgname-$pkgver"
|
||||||
|
install -Dm 755 bin/$pkgname "$pkgdir/usr/bin/$pkgname"
|
||||||
|
install -Dm 644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
|
}
|
1
packages/goreleaser/built.conf
Normal file
1
packages/goreleaser/built.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
GITHUB_REPO="goreleaser/goreleaser"
|
Loading…
Reference in a new issue