void-packages/srcpkgs/libgit2-1.8/template
2024-08-04 17:36:57 +02:00

43 lines
1.2 KiB
Bash

# Template file for 'libgit2-1.8'
pkgname=libgit2-1.8
version=1.8.1
revision=1
build_style=cmake
configure_args="-DENABLE_REPRODUCIBLE_BUILDS=ON -DBUILD_CLI=OFF -DUSE_SSH=ON -DUSE_HTTP_PARSER=llhttp"
hostmakedepends="python3 pkg-config"
makedepends="zlib-devel openssl-devel llhttp-devel libssh2-devel"
short_desc="Git linkable library ${pkgname#libgit2-}"
maintainer="tranzystorekk <tranzystorek.io@protonmail.com>"
license="custom:GPL-2.0-or-later WITH GCC-exception-2.0"
homepage="https://libgit2.org"
distfiles="https://github.com/libgit2/libgit2/archive/refs/tags/v${version}.tar.gz"
checksum=8c1eaf0cf07cba0e9021920bfba9502140220786ed5d8a8ec6c7ad9174522f8e
if [ -z "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DBUILD_TESTS=OFF"
fi
CFLAGS="-D_LARGE_FILE_SOURCE=1 -D_FILE_OFFSET_BITS=64"
post_patch() {
# no online tests
vsed \
-i tests/libgit2/CMakeLists.txt \
-e '/-sonline/s/^/#/'
}
post_install() {
vlicense COPYING
}
libgit2-1.8-devel_package() {
depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
provides="virtual-libgit2-devel-${version}_${revision}"
conflicts="virtual-libgit2-devel"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
}
}