# Template file for 'zziplib'
pkgname=zziplib
version=0.13.76
revision=3
build_style=cmake
configure_args="-DZZIP_LIBLATEST=ON"
hostmakedepends="pkg-config python3 tar zip"
makedepends="zlib-devel"
short_desc="Lightweight library to extract data from zip files"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later, MPL-1.1"
homepage="https://github.com/gdraheim/zziplib"
changelog="https://raw.githubusercontent.com/gdraheim/zziplib/master/ChangeLog"
distfiles="https://github.com/gdraheim/zziplib/archive/v${version}.tar.gz"
checksum=08b0e300126329c928a41b6d68e397379fad02469e34a0855d361929968ea4c0

if [ "$CROSS_BUILD" ]; then
	configure_args+=" -DZZIPTEST=OFF"
fi


post_install() {
	sed -i "s|\(-specs=.*hardened-ld\)||g" -i ${DESTDIR}/usr/lib/pkgconfig/*.pc
}

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