# Contributor: k0r10n # Contributor: Jose-Luis Rivas # Maintainer: Carlo Landmeter pkgname=libzip pkgver=1.10.0 pkgrel=0 pkgdesc="C library for manipulating zip archives" url="https://libzip.org/" arch="all" license="BSD-3-Clause" depends_dev="$pkgname-tools=$pkgver-r$pkgrel bzip2-dev xz-dev zlib-dev zstd-dev" makedepends="$depends_dev cmake openssl-dev>3 perl samurai" checkdepends="nihtest" subpackages="$pkgname-dev $pkgname-doc $pkgname-tools" source="https://libzip.org/download/libzip-$pkgver.tar.xz" # secfixes: # 1.3.0-r0: # - CVE-2017-14107 build() { CFLAGS="$CFLAGS -flto=auto" \ cmake -B build -G Ninja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_EXAMPLES=OFF \ -DENABLE_BZIP2=ON \ -DENABLE_LZMA=ON \ -DENABLE_OPENSSL=ON \ -DENABLE_ZSTD=ON \ -DCMAKE_BUILD_TYPE=MinSizeRel cmake --build build } check() { ctest --test-dir build --output-on-failure } package() { DESTDIR="$pkgdir" cmake --install build } tools() { pkgdesc="$pkgname cmp and merge tools" amove usr/bin } sha512sums=" 558dcb58f0c209fea22463fb2bb705e3e3f45066200c1f87f7c7139da10d14445e4d9ce208b7eedf5d46470f6c1120f77aa6c9619b221275e6f8f4facbebac0b libzip-1.10.0.tar.xz "