jobextra/libgit2/PKGBUILD-arch

79 lines
2.0 KiB
Plaintext

# Maintainer: David Runge <dvzrv@archlinux.org>
# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Hilton Medeiros <medeiros.hilton@gmail.com>
# Contributor: Dave Reisner <d@falconindy.com>
pkgname=libgit2
pkgver=1.6.2
pkgrel=1
epoch=1
pkgdesc="A linkable library for Git"
arch=(x86_64)
url="https://github.com/libgit2/libgit2"
license=(GPL2)
depends=(
gcc-libs
glibc
http-parser
zlib
)
makedepends=(
cmake
libssh2
openssl
pcre2
python
)
provides=(libgit2.so)
source=($url/archive/v$pkgver/$pkgname-v$pkgver.tar.gz)
sha512sums=('ef9feef36c5876776f3aa608101115c9e7a0970e6dd752851d930cb85b4b1789ed68f42700ebea51095ff54600e37c18a4de0c0678d9a4d7d4aba83668890c09')
b2sums=('7a42d8440fbe0afa24057bf53d52bcb04b4e8654f71cfa55871a7e77a150297731879d8f5be51df61ad91556656b66b102536a508cf61d9c11e8658e841fc560')
build() {
local cmake_options=(
-B build
-DCMAKE_BUILD_TYPE=None
-DCMAKE_INSTALL_PREFIX=/usr
-DREGEX_BACKEND=pcre2
-DUSE_HTTP_PARSER=system
-DUSE_SSH=ON
-S $pkgname-$pkgver
-Wno-dev
)
cmake "${cmake_options[@]}"
cmake --build build --verbose
}
check() {
local ignored_tests=(
'invasive|'
'online|'
'ssh|'
'network_url_parse__hostname_implied_root_empty_port|'
'network_url_parse__hostname_empty_port|'
'network_url_parse__ipv4_implied_root_empty_port|'
'network_url_parse__ipv4_empty_port|'
'network_url_parse__ipv6_implied_root_empty_port|'
'network_url_parse__ipv6_empty_port'
)
local ifs="$IFS"
IFS=
# NOTE: disable tests requiring the internet, relying on non-existent
# resources, or those that are only compatible with the (modified) vendored
# version of http-parser, but not with upstream http-parser
ctest --test-dir build --output-on-failure -E "${ignored_tests[*]}"
IFS="$ifs"
}
package() {
depends+=(
libssh2 libssh2.so
openssl libcrypto.so libssl.so
pcre2 libpcre2-8.so
)
DESTDIR="$pkgdir" cmake --install build
install -vDm 644 $pkgname-$pkgver/{AUTHORS,README.md} -t "$pkgdir/usr/share/doc/$pkgname/"
}