SUMMARY="Free server software for streaming multimedia"
DESCRIPTION="Icecast is a streaming media (audio/video) server which \
currently supports Ogg (Vorbis and Theora), Opus, WebM and MP3 streams. \
It can be used to create an Internet radio station or a privately running \
jukebox and many things in between. It is very versatile in that new formats \
can be added relatively easily and supports open standards for communication \
and interaction."
HOMEPAGE="https://www.icecast.org/"
COPYRIGHT="2001-2018 the Icecast team
	Jack Moffitt
	Michael Smith
	oddsock
	Karl Heyes
	Philipp Schafft
	Thomas B. Ruecker
	David Richards"
LICENSE="GNU LGPL v2"
REVISION="6"
SOURCE_URI="http://downloads.xiph.org/releases/icecast/icecast-$portVersion.tar.gz"
CHECKSUM_SHA256="49b5979f9f614140b6a38046154203ee28218d8fc549888596a683ad604e4d44"
PATCHES="icecast-$portVersion.patchset"
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
	PATCHES+="
	icecast-$portVersion-gcc2.patchset"
fi

ARCHITECTURES="all"

GLOBAL_WRITABLE_FILES="settings/icecast.xml keep-old"

PROVIDES="
	icecast = $portVersion
	cmd:icecast = $portVersion
	"
REQUIRES="
	haiku
	lib:libcurl
	lib:libnghttp2
	lib:libogg
	lib:libspeex
	lib:libssl
	lib:libtheora
	lib:libvorbis
	lib:libxml2
	lib:libxslt
	lib:libz
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libcurl
	devel:libnghttp2
	devel:libogg
	devel:libspeex
	devel:libssl
	devel:libtheora
	devel:libvorbis
	devel:libxml2
	devel:libxslt
	devel:libz
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:gcc
	cmd:ld
	cmd:libtoolize
	cmd:make
	cmd:pkg_config
	"

defineDebugInfoPackage icecast \
	$binDir/icecast


BUILD()
{
	autoreconf -vfi
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
}
