summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e9aa5d54a926c9495141b1a5913269c6fc6c065a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: Sainnhe Park <sainnhe@gmail.com>
pkgbase=leaderf-git
pkgname=('vim-leaderf-git'
         'neovim-leaderf-git')
_pkgname=leaderf
pkgver=1.22.r48.g312a13b
pkgrel=1
pkgdesc='An efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly for both vim and neovim.'
arch=('any')
url='https://github.com/Yggdroot/LeaderF'
license=('Apache')
source=("${_pkgname}::git+https://github.com/Yggdroot/LeaderF.git")
sha256sums=('SKIP')
makedepends=('git'
             'python')

pkgver() {
    cd "${srcdir}/${_pkgname}"
    git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd "${srcdir}/${_pkgname}"
    bash install.sh
}

package_vim-leaderf-git() {
    depends=('vim' 'python')
    provides=('vim-leaderf')
    conflicts=('vim-leaderf')
    _packdir="usr/share/vim/vimfiles/pack/${_pkgname}/start/${_pkgname}"
    _variant='vim'

    cd "${srcdir}/${_pkgname}"
    vim -es --cmd ":helptags doc" --cmd ":q"
    find autoload doc plugin syntax -type f -exec \
        install -Dm 644 '{}' "${pkgdir}/${_packdir}/{}" \;
    install -Dm 644 "${srcdir}/${_pkgname}/LICENSE" \
        "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_neovim-leaderf-git() {
    depends=('neovim' 'python-pynvim')
    provides=('neovim-leaderf')
    conflicts=('neovim-leaderf')
    _packdir="usr/share/nvim/runtime/pack/${_pkgname}/start/${_pkgname}"
    _variant='neovim'

    cd "${srcdir}/${_pkgname}"
    nvim -es --cmd ":helptags doc" --cmd ":q"
    find autoload doc plugin syntax -type f -exec \
        install -Dm 644 '{}' "${pkgdir}/${_packdir}/{}" \;
    install -Dm 644 "${srcdir}/${_pkgname}/LICENSE" \
        "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}