summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorSainnhepark2020-07-30 10:15:35 +0800
committerSainnhepark2020-07-30 10:15:35 +0800
commita7fde8901070213bc74c78116432dc7e86701c2b (patch)
tree3b7f9768568d6b72b593a6696bb5c3b59d052fc6 /PKGBUILD
downloadaur-a7fde8901070213bc74c78116432dc7e86701c2b.tar.gz
init
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD40
1 files changed, 40 insertions, 0 deletions
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"
+}