[arch-commits] Commit in (4 files)

David Runge dvzrv at archlinux.org
Thu May 27 18:46:47 UTC 2021


    Date: Thursday, May 27, 2021 @ 18:46:47
  Author: dvzrv
Revision: 949111

Add release-cli as a dependency for automating releases with gitlab more conveniently.

Added:
  release-cli/
  release-cli/repos/
  release-cli/trunk/
  release-cli/trunk/PKGBUILD

----------+
 PKGBUILD |   39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

Added: release-cli/trunk/PKGBUILD
===================================================================
--- release-cli/trunk/PKGBUILD	                        (rev 0)
+++ release-cli/trunk/PKGBUILD	2021-05-27 18:46:47 UTC (rev 949111)
@@ -0,0 +1,39 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+pkgname=release-cli
+pkgver=0.8.0
+pkgrel=1
+pkgdesc="Gitlab Release CLI"
+arch=('x86_64')
+url="https://gitlab.com/gitlab-org/release-cli"
+license=('MIT')
+depends=('glibc')
+makedepends=('go')
+source=("$pkgname-$pkgver.tar.gz::https://gitlab.com/gitlab-org/${pkgname}/-/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz")
+sha512sums=('2e3d6dc545902c428f96cc84d515d9b82857714101f27d4cac2d0ceb77bde1cca67d071ea8f30001f727cbb36a27c24e8f78db926f018b413aa470fdefe16ad7')
+b2sums=('a4be4aa478424ff5baad7447dd50dd31de2536ec950abfdafccca4408beeb2932060a7e3a2281b06080c76c0a7f1cb3df89262447694cc31796dbe61fd173996')
+
+prepare() {
+  mv -v "$pkgname-v$pkgver" "$pkgname-$pkgver"
+  cd "$pkgname-$pkgver"
+  mkdir -vp build
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  export CGO_CPPFLAGS="${CPPFLAGS}"
+  export CGO_CFLAGS="${CFLAGS}"
+  export CGO_CXXFLAGS="${CXXFLAGS}"
+  export CGO_LDFLAGS="${LDFLAGS}"
+  export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+
+  go build -o "build/${pkgname}" "./cmd/${pkgname}"
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+  install -vDm 755 "build/${pkgname}" -t "${pkgdir}/usr/bin"
+  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -vDm 644 {CHANGELOG,README}.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+  find docs -type f -iname "*.md" -exec install -vDm 644 {} "${pkgdir}/usr/share/doc/${pkgname}/"{} \;
+}



More information about the arch-commits mailing list