makedepends=(cmake)

description="Fork of the popular zip manipulation library found in the zlib distribution"
url="https://github.com/zlib-ng/minizip-ng"

packager="Great-OS Team"
maintainer="Great-OS Team"

name="minizip-ng"
version="4.1.0"
release=1

PKGMK_KEEP_SOURCES='no'

source=(https://github.com/zlib-ng/minizip-ng/archive/refs/tags/$version.tar.gz)

build() {
  cmake -B build \
        -S $name-$version \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DMZ_LIB_SUFFIX="-ng" \
        -DBUILD_SHARED_LIBS=ON

  cmake --build build
  DESTDIR="$PKG" cmake --install build

  install -Dm644 $name-$version/LICENSE -t "$PKG"/usr/share/licenses/$name-$version
}
