# Description: C++ wrapper for the Gilles Vollant's ZIP/UNZIP C package
# URL: https://stachenov.github.io/quazip/
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: qt6-5compat

name=quazip6
version=1.4
release=1
source=(https://github.com/stachenov/quazip/archive/v$version/quazip-$version.tar.gz)

build() {
  cmake -S quazip-$version -B build -G Ninja \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -D CMAKE_INSTALL_LIBDIR=lib \
    -D CMAKE_BUILD_TYPE=Release \
    -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
    -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
    -D QUAZIP_QT_MAJOR_VERSION=6 \
    -Wno-dev
  cmake --build build
  DESTDIR=$PKG cmake --install build
}
