# Template file for 'libsixel'
pkgname=libsixel
version=1.10.5
revision=1
build_style=meson
hostmakedepends="pkg-config"
makedepends="libjpeg-turbo-devel libpng-devel"
short_desc="SIXEL encoder/decoder"
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="MIT"
homepage="https://github.com/libsixel/libsixel"
distfiles="https://github.com/libsixel/libsixel/archive/refs/tags/v${version}.tar.gz"
checksum=b6654928bd423f92e6da39eb1f40f10000ae2cc6247247fc1882dcff6acbdfc8

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

libsixel-util_package() {
	short_desc+=" - utilities"
	depends="${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove usr/bin/img2sixel
		vmove usr/bin/sixel2png
		vmove usr/share/bash-completion
		vmove usr/share/zsh
		vmove usr/share/man/man1
	}
}

post_install() {
	vlicense LICENSE
}
