redo vim-lightline-git/PKGBUILD

This commit is contained in:
Trent Palmer 2017-12-25 17:30:56 -08:00
parent ea9f55d11f
commit 5d937b8d00
3 changed files with 67 additions and 34 deletions

View File

@ -1,31 +1,46 @@
# $Id$ # $Id$
# Maintainer: jeff tracy <jefftracy nine one one at aol dot com> # Maintainer: trent palmer <trenttdually at g mail>
# Contributor: # Contributor: jeff tracy <jefftracy nine one one at aol dot com>
# Forked from https://aur.archlinux.org/vim-lightline-git.git
# at commit 95ac7c5e2434144e5a40e4b71432bf9d61203cac
pkgname=vim-lightline-git _name='vim-lightline'
pkgver=latest pkgname="${_name}-git"
pkgver=
pkgrel=1 pkgrel=1
pkgdesc='A light and configurable statusline/tabline for Vim' pkgdesc='A light and configurable statusline/tabline for Vim'
arch=('any') arch=('any')
url='https://github.com/itchyny/lightline.vim' url='https://github.com/itchyny/lightline.vim'
license=('MIT') license=('MIT')
depends=('vim-runtime') depends=('vim-runtime' 'neovim')
makedepends=('git') makedepends=('git')
install='vimdoc.install' provides=('vim-lightline-git')
source=("git://github.com/itchyny/lightline.vim.git") conflicts=('vim-lightline' 'vim-lightline-git')
replaces=('vim-lightline')
install='lightline.install'
# source=("git://github.com/itchyny/lightline.vim.git")
source=("${_name}::${url//https/git}")
md5sums=('SKIP') md5sums=('SKIP')
package() { pkgver() {
cd "lightline.vim" cd "${srcdir}/${_name}"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
_installpath="$pkgdir/usr/share/vim/vimfiles"
install -Dm755 doc/lightline.txt "$_installpath/doc/lightline.txt"
install -Dm755 plugin/lightline.vim "$_installpath/plugin/lightline.vim"
install -d "$_installpath/autoload"
install -d "$_installpath/t"
cp -R autoload/* "$_installpath/autoload"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
} }
# vim:set ts=2 sw=2 et: package() {
mkdir -p "$pkgdir/usr/share/nvim/runtime"
cp -r "${srcdir}/${_name}/"{autoload,doc,plugin} \
"$pkgdir/usr/share/nvim/runtime"
mkdir -p "$pkgdir/usr/share/vim/vimfiles"
cp -r "${srcdir}/${_name}/"{autoload,doc,plugin} \
"$pkgdir/usr/share/vim/vimfiles"
mkdir -p "$pkgdir/usr/share/doc/${pkgname}"
cp "${srcdir}/${_name}/"README.md \
"$pkgdir/usr/share/doc/${pkgname}"
mkdir -p "$pkgdir/usr/share/licenses/${pkgname}"
cp "${srcdir}/${_name}/"LICENSE \
"$pkgdir/usr/share/licenses/${pkgname}"
}

View File

@ -0,0 +1,34 @@
update_neovim_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. "
}
update_vim_helptag() {
echo -n 'Updating vim help tags...'
/usr/bin/vim --noplugins -u NONE -U NONE \
--cmd ":helptags /usr/share/vim/vimfiles/doc" --cmd ":q" > /dev/null 2>&1
echo 'done.'
}
post_install() {
update_neovim_helptag
update_vim_helptag
echo ""
echo " see https://github.com/itchyny/lightline.vim for
tips on setting $TERM and configuring init.vim/vimrc"
echo ""
}
post_upgrade() {
update_neovim_helptag
update_vim_helptag
}
post_remove() {
update_neovim_helptag
update_vim_helptag
}
# vim:set ts=2 sw=2 et:

View File

@ -1,16 +0,0 @@
post_install() {
echo -n 'Updating vim help tags...'
/usr/bin/vim --noplugins -u NONE -U NONE \
--cmd ":helptags /usr/share/vim/vimfiles/doc" --cmd ":q" > /dev/null 2>&1
echo 'done.'
}
post_upgrade() {
post_install
}
post_remove() {
post_install
}
# vim:set ts=2 sw=2 et: