# Template file for 'zulucrypt'
pkgname=zulucrypt
version=7.1.0
revision=1
build_style=cmake
configure_args="-DINTERNAL_ZULUPLAY=true -DBUILD_WITH_QT6=ON
 -DUDEVSUPPORT=ON -DUSE_POLKIT=ON
 -DHOMEMOUNTPREFIX=$(vopt_if homemount true false)"
#set this to "false" once lxqt_wallet is available in void-packages
configure_args+=" -DINTERNAL_LXQT_WALLET=true"
hostmakedepends="qt6-base pkg-config"
makedepends="libblkid-devel cryptsetup-devel libgcrypt-devel
 device-mapper-devel libuuid-devel qt6-base-devel
 libpwquality-devel libsecret-devel"
short_desc="Frontend to cryptsetup and Veracrypt for harddrive and file encryption"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://mhogomchungu.github.io/zuluCrypt"
changelog="https://raw.githubusercontent.com/mhogomchungu/zuluCrypt/master/changelog"
distfiles="https://github.com/mhogomchungu/zuluCrypt/archive/${version}.tar.gz"
distfiles="https://github.com/mhogomchungu/zuluCrypt/releases/download/${version}/zuluCrypt-${version}.tar.xz"
checksum=7631f6b2807f0138dd2895bb6e026912d4de9d67321759d15fbe691f23271959

build_options="homemount"
desc_option_homemount="Use homedir as mountpoint, not /run/media/private"
broken=yes

post_install() {
	#delete redundant icons
	rm ${DESTDIR}/usr/share/icons/zulu*.png

	chmod 644 ${DESTDIR}/usr/share/applications/*
}

zulucrypt-gui_package() {
	short_desc+=" - GUI tools"
	# needs xdg-open
	depends="${sourcepkg}>=${version}_${revision} xdg-utils"
	pkg_install() {
		vmove "usr/bin/*-gui"
		vmove "usr/share/icons/*"
		vmove "usr/share/pixmaps/*"
		vmove "usr/share/applications/*.desktop"
	}
}

zulucrypt-devel_package() {
	short_desc+=" - development files"
	depends="${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.so"
	}
}
