summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: da3aa2a49fac2a6fcfe1c840461438696c95df8e (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
# Maintainer: Hezekiah Michael <spiritomb at protonmail dot com>

pkgbase=neovim-candid-git
_pkgbase=neovim-candid
pkgname=('neovim-candid-git'
	'neovim-lightline-candid-git')
pkgver=r86.f7198b5
pkgrel=2
arch=('any')
url="https://github.com/flrnd/candid.vim"
license=('MIT')
makedepends=('git')
source=("${_pkgbase}::git+$url")
md5sums=('SKIP')

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

package_neovim-candid-git() {
	pkgdesc="A dark colorscheme with vibrant colors."
    _pkgname=neovim-candid
	depends=('neovim')
	optdepends=('neovim-lightline-git: for lightline color scheme'
		'md2vim: to make candid.txt help file')
    provides=("${_pkgbase}")
    conflicts=("${_pkgbase}")
    cd "${srcdir}/${_pkgbase}"
	find autoload/candid.vim colors \
		-type f -exec install -Dm 644 '{}' "${pkgdir}/usr/share/nvim/runtime/pack/candid.vim/start/candid.vim/{}" \;
	install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/${_pkgname}/"
	if [ -x "$(command -v md2vim)" ];then
		md2vim README.md candid.txt
		install -Dm 644 candid.txt -t "$pkgdir/usr/share/nvim/runtime/doc/"
		rm candid.txt
	fi
}

package_neovim-lightline-candid-git() {
	pkgdesc="Candid color scheme for lightline."
    depends=('neovim' 'neovim-candid')
	optdepends=('neovim-lightline-git')
    _pkgname=neovim-lightline-candid
	provides=('neovim-lightline-candid')
	conflicts=('neovim-lightline-candid')
    cd "${srcdir}/${_pkgbase}"
	find autoload/lightline -type f -exec \
        install -Dm 644 '{}' "${pkgdir}/usr/share/nvim/runtime/{}" \;
}