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

George Rawlinson grawlinson at gemini.archlinux.org
Wed Apr 13 09:04:37 UTC 2022


    Date: Wednesday, April 13, 2022 @ 09:04:36
  Author: grawlinson
Revision: 1186034

archrelease: copy trunk to community-x86_64

Added:
  up/repos/community-x86_64/
  up/repos/community-x86_64/PKGBUILD
    (from rev 1186033, up/trunk/PKGBUILD)

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

Copied: up/repos/community-x86_64/PKGBUILD (from rev 1186033, up/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2022-04-13 09:04:36 UTC (rev 1186034)
@@ -0,0 +1,65 @@
+# Maintainer: George Rawlinson grawlinson at archlinux.org>
+
+pkgname=up
+pkgver=0.4
+pkgrel=2
+pkgdesc='A tool for writing Linux pipes with instant live preview'
+arch=('x86_64')
+url='https://github.com/akavel/up'
+license=('Apache')
+depends=('glibc')
+makedepends=('git' 'go')
+options=('!lto')
+_commit='9ddc78be4013d7ef9c42e9f3db3db0900069e5b5'
+source=("$pkgname::git+$url.git#commit=$_commit")
+b2sums=('SKIP')
+
+pkgver() {
+  cd "$pkgname"
+
+  git describe --tags | sed 's/^v//'
+}
+
+prepare() {
+  cd "$pkgname"
+
+  # create directory for build output
+  mkdir build
+
+  # download dependencies
+  go mod download
+}
+
+build() {
+  cd "$pkgname"
+
+  # 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" \
+    -o build \
+    .
+}
+
+check() {
+  cd "$pkgname"
+
+  go test -v ./...
+}
+
+package() {
+  cd "$pkgname"
+
+  # binary
+  install -vDm755 -t "$pkgdir/usr/bin" build/up
+
+  # documentation
+  install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
+}



More information about the arch-commits mailing list