void-packages/srcpkgs/quazip/template

77 lines
1.8 KiB
Bash

# Template file for 'quazip'
pkgname=quazip
version=1.4
revision=1
build_style=cmake
configure_args="-DQUAZIP_QT_MAJOR_VERSION=5"
hostmakedepends="qt5-host-tools qt5-devel qt6-tools qt6-base"
makedepends="qt5-devel qt6-base-devel qt6-qt5compat-devel zlib-devel"
short_desc="Qt5/C++ wrapper for the Gilles Vollant's ZIP/UNZIP C package"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="LGPL-2.1-only"
homepage="https://github.com/stachenov/quazip"
distfiles="https://github.com/stachenov/quazip/archive/v${version}.tar.gz"
checksum=79633fd3a18e2d11a7d5c40c4c79c1786ba0c74b59ad752e8429746fe1781dd6
if [ "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DQUAZIP_ENABLE_TESTS=ON"
fi
post_configure() {
configure_args="${configure_args/=5/=6}"
cmake_builddir="build-qt6" do_configure
}
post_build() {
cmake_builddir="build-qt6" do_build
}
post_check() {
cmake_builddir="build-qt6" do_check
}
post_install() {
cmake_builddir="build-qt6" do_install
}
quazip-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove "usr/include/*Qt5*"
vmove "usr/lib/cmake/*Qt5*"
vmove "usr/lib/pkgconfig/*qt5*"
vmove "usr/lib/*qt5.so"
}
}
quazip-qt5_package() {
build_style=meta
short_desc+=" (transitional dummy package)"
depends="quazip>=${version}_${revision}"
}
quazip-qt5-devel_package() {
build_style=meta
short_desc+=" (transitional dummy package)"
depends="quazip-devel>=${version}_${revision}"
}
quazip-qt6_package() {
short_desc="${short_desc/Qt5/Qt6}"
pkg_install() {
vmove "usr/lib/*qt6.so.*"
}
}
quazip-qt6-devel_package() {
depends="${sourcepkg}-qt6>=${version}_${revision}"
short_desc="${short_desc/Qt5/Qt6} - development files"
pkg_install() {
vmove "usr/include/*Qt6*"
vmove "usr/lib/cmake/*Qt6*"
vmove "usr/lib/pkgconfig/*qt6*"
vmove "usr/lib/*qt6.so"
}
}