[arch-commits] Commit in nomad-driver-nspawn/repos (2 files)

George Rawlinson grawlinson at archlinux.org
Tue Jun 22 09:45:13 UTC 2021


    Date: Tuesday, June 22, 2021 @ 09:45:12
  Author: grawlinson
Revision: 966826

archrelease: copy trunk to community-testing-x86_64

Added:
  nomad-driver-nspawn/repos/community-testing-x86_64/
  nomad-driver-nspawn/repos/community-testing-x86_64/PKGBUILD
    (from rev 966825, nomad-driver-nspawn/trunk/PKGBUILD)

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

Copied: nomad-driver-nspawn/repos/community-testing-x86_64/PKGBUILD (from rev 966825, nomad-driver-nspawn/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD	                        (rev 0)
+++ community-testing-x86_64/PKGBUILD	2021-06-22 09:45:12 UTC (rev 966826)
@@ -0,0 +1,45 @@
+# Maintainer: George Rawlinson <grawlinson at archlinux.org>
+
+pkgname=nomad-driver-nspawn
+pkgver=0.7.0
+pkgrel=2
+pkgdesc="A nomad taskdriver for systemd-nspawn"
+arch=('x86_64')
+url="https://github.com/JanMa/nomad-driver-nspawn"
+license=('MIT')
+depends=('nomad' 'systemd')
+makedepends=('go' 'git')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+b2sums=('ea6ef6848ba680450769a9bd8c1dae316dee4d3904a69365ac254f7489a06daefa71f6728ddddae9f5aef6e1f84c3e5bef26f80e28ee9e82cf6e86402dfbffd7')
+
+prepare() {
+	cd "$pkgname-$pkgver"
+  mkdir build
+  go mod vendor
+}
+
+build() {
+	cd "$pkgname-$pkgver"
+  go build \
+    -trimpath \
+    -buildmode=pie \
+    -mod=readonly \
+    -modcacherw \
+    -ldflags "-extldflags $LDFLAGS -X "github.com/JanMa/nomad-driver-nspawn/nspawn.pluginVersion=${pkgver}"" \
+    -o build \
+    .
+}
+
+package() {
+	cd "$pkgname-$pkgver"
+
+  # documentation
+  install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
+  cp -r example "$pkgdir/usr/share/doc/$pkgname"
+
+  # plugin
+  install -vDm755 -t "$pkgdir/usr/lib/nomad/plugins" "build/$pkgname"
+
+  # license
+  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
+}



More information about the arch-commits mailing list