summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 836a0185fd221d40ff3be7f5961bece6af532422 (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
# Maintainer: Maki <maki@hotmilk.space>
# Maintainer: SuicideCatt <random.cat.from.internet@gmail.com>

pkgname=msdfgen-git
pkgver=1.12.r4.g5a88b0c
pkgrel=1
pkgdesc="Multi-channel signed distance field generator binary and library"
url=https://github.com/Chlumsky/msdfgen
arch=(x86_64)
license=(MIT)
depends=(tinyxml2 libpng freetype2 zlib)
makedepends=(git cmake gcc make)
provides=(msdfgen=$pkgver)
conflicts=(msdfgen)

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

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

build()
{
	cd $pkgname/
	cmake -B build -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release \
	-DMSDFGEN_USE_SKIA=OFF -DMSDFGEN_USE_VCPKG=OFF \
	-DMSDFGEN_INSTALL=ON -DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package()
{
	cd $pkgname/
	install -Dm644 "LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
	DESTDIR="$pkgdir" cmake --install build
}