summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b6cc22b47e5925a599ae6f1669d5182021655f4f (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
# Maintainer: Alfredo Ramos <alfredo dot ramos at yandex dot com>

_pkgname=vim-qml
pkgname=${_pkgname}-git
pkgver=r17.fba69d1
pkgrel=1
pkgdesc='QML syntax highlighting for VIM'
arch=('any')
url='https://github.com/peterhoeg/vim-qml'
license=('custom:vim')
groups=('vim-plugins')

optdepends=(
	'vim: to use this plugin'
)
makedepends=('git')
provides=("${_pkgname}=${pkgver}")

source=("git+https://github.com/peterhoeg/${_pkgname}.git")
sha512sums=('SKIP')

pkgver() {
	# Updating package version
	cd "${srcdir}"/${_pkgname}
	(
		set -o pipefail
		git describe --long --tags 2>/dev/null | sed -r 's/([^-]*-g)/r\1/;s/-/./g' ||
		printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
	)
}

package() {
	# Installing package
	cd "${srcdir}"/${_pkgname}
	mkdir -p "${pkgdir}"/usr/share/vim/vimfiles
	cp -R {ftdetect,ftplugin,indent,syntax} "${pkgdir}"/usr/share/vim/vimfiles
}