[arch-commits] Commit in glab/repos (community-x86_64 community-x86_64/PKGBUILD)
Caleb Maclennan
alerque at gemini.archlinux.org
Sat Jan 8 13:11:13 UTC 2022
Date: Saturday, January 8, 2022 @ 13:11:13
Author: alerque
Revision: 1097005
archrelease: copy trunk to community-x86_64
Added:
glab/repos/community-x86_64/
glab/repos/community-x86_64/PKGBUILD
(from rev 1097004, glab/trunk/PKGBUILD)
----------+
PKGBUILD | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
Copied: glab/repos/community-x86_64/PKGBUILD (from rev 1097004, glab/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2022-01-08 13:11:13 UTC (rev 1097005)
@@ -0,0 +1,49 @@
+# Maintainer: Caleb Maclennan <caleb at alerque.com>
+# Contributor: w0rty <mawo97 at gmail.com>
+# Contributor: Abdo Roig-Maranges <abdo.roig at gmail.com>
+
+pkgname=glab
+pkgver=1.21.1
+pkgrel=3
+pkgdesc='Cli tool to help work seamlessly with Gitlab from the command line'
+arch=(x86_64)
+url="https://github.com/profclems/$pkgname"
+license=(MIT)
+depends=(glibc)
+makedepends=(go)
+replaces=(gitlab-glab)
+options=(!lto)
+_archive="$pkgname-$pkgver"
+source=("$url/archive/v$pkgver/$_archive.tar.gz")
+sha256sums=('878c13d064ca6010437de90ca3711962fd87441fcae39bf01cb0af5aa5efd79e')
+
+build() {
+ cd "$_archive"
+ export CGO_CPPFLAGS="$CPPFLAGS"
+ export CGO_CFLAGS="$CFLAGS"
+ export CGO_CXXFLAGS="$CXXFLAGS"
+ export CGO_LDFLAGS="$LDFLAGS"
+ _builddate=${SOURCE_DATE_EPOCH=:$(date -u +%m/%d/%Y)}
+ go build \
+ -trimpath \
+ -buildmode=pie \
+ -ldflags "-linkmode=external -extldflags \"$LDFLAGS\" -X main.version=v$pkgver -X main.build=$_builddate -X main.usageMode=prod -s -w" \
+ -mod=readonly \
+ -modcacherw \
+ -o "$pkgname" \
+ ./cmd/glab/main.go
+ go run ./cmd/gen-docs/docs.go --manpage --path ./
+ for s in bash fish zsh; do
+ ./$pkgname completion -s $s > $s.completions
+ done
+}
+
+package() {
+ cd "$_archive"
+ install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
+ install -Dm0755 -t "$pkgdir/usr/bin/" "$pkgname"
+ install -Dm0644 -t "$pkgdir/usr/share/man/man1/" "$pkgname.1"
+ install -Dm0644 bash.completions "$pkgdir/usr/share/bash-completion/completions/$pkgname"
+ install -Dm0644 fish.completions "$pkgdir/usr/share/fish/vendor_completions.d/$pkgname.fish"
+ install -Dm0644 zsh.completions "$pkgdir/usr/share/zsh/site-functions/_$pkgname"
+}
More information about the arch-commits
mailing list