# Template file for 'minizip'
pkgname=minizip
version=1.3
revision=1
build_wrksrc="contrib/${pkgname}"
build_style=gnu-configure
hostmakedepends="automake libtool"
makedepends="zlib-devel"
short_desc="Zip file manipulation library"
maintainer="ojab <ojab@ojab.ru>"
license="Zlib"
homepage="https://www.winimage.com/zLibDll/minizip.html"
distfiles="https://www.zlib.net/zlib-${version}.tar.gz"
checksum=ff0ba4c292013dbc27530b3a81e1f9a813cd39de01ca5e0f8bf355702efa593e

pre_configure() {
	autoreconf -i
}

post_install() {
	# https://github.com/madler/zlib/pull/229
	rm ${DESTDIR}/usr/include/minizip/crypt.h
}

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