2021-12-14 02:10:10 +00:00
|
|
|
# Maintainer: George Rawlinson <grawlinson@archlinux.org>
|
|
|
|
# Contributor: KokaKiwi <kokakiwi+aur at kokakiwi dot net>
|
2021-07-24 10:00:43 +00:00
|
|
|
|
|
|
|
pkgname=libversion
|
2023-01-15 06:44:23 +00:00
|
|
|
pkgver=3.0.3
|
2022-10-22 22:55:23 +00:00
|
|
|
pkgrel=1
|
2021-07-24 10:00:43 +00:00
|
|
|
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//'
|
|
|
|
}
|
2021-07-24 10:00:43 +00:00
|
|
|
|
2022-10-22 22:55:23 +00:00
|
|
|
build() {
|
2021-07-24 10:00:43 +00:00
|
|
|
cmake \
|
2023-01-15 06:44:23 +00:00
|
|
|
-S "$pkgname" \
|
2022-10-22 22:55:23 +00:00
|
|
|
-B build \
|
2021-07-24 10:00:43 +00:00
|
|
|
-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
|
|
|
|
}
|
|
|
|
|
2021-07-24 10:00:43 +00:00
|
|
|
package() {
|
|
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
|
|
|
2023-01-15 06:44:23 +00:00
|
|
|
install -vDm644 "$pkgname/COPYING" -t "$pkgdir/usr/share/licenses/$pkgname"
|
2021-07-24 10:00:43 +00:00
|
|
|
}
|