arch-pkgs/libversion/PKGBUILD

43 lines
822 B
Bash

# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: KokaKiwi <kokakiwi+aur at kokakiwi dot net>
pkgname=libversion
pkgver=3.0.3
pkgrel=1
pkgdesc='Advanced version string comparison library'
url='https://github.com/repology/libversion'
license=('MIT')
arch=('x86_64')
depends=('gcc-libs')
makedepends=('git' 'cmake')
_commit='f851fec7d976820061952f6d90d3b60f2bae774b'
source=("$pkgname::git+$url#commit=$_commit")
b2sums=('SKIP')
pkgver() {
cd "$pkgname"
git describe --tags | sed 's/^v//'
}
build() {
cmake \
-S "$pkgname" \
-B build \
-D CMAKE_INSTALL_PREFIX=/usr
cmake --build build
}
check() {
cd build
ctest --output-on-failure
}
package() {
DESTDIR="$pkgdir" cmake --install build
install -vDm644 "$pkgname/COPYING" -t "$pkgdir/usr/share/licenses/$pkgname"
}