summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSainnhepark2020-07-29 19:02:16 +0800
committerSainnhepark2020-07-29 19:02:16 +0800
commite8ce46a9bfb7961ed156d45aecce36280d937dba (patch)
tree7b992dd58013ad64626fa96f52e8b261edbcb9f2
downloadaur-e8ce46a9bfb7961ed156d45aecce36280d937dba.tar.gz
init
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD40
2 files changed, 58 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..9be3b8a6dc5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = neovim-coc-json-git
+ pkgdesc = Json language extension for coc.nvim
+ pkgver = 1.2.6.r0.g66b482d
+ pkgrel = 1
+ url = https://github.com/neoclide/coc-json
+ arch = any
+ license =
+ makedepends = yarn
+ makedepends = npm
+ depends = neovim-coc
+ depends = git
+ provides = neovim-coc-json
+ conflicts = neovim-coc-json
+ source = coc-json::git+https://github.com/neoclide/coc-json.git
+ sha256sums = SKIP
+
+pkgname = neovim-coc-json-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..6d5695ddcf1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Sainnhe Park <sainnhe@gmail.com>
+_variant='neovim'
+_extname=coc-json
+_packdir="usr/local/share/nvim/site/pack/coc/start/${_extname}"
+url='https://github.com/neoclide/coc-json'
+pkgdesc='Json language extension for coc.nvim'
+
+pkgname="${_variant}-${_extname}-git"
+provides=("${_variant}-${_extname}")
+conflicts=("${_variant}-${_extname}")
+arch=('any')
+depends=("${_variant}-coc" 'git')
+makedepends=('yarn' 'npm')
+license=('')
+source=("${_extname}::git+${url}.git")
+pkgver=1.2.6.r0.g66b482d
+pkgrel=1
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "${srcdir}/${_extname}"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "${srcdir}/${_extname}"
+ yarn install --frozen-lockfile
+ yarn pack
+ tar xvf *.tgz
+ rm *.tgz
+ cd package
+ npm install --only=production --no-lockfile --ignore-scripts
+}
+
+package() {
+ cd "${srcdir}/${_extname}/package"
+ find . -type f -exec \
+ install -Dm 644 '{}' "${pkgdir}/${_packdir}/{}" \;
+ rm -rf "${srcdir}/${_extname}/package"
+}