makedepends=(qtbase cmake qt6-5compat)

description="C++ wrapper for the Gilles Vollant's ZIP/UNZIP C package"
url="https://stachenov.github.io/quazip/"
packager="Great-OS Team"
maintainer="rems"

name=quazip
version=1.5
release=2

PKGMK_KEEP_SOURCES="no"

source=(https://github.com/stachenov/$name/archive/v$version.tar.gz)

build() {
  mkdir -v build-{qt5,qt6} && pushd build-qt5

   cmake  -DCMAKE_INSTALL_PREFIX=/usr \
          ../$name-$version

   make
   make DESTDIR=$PKG install

  popd

  pushd build-qt6
  cmake  -DCMAKE_INSTALL_PREFIX=/usr \
         -DQUAZIP_QT_MAJOR_VERSION=6 \
         ../$name-$version

  make
  make DESTDIR=$PKG install

  popd
}
