From d3ddb8d3de6bff7cf35baf9e36a2dbf1001ca7bb Mon Sep 17 00:00:00 2001 From: prspkt Date: Thu, 28 Jun 2018 18:39:21 +0300 Subject: testing/brotli: improve abuild --- testing/brotli/APKBUILD | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'testing/brotli') diff --git a/testing/brotli/APKBUILD b/testing/brotli/APKBUILD index 821d54d94f..bad68ba3c3 100644 --- a/testing/brotli/APKBUILD +++ b/testing/brotli/APKBUILD @@ -9,7 +9,7 @@ arch="all" license="MIT" makedepends="cmake" subpackages="$pkgname-doc $pkgname-dev" -source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/google/brotli/archive/v$pkgver.tar.gz" builddir="$srcdir/$pkgname-$pkgver" prepare() { @@ -18,12 +18,17 @@ prepare() { } build() { - mkdir "$builddir"/build - cd "$builddir"/build - cmake .. \ - -DCMAKE_BUILD_TYPE=Release \ + cd "$builddir" + if [ "$CBUILD" != "$CHOST" ]; then + CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" + fi + cmake \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=/usr/lib + -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=True \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + ${CMAKE_CROSSOPTS} make } @@ -34,10 +39,9 @@ check() { package() { cd "$builddir" - make DESTDIR="$pkgdir" -C build install + make DESTDIR="$pkgdir" install - local man - for man in docs/*.?; do + local man; for man in docs/*.?; do install -D -m644 $man "$pkgdir"/usr/share/man/man${man##*.}/${man##*/} done } -- cgit v1.2.3