summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8156e6599a3314d82f82ba6d5b2d9e0cc7547de8 (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: cypmon <randalchem AT protonmail DOT com>
_pkgname=cmkr
pkgname=cmkr-git
pkgver=v0.2.4.r1.6c1e388
pkgrel=1
pkgdesc="Modern build system based on CMake and TOML."
arch=(x86_64)
url="https://github.com/build-cpp/cmkr"
license=('MIT')
makedepends=(git cmake)
provides=(cmkr)
source=("$_pkgname-$pkgver::git+$url.git")
md5sums=('SKIP')

pkgver() {
	cd "$_pkgname-$pkgver"
	printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

build() {
	cmake -B build -S "$_pkgname-$pkgver" -DCMAKE_INSTALL_PREFIX=/usr 
	make -C build
}

package() {
	make DESTDIR="$pkgdir/" -C build install
	cd "$_pkgname-$pkgver"
	install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
}