# Template file for 'live555'
pkgname=live555
version=2026.04.22
revision=1
build_style=gnu-makefile
makedepends="openssl-devel"
short_desc="Set of C++ libraries for multimedia streaming"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-3.0-or-later"
homepage="http://www.live555.com/liveMedia/"
distfiles="https://download.live555.com/live.${version}.tar.gz"
checksum=1ffd626ce2e2473196e55a473b7b5ba056326eeabf8fd5622cea6b123d8b6370

CXXFLAGS="-std=c++20"
if [ "$CROSS_BUILD" ]; then
	CXXFLAGS="${CXXFLAGS} -I. -Iinclude -I../UsageEnvironment/include\
		-I../BasicUsageEnvironment/include\
		-I../groupsock/include -I../liveMedia/include\
		-DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1\
		-D_FILE_OFFSET_BITS=64 -fPIC"
fi

pre_build() {
	./genMakefiles linux-with-shared-libraries
}

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

live555-progs_package() {
	short_desc+=" - utilities"
	pkg_install() {
		vmove usr/bin
	}
}
