diff --git a/deoplete/.SRCINFO b/deoplete/.SRCINFO new file mode 100644 index 0000000..6e43a89 --- /dev/null +++ b/deoplete/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = deoplete + pkgdesc = deoplete completion plugin for neovim + pkgver = 4.1 + pkgrel = 1 + url = https://github.com/Shougo/deoplete.nvim + install = deoplete.install + arch = any + license = MIT + makedepends = git + depends = python-neovim + optdepends = vim: vim support + optdepends = neovim: neovim support + optdepends = nvim-yarp: vim support + optdepends = vim-hug-neovim-rpc: vim support + provides = deoplete + conflicts = deoplete-git + source = deoplete-4.1.tar.gz::https://github.com/Shougo/deoplete.nvim/archive/4.1.tar.gz + md5sums = d4afc367355a1c55fbc758d6cea382f4 + +pkgname = deoplete + diff --git a/deoplete/PKGBUILD b/deoplete/PKGBUILD new file mode 100644 index 0000000..b9c2a0e --- /dev/null +++ b/deoplete/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: Trent Palmer trenttdually at gmail + +########################################################################################################### +# Build Options +########################################################################################################### +_vim="y" + +# neovim can load plugins installed as vim plugins +_neovim="n" +########################################################################################################### + +_name='deoplete' +pkgname="${_name}" +pkgver=4.1 +pkgrel=1 +pkgdesc="deoplete completion plugin for neovim" +arch=('any') +url="https://github.com/Shougo/deoplete.nvim" +license=('MIT') +groups=() +depends=('python-neovim') +optdepends=('vim: vim support' + 'neovim: neovim support' + 'nvim-yarp: vim support' + 'vim-hug-neovim-rpc: vim support') +makedepends=('git') +provides=('deoplete') +conflicts=('deoplete-git') +replaces=('') +backup=() +options=() +install="${_name}.install" +source=("$_name-$pkgver.tar.gz::${url}/archive/${pkgver}.tar.gz") +noextract=() +md5sums=('d4afc367355a1c55fbc758d6cea382f4') + +prepare() { + mv "${pkgname}.nvim-${pkgver}" "${pkgname}" +} + +package() { + if [ "$_neovim" = "y" ]; then + mkdir -p "${pkgdir}/usr/share/nvim/runtime" + cp -r "${srcdir}/${_name}/"{autoload,doc,plugin,rplugin} \ + "${pkgdir}/usr/share/nvim/runtime" + fi + + if [ "$_vim" = "y" ]; then + mkdir -p "${pkgdir}/usr/share/vim/vimfiles" + cp -r "${srcdir}/${_name}/"{autoload,doc,plugin,rplugin} \ + "${pkgdir}/usr/share/vim/vimfiles" + fi + + install -D -m644 "${srcdir}/${_name}/README.md" $pkgdir/usr/share/doc/$pkgname/README.md + install -D -m644 "${srcdir}/${_name}/LICENSE" $pkgdir/usr/share/licenses/$pkgname/LICENSE +} diff --git a/deoplete/deoplete.install b/deoplete/deoplete.install new file mode 100644 index 0000000..4b51238 --- /dev/null +++ b/deoplete/deoplete.install @@ -0,0 +1,41 @@ +update_vim_help() { + echo -n "Updating Vim help tags..." + /usr/bin/vim --noplugin -u NONE -U NONE \ + --cmd ":helptags /usr/share/vim/vimfiles/doc" --cmd ":q" > /dev/null 2>&1 + echo "done." +} + +update_helptag() { + echo -n "Updating neovim (nvim) help tags..." + /usr/bin/nvim --noplugins -u NONE -U NONE --cmd ":helptags /usr/share/nvim/runtime/doc" --cmd ":q" > /dev/null 2>&1 + echo "done. " +} + +post_install() { + update_helptag + echo "" + echo " Note: Python3 must be enabled before updating remote plugins + If Deoplete was installed prior to Python support being added to Neovim, :UpdateRemotePlugins + should be executed manually in order to enable auto-completion." + + echo "" + echo " you might need to add the following to your init.vim/vimrc: + \"let g:deoplete#enable_at_startup = 1\"" + echo "" + update_vim_help +} + +post_upgrade() { + update_helptag ${1} + update_vim_help "$1" +} + +post_remove() { + update_helptag + + echo "" + echo " you might need to remove the following to your init.vim/vimrc: + \"let g:deoplete#enable_at_startup = 1\"" + echo "" + update_vim_help +}