aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/libgit2/APKBUILD21
1 files changed, 15 insertions, 6 deletions
diff --git a/main/libgit2/APKBUILD b/main/libgit2/APKBUILD
index b4d39fcdf3..edb2135574 100644
--- a/main/libgit2/APKBUILD
+++ b/main/libgit2/APKBUILD
@@ -4,16 +4,14 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libgit2
pkgver=0.28.2
-pkgrel=0
+pkgrel=1
pkgdesc="A linkable library for Git"
url="https://libgit2.org/"
arch="all"
license="GPL-2.0-only WITH GCC-exception-2.0"
depends_dev="curl-dev libssh2-dev"
makedepends="$depends_dev python2 cmake zlib-dev openssl-dev"
-subpackages="$pkgname-dev $pkgname-tests::noarch"
-provides="$pkgname-libs" # for backward compatibility with v3.4
-replaces="$pkgname-libs" # for backward compatibility with v3.4
+subpackages="$pkgname-static $pkgname-dev $pkgname-tests::noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
"
options="!check" # FIXME some tests fails
@@ -41,6 +39,17 @@ build() {
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_C_FLAGS="$CFLAGS"
make
+
+ # Build static library
+ mkdir -p "$builddir"/build-static
+ cd "$builddir"/build-static
+
+ cmake .. \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ -DBUILD_SHARED_LIBS=OFF
+ make
}
check() {
@@ -49,8 +58,8 @@ check() {
}
package() {
- cd "$builddir"/build
- make DESTDIR="$pkgdir" install
+ make -C build DESTDIR="$pkgdir" install
+ make -C build-static DESTDIR="$pkgdir" install
}
tests() {