summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Finelli2020-09-25 10:49:50 -0400
committerMario Finelli2020-09-25 10:49:50 -0400
commit86ccc3cba2d0b38cfd3e0293284af66b46fbaaa3 (patch)
treebb272a6105cdfbeccb93f483181863fae8ee0563
downloadaur-86ccc3cba2d0b38cfd3e0293284af66b46fbaaa3.tar.gz
Initial commit -- version 3.4.0
-rw-r--r--.SRCINFO14
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD39
3 files changed, 57 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..960af367379d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = go-yq
+ pkgdesc = portable command-line YAML processor
+ pkgver = 3.4.0
+ pkgrel = 1
+ url = https://github.com/mikefarah/yq
+ arch = x86_64
+ license = MIT
+ makedepends = go
+ conflicts = yq
+ source = https://github.com/mikefarah/yq/archive/3.4.0.tar.gz
+ sha256sums = 76b96cd2ba503eef396d8773d874b4fdc56fc3aff3c61b0808afadff2a6daae7
+
+pkgname = go-yq
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f71c635dafda
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!.gitignore
+!PKGBUILD
+!.SRCINFO
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..adbe106e9f22
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Mario Finelli <mario at finel dot li>
+
+pkgname=go-yq
+pkgver=3.4.0
+pkgrel=1
+pkgdesc='portable command-line YAML processor'
+arch=(x86_64)
+url=https://github.com/mikefarah/yq
+license=(MIT)
+makedepends=(go)
+conflicts=(yq)
+source=(https://github.com/mikefarah/yq/archive/${pkgver}.tar.gz)
+sha256sums=('76b96cd2ba503eef396d8773d874b4fdc56fc3aff3c61b0808afadff2a6daae7')
+
+prepare() {
+ cd yq-$pkgver
+ go mod vendor
+}
+
+check() {
+ cd yq-$pkgver
+ go test ./...
+}
+
+build() {
+ cd yq-$pkgver
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+ go build -o yq
+}
+
+package() {
+ cd yq-$pkgver
+ install -Dm755 yq "$pkgdir/usr/bin/yq"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}