Skip to content
Snippets Groups Projects
Commit 158ee4dc authored by George Rawlinson's avatar George Rawlinson :coffee:
Browse files

addpkg: 0.7.0-2

parents
No related branches found
No related tags found
Loading
PKGBUILD 0 → 100644
# Maintainer: George Rawlinson <grawlinson@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
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment