# Template file for 'jbig2enc'
pkgname=jbig2enc
version=0.30
revision=1
build_style=gnu-configure
hostmakedepends="automake libtool"
makedepends="leptonica-devel zlib-devel"
short_desc="JBIG2 Encoder"
maintainer="Mateusz Sylwestrzak <slymattz@gmail.com>"
license="Apache-2.0"
homepage="https://github.com/agl/jbig2enc"
distfiles="https://github.com/agl/jbig2enc/archive/refs/tags/${version}.tar.gz"
checksum=4468442f666edc2cc4d38b11cde2123071a94edc3b403ebe60eb20ea3b2cc67b

pre_configure() {
	./autogen.sh
}

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

libjbig2enc_package() {
	short_desc+=" - runtime library"
	pkg_install() {
		vmove "usr/lib/*.so.*"
	}
}
