summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b464af033d1944b9d26b60c28baeeb6c303d04ec (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
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>

pkgbase=vim-code-minimap-git
pkgname=('vim-code-minimap-git' 'neovim-code-minimap-git')
pkgver=r146.45a8eab
pkgrel=1
pkgdesc="Blazing fast minimap for Vim, powered by code-minimap"
arch=('any')
url="https://github.com/wfxr/minimap.vim"
license=('MIT')
depends=('code-minimap')
makedepends=('git')
source=("$pkgbase::git+$url")
sha256sums=('SKIP')

pkgver() {
	cd "$pkgbase"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

package_vim-code-minimap-git()  {
	depends+=('vim>=8.2')
	groups=('vim-plugins')
	provides=("${pkgname%-git}" 'vim-minimap')
	conflicts=("${pkgname%-git}" 'vim-minimap')

	cd "$pkgbase"
	find autoload doc plugin \
	  -type f -exec install -Dm 644 '{}' "$pkgdir/usr/share/vim/vimfiles/{}" \;
	install -Dm 755 bin/minimap_generator.sh -t "$pkgdir/usr/share/vim/vimfiles/bin/"
	install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
	install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}

package_neovim-code-minimap-git()  {
	depends+=('neovim>=0.5.0')
	groups=('neovim-plugins')
	provides=("${pkgname%-git}" 'vim-minimap')
	conflicts=("${pkgname%-git}" 'vim-minimap')

	cd "$pkgbase"
	find autoload doc plugin \
	  -type f -exec install -Dm 644 '{}' "$pkgdir/usr/share/nvim/runtime/{}" \;
	install -Dm 755 bin/minimap_generator.sh -t "$pkgdir/usr/share/nvim/runtime/bin/"
	install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
	install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}