summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThorben Günther2021-08-05 13:30:55 +0200
committerThorben Günther2021-08-05 13:30:55 +0200
commitfc2213f3569e04e8f93b8d0c5adb819703814beb (patch)
treedcef2ffdcd764c8d85bf68ff9eb2cbb0aeeee1e1
downloadaur-fc2213f3569e04e8f93b8d0c5adb819703814beb.tar.gz
Initial upload: ansible-language-server 0.1.1-1
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD30
2 files changed, 45 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..8f711e2ae2c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = ansible-language-server
+ pkgdesc = Ansible Language Server
+ pkgver = 0.1.1
+ pkgrel = 1
+ url = https://github.com/ansible/ansible-language-server
+ arch = any
+ license = MIT
+ makedepends = npm
+ makedepends = jq
+ depends = nodejs
+ noextract = ansible-language-server-0.1.1.tgz
+ source = ansible-language-server-0.1.1.tgz::https://registry.npmjs.org/ansible-language-server/-/ansible-language-server-0.1.1-0.tgz
+ sha256sums = 134df3c572728a259486968225fdd5451701b947b96c2a3be519e4bdab2f835f
+
+pkgname = ansible-language-server
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..d478f652482
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Thorben Günther <echo YWRtaW5AeGVucm94Lm5ldAo= | base64 -d>
+
+pkgname=ansible-language-server
+pkgver=0.1.1
+pkgrel=1
+pkgdesc='Ansible Language Server'
+arch=('any')
+url="https://github.com/ansible/ansible-language-server"
+license=('MIT')
+depends=('nodejs')
+makedepends=('npm' 'jq')
+source=("$pkgname-$pkgver.tgz::https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver-0.tgz")
+noextract=("$pkgname-$pkgver.tgz")
+sha256sums=('134df3c572728a259486968225fdd5451701b947b96c2a3be519e4bdab2f835f')
+
+package() {
+ npm install -g --prefix "$pkgdir/usr" "$srcdir/$pkgname-$pkgver.tgz"
+ find "$pkgdir/usr" -type d -exec chmod 755 {} +
+ chown -R root:root "${pkgdir}"
+
+ # Remove references to $pkgdir
+ find "$pkgdir" -type f -name package.json -print0 | xargs -0 sed -i "/_where/d"
+
+ # Remove references to $srcdir
+ local tmppackage="$(mktemp)"
+ local pkgjson="$pkgdir/usr/lib/node_modules/$pkgname/package.json"
+ jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage"
+ mv "$tmppackage" "$pkgjson"
+ chmod 644 "$pkgjson"
+}