diff --git a/community/quazip/APKBUILD b/community/quazip/APKBUILD
index 249b6f2fc804f109ae7bf3a12512151164fa5434..f5249d245db05b277dbc7bfa257375910a9b19e0 100644
--- a/community/quazip/APKBUILD
+++ b/community/quazip/APKBUILD
@@ -3,31 +3,65 @@
 # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
 pkgname=quazip
 pkgver=1.3
-pkgrel=0
+pkgrel=1
 pkgdesc="C++ wrapper for the Gilles Vollant's ZIP/UNZIP C package"
 options="!check" # Testsuite only available with qmake not cmake
 url="https://github.com/stachenov/quazip"
 arch="all"
 # Has custom static linking exception
 license="LGPL-2.1-or-later WITH custom-static-linking-exception"
-makedepends="qt5-qtbase-dev cmake"
-subpackages="$pkgname-dev $pkgname-doc"
+makedepends="
+	cmake
+	qt5-qtbase-dev
+	qt6-qtbase-dev
+	qt6-qt5compat-dev
+	samurai
+	"
+subpackages="
+	$pkgname-dev
+	$pkgname-doc
+	libquazip1-qt5:qt5
+	libquazip1-qt6:qt6
+	"
 source="quazip-$pkgver.tar.gz::https://github.com/stachenov/quazip/archive/v$pkgver.tar.gz"
 replaces="quazip-qt5"
 
 build() {
-	cmake -B build . \
+	export CXXFLAGS="$CXXFLAGS -flto=auto"
+	export CFLAGS="$CFLAGS -flto=auto"
+
+	cmake -B build-qt5 -G Ninja \
+		-DCMAKE_BUILD_TYPE=None \
+		-DCMAKE_INSTALL_PREFIX=/usr \
+		-DQUAZIP_QT_MAJOR_VERSION=5
+
+	cmake --build build-qt5
+
+	cmake -B build-qt6 -G Ninja \
 		-DCMAKE_BUILD_TYPE=None \
 		-DCMAKE_INSTALL_PREFIX=/usr \
-		-DBUILD_WITH_QT4:BOOL=OFF \
-		-DCMAKE_CXX_FLAGS="$CFLAGS -fPIC"
-	make -C build
+		-DQUAZIP_QT_MAJOR_VERSION=6
+
+	cmake --build build-qt6
 }
 
 package() {
-	make -C build DESTDIR="$pkgdir" install
+	DESTDIR="$pkgdir" cmake --install build-qt5
+	DESTDIR="$pkgdir" cmake --install build-qt6
 	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
-	rm -f "$pkgdir"/usr/lib/*.a
+}
+
+qt5() {
+	pkgdesc="C++ wrapper for the Gilles Vollant's ZIP/UNZIP C package (qt5)"
+	replaces="quazip<1.3-r0"
+
+	amove usr/lib/libquazip1-qt5.so.*
+}
+
+qt6() {
+	pkgdesc="C++ wrapper for the Gilles Vollant's ZIP/UNZIP C package (qt6)"
+
+	amove usr/lib/libquazip1-qt6.so.*
 }
 
 sha512sums="