# Template file for 'lz4'
pkgname=lz4
reverts="131_1 130_1 129_1 128_1 127_1 126_1 125_1 124_1 123_1 122_1"
version=1.10.0
revision=1
bootstrap=yes
build_style=gnu-makefile
checkdepends="python3"
short_desc="Extremely fast compression algorithm"
maintainer="Orphaned <orphan@voidlinux.org>"
# all files under source 'lib' directory are BSD-2, others are GPLv2+
license="BSD-2-Clause AND GPL-2.0-or-later"
homepage="https://lz4.github.io/lz4"
changelog="https://github.com/lz4/lz4/raw/refs/heads/dev/NEWS"
distfiles="https://github.com/lz4/lz4/releases/download/v${version}/lz4-${version}.tar.gz"
checksum="537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b"

post_install() {
	# BSD-2-Clause must be installed
	vlicense lib/LICENSE
}

liblz4_package() {
	short_desc="LZ4 compression library"
	pkg_install() {
		vmove "usr/lib/*.so.*"
	}
}

liblz4-devel_package() {
	short_desc="LZ4 compression library - development files"
	depends="liblz4-${version}_${revision}"
	pkg_install() {
		vmove usr/include
		vmove "usr/lib/*.a"
		vmove "usr/lib/*.so"
		vmove usr/lib/pkgconfig
	}
}
