diff options
author | Tommaso Sardelli | 2020-07-26 15:45:37 +0200 |
---|---|---|
committer | Tommaso Sardelli | 2020-07-26 15:45:37 +0200 |
commit | fc13debdd7d76407ac2104b4cbedfa09035d4d19 (patch) | |
tree | a15a1eccc2f611bf4927ab0ca4571e8e2b460619 | |
download | aur-fc13debdd7d76407ac2104b4cbedfa09035d4d19.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 48 |
2 files changed, 66 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c688fb523540 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = go-jsonnet + pkgdesc = An implementation of Jsonnet in pure Go + pkgver = 0.16.0 + pkgrel = 1 + url = https://jsonnet.org/ + arch = x86_64 + license = Apache + makedepends = go + provides = jsonnet + conflicts = jsonnet + conflicts = go-jsonnet-git + source = jsonnet_v0.16.0.tar.gz::https://github.com/google/jsonnet/archive/v0.16.0.tar.gz + source = go-jsonnet_v0.16.0.tar.gz::https://github.com/google/go-jsonnet/archive/v0.16.0.tar.gz + sha512sums = 80e0403ec8008cbacff8d9e8fe0e2b5d3bfa306d92c2c11d472e5721015ce4c11be745df10d25715f22f8d8594df69fabf2fe617bdded462ffc5b21f8923606f + sha512sums = 741fc0ed5e59960c175afb463dfc38007935d4f9f15fe30088aecfe1cc7825ca637989f06716068e267b92c45fbab6e47a865f0c0e83df6d2bf2fc4f1cd39a9a + +pkgname = go-jsonnet + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..92963c5a33f1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Tommaso Sardelli <lacapannadelloziotom [AT] gmail [DOT] com> +pkgname=go-jsonnet +_basepkgname=jsonnet +pkgver=0.16.0 +pkgrel=1 +pkgdesc="An implementation of Jsonnet in pure Go" +arch=("x86_64") +url="https://jsonnet.org/" +license=("Apache") +makedepends=("go") +conflicts=('jsonnet' 'go-jsonnet-git') +provides=('jsonnet') +source=("${_basepkgname}_v${pkgver}.tar.gz::https://github.com/google/${_basepkgname}/archive/v${pkgver}.tar.gz" + "${pkgname}_v${pkgver}.tar.gz::https://github.com/google/${pkgname}/archive/v${pkgver}.tar.gz") +sha512sums=('80e0403ec8008cbacff8d9e8fe0e2b5d3bfa306d92c2c11d472e5721015ce4c11be745df10d25715f22f8d8594df69fabf2fe617bdded462ffc5b21f8923606f' + '741fc0ed5e59960c175afb463dfc38007935d4f9f15fe30088aecfe1cc7825ca637989f06716068e267b92c45fbab6e47a865f0c0e83df6d2bf2fc4f1cd39a9a') + +prepare() { + export GOPATH="${srcdir}" + export PATH="$PATH:$GOPATH/bin" + cd "${srcdir}/${pkgname}-${pkgver}" + go mod download +} + +build() { + # Build jsonnet Go implementation + cd "$srcdir/${pkgname}-${pkgver}" + go build ./cmd/jsonnet + + # Build jsonnetfmt from the C++ implementation + cd "$srcdir/$_basepkgname-$pkgver" + CFLAGS="$CFLAGS -fPIC -Iinclude" CXXFLAGS="$CXXFLAGS -fPIC -Iinclude -Ithird_party/md5 -Ithird_party/json" make jsonnetfmt +} + +check() { + cd "$srcdir/$_basepkgname-$pkgver" + CFLAGS="$CFLAGS -fPIC -Iinclude" make test +} + +package() { + # Install jsonnet + cd "$srcdir/${pkgname}-${pkgver}" + install -Dm755 jsonnet "$pkgdir/usr/bin/jsonnet" + + # Install jsonnetfmt + cd "$srcdir/$_basepkgname-$pkgver" + install -m755 jsonnetfmt "$pkgdir/usr/bin/jsonnetfmt" +} |