summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSainnhepark2020-07-30 10:15:35 +0800
committerSainnhepark2020-07-30 10:15:35 +0800
commita7fde8901070213bc74c78116432dc7e86701c2b (patch)
tree3b7f9768568d6b72b593a6696bb5c3b59d052fc6
downloadaur-a7fde8901070213bc74c78116432dc7e86701c2b.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..c29da84756f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = neovim-coc-go-git
+ pkgdesc = Go language server extension using gopls for coc.nvim
+ pkgver = v0.9.2.r2.g6d13daa
+ pkgrel = 1
+ url = https://github.com/josa42/coc-go
+ arch = any
+ license =
+ makedepends = yarn
+ makedepends = npm
+ makedepends = git
+ depends = neovim-coc
+ provides = neovim-coc-go
+ conflicts = neovim-coc-go
+ source = coc-go::git+https://github.com/josa42/coc-go.git
+ sha256sums = SKIP
+
+pkgname = neovim-coc-go-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ecc6ec4d522
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Sainnhe Park <sainnhe@gmail.com>
+_variant='neovim'
+_extname=coc-go
+_packdir="usr/local/share/nvim/site/pack/coc/start/${_extname}"
+url='https://github.com/josa42/coc-go'
+pkgdesc='Go language server extension using gopls for coc.nvim'
+
+pkgname="${_variant}-${_extname}-git"
+provides=("${_variant}-${_extname}")
+conflicts=("${_variant}-${_extname}")
+arch=('any')
+depends=("${_variant}-coc")
+makedepends=('yarn' 'npm' 'git')
+license=('')
+source=("${_extname}::git+${url}.git")
+pkgver=v0.9.2.r2.g6d13daa
+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"
+}