summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 73c740ef93742fef2714799ecc8fe11edfc196fe (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
42
43
44
45
46
47
# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Isho Antar <IshoAntar@protonmail.com>
# Contributor: Michael Yang <ohmyarchlinux@protonmail.com>

pkgname=spdlog-git
pkgver=1.10.0.r0.g76fb40d9
pkgrel=1
pkgdesc='Very fast, header only, C++ logging library'
arch=('x86_64')
url='https://github.com/gabime/spdlog'
license=('MIT')
depends=('libfmt.so')
makedepends=('git' 'cmake')
provides=('spdlog' 'libspdlog.so')
conflicts=('spdlog')
source=("git+$url#branch=v1.x")
sha512sums=('SKIP')

pkgver() {
	git -C spdlog describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./'
}

build() {
	cmake \
		-B build \
		-S spdlog \
		-DSPDLOG_BUILD_BENCH=OFF \
		-DSPDLOG_BUILD_EXAMPLE=OFF \
		-DSPDLOG_BUILD_TESTS=ON \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DSPDLOG_BUILD_SHARED=ON \
		-DSPDLOG_FMT_EXTERNAL=ON \
		-Wno-dev
	make -C build
}

check() {
	cd build
	ctest
}

package() {
	make -C build DESTDIR="$pkgdir/" install
	install -Dm644 spdlog/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}