[arch-commits] Commit in drone-cli/repos (community-x86_64 community-x86_64/PKGBUILD)

George Rawlinson grawlinson at gemini.archlinux.org
Wed Nov 17 21:19:25 UTC 2021


    Date: Wednesday, November 17, 2021 @ 21:19:25
  Author: grawlinson
Revision: 1051228

archrelease: copy trunk to community-x86_64

Added:
  drone-cli/repos/community-x86_64/
  drone-cli/repos/community-x86_64/PKGBUILD
    (from rev 1051227, drone-cli/trunk/PKGBUILD)

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

Copied: drone-cli/repos/community-x86_64/PKGBUILD (from rev 1051227, drone-cli/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2021-11-17 21:19:25 UTC (rev 1051228)
@@ -0,0 +1,59 @@
+# Maintainer: George Rawlinson <grawlinson at archlinux.org>
+# Contributor: "Amhairghin" Oscar Garcia Amor (https://ogarcia.me)
+# Contributor: Franklyn Tackitt <franklyn at tackitt.net>
+# Contributor: Christian Höppner <chris at mkaito.com>
+
+pkgname=drone-cli
+pkgver=1.4.0
+pkgrel=2
+pkgdesc="Command line interface for Drone CI"
+arch=('x86_64')
+url="https://docs.drone.io/cli"
+license=('Apache')
+depends=('glibc')
+makedepends=('go' 'git')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/drone/drone-cli/archive/v$pkgver.tar.gz")
+b2sums=('a894c14c011374df5498bace23d40e7376b112250cbf901419f26eb6434fae12a6c325fde907adc25049c3c712574fa41a34984fd8467417134b755a06bde64e')
+
+prepare() {
+  cd "$pkgname-$pkgver"
+
+  # create directory for build output
+  mkdir build
+
+  # download dependencies
+  go mod download
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+
+  # set Go flags
+  export CGO_CPPFLAGS="${CPPFLAGS}"
+  export CGO_CFLAGS="${CFLAGS}"
+  export CGO_CXXFLAGS="${CXXFLAGS}"
+
+  go build -v \
+    -trimpath \
+    -buildmode=pie \
+    -mod=readonly \
+    -modcacherw \
+    -ldflags "-linkmode external -extldflags ${LDFLAGS} -X main.version=$pkgver" \
+    -o build \
+    ./...
+}
+
+check() {
+  cd "$pkgname-$pkgver"
+  go test -v ./...
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+
+  # binary
+  install -vDm755 -t "$pkgdir/usr/bin" build/drone
+
+  # documentation
+  install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" *.md
+}



More information about the arch-commits mailing list