aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2018-06-28 18:39:21 +0300
committerAndy Postnikov <apostnikov@gmail.com>2018-07-13 18:46:38 +0300
commitd3ddb8d3de6bff7cf35baf9e36a2dbf1001ca7bb (patch)
tree00075dd0c174b6d8be982c151140aa4b5a64fa43
parent3b275d38aa175e24b6d1f138df746fe5b3b2ecba (diff)
downloadaports-d3ddb8d3de6bff7cf35baf9e36a2dbf1001ca7bb.tar.bz2
aports-d3ddb8d3de6bff7cf35baf9e36a2dbf1001ca7bb.tar.xz
testing/brotli: improve abuild
-rw-r--r--testing/brotli/APKBUILD22
1 files changed, 13 insertions, 9 deletions
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
}