diff options
author | Milan P. Stanić <mps@arvanta.net> | 2018-12-29 18:44:54 +0100 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2019-02-05 10:18:16 +0000 |
commit | 4d1093ebca1830c1cdaa8f9272afbea0baaa4eb1 (patch) | |
tree | a2f16b5cc6377eac3382f7ceaf20185ad0b02f21 /community | |
parent | d56624639bb7633c59a109ac8e09301127a1aeb0 (diff) | |
download | aports-4d1093ebca1830c1cdaa8f9272afbea0baaa4eb1.tar.bz2 aports-4d1093ebca1830c1cdaa8f9272afbea0baaa4eb1.tar.xz |
community/libzip: build static libzip.a and add it to -dev apk
build static version of libzip in two pass because upstream made
switch which allows build only shared or static in single
compile/build invocation
add static libzip.a to libzip-dev with hackish cp/mv
Diffstat (limited to 'community')
-rw-r--r-- | community/libzip/APKBUILD | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/community/libzip/APKBUILD b/community/libzip/APKBUILD index 0272295d83..1d0fa8d098 100644 --- a/community/libzip/APKBUILD +++ b/community/libzip/APKBUILD @@ -3,7 +3,7 @@ # Maintainer: Carlo Landmeter <clandmeter@gmail.com> pkgname=libzip pkgver=1.5.1 -pkgrel=2 +pkgrel=3 pkgdesc="C library for manipulating zip archives" url="http://www.nih.at/libzip/index.html" arch="all" @@ -23,11 +23,24 @@ build() { cmake \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ + -DBUILD_SHARED_LIBS=False \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_C_FLAGS="$CFLAGS" + make + + mkdir -p "$pkgdir"/tmp + cp "$builddir"/lib/libzip.a "$pkgdir"/tmp + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=True \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DCMAKE_C_FLAGS="$CFLAGS" make + mv "$pkgdir"/tmp/libzip.a "$builddir"/lib/libzip.a + rm -rf "$pkgdir"/tmp } check() { @@ -38,6 +51,7 @@ check() { package() { cd "$builddir" make DESTDIR="$pkgdir" -j1 install + cp "$builddir"/lib/libzip.a "$pkgdir"/usr/lib } tools() { |