SUMMARY="Portable SDK for UPnP* Devices"
DESCRIPTION="The Portable SDK for UPnP Devices is an SDK for development of \
UPnP device and control point applications.  It consists of the core UPnP \
protocols along with a UPnP-specific eXtensible Markup Language (XML) parser \
supporting the Document Object Model (DOM) Level 2 API and an optional, \
integrated mini web server for serving UPnP related documents."
HOMEPAGE="http://pupnp.sourceforge.net"
COPYRIGHT="2000-2003 Intel Corporation
	2005-2006 Rémi Turboult
	2006 Michel Pfeiffer and others"
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="https://github.com/pupnp/pupnp/archive/release-$portVersion.tar.gz"
CHECKSUM_SHA256="6a7f26818d5aa3949bc2e68739387a261c564430ba612f793c61d31619dde1e4"
SOURCE_DIR="pupnp-release-$portVersion"
PATCHES="libupnp-$portVersion.patchset"

ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	libupnp$secondaryArchSuffix = $portVersion
	lib:libixml$secondaryArchSuffix = 11.0.0 compat >= 11
	lib:libupnp$secondaryArchSuffix = 17.0.0 compat >= 17
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"

PROVIDES_devel="
	libupnp${secondaryArchSuffix}_devel = $portVersion
	devel:libixml$secondaryArchSuffix = 11.0.0 compat >= 11
	devel:libupnp$secondaryArchSuffix = 17.0.0 compat >= 17
	"
REQUIRES_devel="
	libupnp$secondaryArchSuffix == $portVersion base
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:automake
	cmd:gcc$secondaryArchSuffix
	cmd:libtoolize
	cmd:make
	cmd:pkg_config$secondaryArchSuffix
	"

BUILD()
{
	autoreconf -fi
	runConfigure ./configure
	make
}

INSTALL()
{
	make install

	rm $libDir/lib*.la

	# prepare development lib links
	prepareInstalledDevelLibs libupnp libixml
	fixPkgconfig

	# devel package
	packageEntries devel $developDir
}

TEST()
{
	make check
}
