aboutsummaryrefslogtreecommitdiffstats
path: root/main/libgit2/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-02-21 22:04:12 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-02-21 22:10:40 +0100
commit85f76ec26306ea84e1ce3cfc602fca6afb6d7300 (patch)
tree9cbc845cb31a34cad54566fea01055b4a6f453f1 /main/libgit2/APKBUILD
parent27c594dd0b322ab22ee7ce0f1b31db42c64eea9a (diff)
downloadaports-85f76ec26306ea84e1ce3cfc602fca6afb6d7300.tar.bz2
aports-85f76ec26306ea84e1ce3cfc602fca6afb6d7300.tar.xz
main/libgit2: add subpackage -tests
This is needed for ruby-rugged.
Diffstat (limited to 'main/libgit2/APKBUILD')
-rw-r--r--main/libgit2/APKBUILD21
1 files changed, 15 insertions, 6 deletions
diff --git a/main/libgit2/APKBUILD b/main/libgit2/APKBUILD
index 06645910e4..11a6640eaf 100644
--- a/main/libgit2/APKBUILD
+++ b/main/libgit2/APKBUILD
@@ -4,14 +4,14 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libgit2
pkgver=0.26.0
-pkgrel=0
+pkgrel=1
pkgdesc="A linkable library for Git"
url="https://libgit2.github.com/"
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 libressl-dev"
-subpackages="$pkgname-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
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
@@ -29,8 +29,10 @@ builddir="$srcdir/$pkgname-$pkgver"
# - CVE-2016-8569
build() {
- cd "$builddir"
- cmake \
+ mkdir -p "$builddir"/build
+ cd "$builddir"/build
+
+ cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_C_FLAGS="$CFLAGS"
@@ -38,14 +40,21 @@ build() {
}
check() {
- cd "$builddir"
+ cd "$builddir"/build
make test
}
package() {
- cd "$builddir"
+ cd "$builddir"/build
make DESTDIR="$pkgdir" install
}
+tests() {
+ pkgdesc="$pkgdesc (tests)"
+
+ mkdir -p "$subpkgdir"/usr/src/$pkgname/
+ cp -a "$builddir"/tests "$subpkgdir"/usr/src/$pkgname/
+}
+
sha512sums="b6e51f2216c7c23f352572b780ea1325a25a517396709f036bb573295c2bd02aa505ba616846ac7e07863e99e640e7d47fefc5727478a257b283da99060ee47c libgit2-0.26.0.tar.gz
6817cae286f663c6ceb890576c491d89ffe0cf57b96a7340b8b4ef2c021a35d7672ce76b6e875ed72155e960455d29973329782850bd9cca543c6f74a9a6f93f build-both-static-dynamic.patch"