summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 66ed8146f668aef53caae928cb0661b3f0bdfb01 (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
# Maintainer: Pedro Simoes <pedrofchsimoes at gmail dot com>

pkgname=neovim-autosave-git
pkgver=r61.140c478
pkgrel=1
pkgdesc="Neovim plugin that auto-saves your work"
arch=('any')
url="https://github.com/pocco81/autosave.nvim"
license=('GPL3')
groups=('neovim-plugins')
depends=('neovim>=0.5.0')
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("$pkgname::git+$url")
md5sums=('SKIP')

pkgver() {
	cd "$pkgname"
	( set -o pipefail
	  git describe --long --tags 2> /dev/null | sed 's/^v//;s/-/.r/;s/-/./' ||
	  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
	)
}

package() {
	cd "$pkgname"
	find lua plugin -type f -exec install -Dm 644 '{}' "$pkgdir/usr/share/nvim/runtime/{}" \;
	install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}