aur-packages/deoplete-jedi-git/PKGBUILD

58 lines
1.9 KiB
Bash
Raw Normal View History

2017-12-28 14:52:32 -08:00
# Maintainer: Trent Palmer trenttdually at gmail
###########################################################################################################
# Build Options
###########################################################################################################
_vim="y"
_neovim="y"
###########################################################################################################
2017-12-28 14:52:32 -08:00
_name='deoplete-jedi'
pkgname="${_name}-git"
pkgver=r228.0410de7
2017-12-28 14:52:32 -08:00
pkgrel=1
pkgdesc="jedi add-on for deoplete completion plugin for neovim"
arch=('any')
2017-12-28 14:52:32 -08:00
url="https://github.com/zchee/deoplete-jedi"
license=('MIT')
groups=()
depends=('deoplete-git' 'python-jedi' 'python2-jedi')
makedepends=('git')
2018-01-02 01:09:32 -08:00
provides=('deoplete-jedi')
conflicts=('deoplete-jedi')
replaces=()
2017-12-28 14:52:32 -08:00
backup=()
options=()
source=("${_name}::${url//https/git}")
noextract=()
md5sums=('SKIP')
pkgver() {
cd "${srcdir}/${_name}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
# hack server.py so it doesn't source jedi and parso submodules
prepare() {
cd "${srcdir}/${_name}/rplugin/python3/deoplete/sources/deoplete_jedi/"
sed -i -e 's/vendored//g' server.py
}
package() {
if [ "$_neovim" = "y" ]; then
2017-12-28 14:52:32 -08:00
mkdir -p "$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete"
cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/sources" \
"$pkgdir/usr/share/nvim/runtime/rplugin/python3/deoplete/"
fi
if [ "$_vim" = "y" ]; then
mkdir -p "$pkgdir/usr/share/vim/vimfiles/rplugin/python3/deoplete"
cp -r "${srcdir}/${_name}/rplugin/python3/deoplete/sources" \
"$pkgdir/usr/share/vim/vimfiles/rplugin/python3/deoplete/"
fi
2017-12-28 14:52:32 -08:00
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
}