summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c51ba9e293580a624a905a210edbc247061ef7c0 (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
# Maintainer: xiretza <xiretza+aur@xiretza.xyz>

_pkgname=tinycmmc
pkgname=$_pkgname-git
pkgver=r50.32eaa5b
pkgrel=1
arch=('any')
pkgdesc='Tiny CMake Module Collections'
url=https://github.com/grumbel/$_pkgname
license=('zlib')

provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
makedepends=('git' 'cmake')

source=("git+$url")
sha256sums=('SKIP')

pkgver() {
	cd "$_pkgname"

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

build() {
	cmake -B build -S "$_pkgname" \
		-DCMAKE_INSTALL_PREFIX=/usr

	make -C build
}

package() {
	make -C build install DESTDIR="$pkgdir"

	install -Dm644 "$_pkgname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}