arch-pkgs/libversion/PKGBUILD

43 lines
822 B
Text
Raw Normal View History

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