[arch-commits] Commit in (direnv direnv/repos direnv/trunk direnv/trunk/PKGBUILD)

George Rawlinson grawlinson at gemini.archlinux.org
Mon Nov 29 21:03:08 UTC 2021


    Date: Monday, November 29, 2021 @ 21:03:07
  Author: grawlinson
Revision: 1057627

addpkg: direnv 2.29.0-2

Added:
  direnv/
  direnv/repos/
  direnv/trunk/
  direnv/trunk/PKGBUILD

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

Added: direnv/trunk/PKGBUILD
===================================================================
--- direnv/trunk/PKGBUILD	                        (rev 0)
+++ direnv/trunk/PKGBUILD	2021-11-29 21:03:07 UTC (rev 1057627)
@@ -0,0 +1,73 @@
+# Maintainer: George Rawlinson <grawlinson at archlinux.org>
+# Contributor: zimbatm <zimbatm at zimbatm.com>
+# Contributor: ShadowKyogre <shadowkyogre.public+aur at gmail.com>
+# Contributor: rmorgans <rick.morgans at gmail.com>
+
+pkgname=direnv
+pkgver=2.29.0
+pkgrel=2
+pkgdesc='A shell extension that manages your environment'
+arch=('x86_64')
+url="https://direnv.net"
+license=('MIT')
+depends=('glibc')
+makedepends=('go' 'git')
+checkdepends=('zsh' 'fish' 'bash' 'tcsh' 'elvish')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/direnv/direnv/archive/v$pkgver.tar.gz")
+sha512sums=('2192dcfffb0c87caf2e6edfa357ea63eda292c2fab3f441d43bb86ace3b054dc3d1519c6edb9041e20fab33f42e285d248c88b947aa0e57fd72d2bb41ba648d8')
+b2sums=('3b5f9f60a68ba2eb1434e1d0092ca84f0811024c85882b225f90bc372946785931876e18ae48e4c06986f43b6f5148c7ad74df131369f8a9511c47a75af61991')
+
+prepare() {
+  cd "$pkgname-$pkgver"
+
+  # 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}" \
+    .
+}
+
+check() {
+  cd "$pkgname-$pkgver"
+
+  # run go tests
+  go test -v ./...
+
+  # run shell-specific tests
+  bash ./test/direnv-test.bash
+  elvish ./test/direnv-test.elv
+  fish ./test/direnv-test.fish
+  tcsh -e ./test/direnv-test.tcsh
+  zsh ./test/direnv-test.zsh
+
+  # run stdlib tests
+  ./test/stdlib.bash
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+
+  # binary
+  install -vDm755 -t "$pkgdir/usr/bin" "$pkgname"
+
+  # documentation
+  install -vDm644 -t "$pkgdir/usr/share/man/man1" man/*.1
+  install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
+  install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname/docs" docs/*
+
+  # license
+  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
+}



More information about the arch-commits mailing list