[arch-commits] Commit in mmctl/repos (community-x86_64 community-x86_64/PKGBUILD)
Caleb Maclennan
alerque at gemini.archlinux.org
Wed Feb 16 12:47:36 UTC 2022
Date: Wednesday, February 16, 2022 @ 12:47:35
Author: alerque
Revision: 1133454
archrelease: copy trunk to community-x86_64
Added:
mmctl/repos/community-x86_64/
mmctl/repos/community-x86_64/PKGBUILD
(from rev 1133453, mmctl/trunk/PKGBUILD)
----------+
PKGBUILD | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
Copied: mmctl/repos/community-x86_64/PKGBUILD (from rev 1133453, mmctl/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2022-02-16 12:47:35 UTC (rev 1133454)
@@ -0,0 +1,41 @@
+# Maintainer: Caleb Maclennan <caleb at alerque.com>
+# Contributor: Jesús Espino <jespinog at gmail.com>
+
+pkgname=mmctl
+pkgver=6.3.3
+pkgrel=1
+pkgdesc='A remote CLI tool for Mattermost'
+arch=(x86_64)
+url="https://github.com/mattermost/$pkgname"
+license=(Apache)
+depends=(gcc-libs)
+makedepends=(go
+ git)
+_archive="$pkgname-$pkgver"
+source=("$url/archive/v$pkgver/$_archive.tar.gz")
+sha256sums=('c5ed16288989d9c4cf8fcab855b23a283e84dd64d6b14b9ba284cb63e49f1c6c')
+
+prepare() {
+ cd "$_archive"
+ go mod vendor
+}
+
+build() {
+ local _commit=$(zcat ${source[0]##*/} | git get-tar-commit-id)
+ cd "$_archive"
+ export CGO_LDFLAGS="$LDFLAGS"
+ local _config=${url##https://}/commands
+ go build \
+ -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-linkmode external -X \"$_config.gitCommit=$_commit\" -X \"$_config.gitTreeState=clean\" -X \"$_config.buildDate=$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +"%Y-%m-%d %H:%M:%S")\"" \
+ .
+}
+
+package() {
+ cd "$_archive"
+ install -Dm0755 -t "$pkgdir/usr/bin/" "$pkgname"
+ install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE.txt
+}
More information about the arch-commits
mailing list