summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 64437bb90e3439e155d309bf5c5b1f8fa812446c (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
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Pascal Ernster <aur at hardfalcon dot net>
# Contributor: Alexandros Theodotou <alex at zrythm dot org>

pkgname=libcyaml-git
pkgver=1.3.0+r630.5206ece
pkgrel=1
pkgdesc='C library for reading and writing YAML'
arch=('x86_64')
url='https://github.com/tlsa/libcyaml'
license=('ISC')
depends=('glibc' 'libyaml')
makedepends=('git')
provides=('libcyaml.so' 'libcyaml')
conflicts=('libcyaml')
source=("$pkgname::git+$url")
sha256sums=('SKIP')

pkgver() {
	cd "$pkgname"
	local _tag="$(git tag | tail -n1 | sed 's/^v//')"
	local _rev="$(git rev-list --count HEAD)"
	local _commit="$(git rev-parse --short HEAD)"
	printf "%s+r%s.%s" "$_tag" "$_rev" "$_commit"
}

build() {
	cd "$pkgname"
	make VARIANT=release
}

check() {
	cd "$pkgname"
	make test
}

package() {
	cd "$pkgname"
	make install VARIANT=release DESTDIR="$pkgdir/" PREFIX=/usr
	install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}