SUMMARY="A Desktop search daemon"
DESCRIPTION="Strigi is a desktop search daemon, which is operating \
system-independent and desktop-independent. Strigi's goals are to be fast, \
use a small amount of RAM, and use flexible backends and plug-ins. Like most \
desktop search systems, Strigi can extract information from files, such as \
the length of an audio clip, the contents of a document, or the resolution \
of a picture; plugins determine what filetypes it is capable of handling."
HOMEPAGE="http://strigi.sourceforge.net"
COPYRIGHT="2011 Jos van den Oever"
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="https://www.vandenoever.info/software/strigi/strigi-$portVersion.tar.bz2"
CHECKSUM_SHA256="43e461a625acdefa59bf58cc9d10aebda9eba920dfbe800fc77e6dcbf1eff989"
PATCHES="strigi-$portVersion.patchset"

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

PROVIDES="
	strigi${secondaryArchSuffix} = $portVersion
	cmd:deepfind
	cmd:deepgrep
	cmd:rdfindexer
	cmd:strigicmd
	cmd:strigidaemon
	cmd:xmlindexer
	lib:libsearchclient$secondaryArchSuffix = $portVersion
	lib:libstreamanalyzer$secondaryArchSuffix = $portVersion
	lib:libstreams$secondaryArchSuffix = $portVersion
	lib:libstrigihtmlgui$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku${secondaryArchSuffix}
	cmd:perl
	lib:libbz2$secondaryArchSuffix
	lib:libiconv$secondaryArchSuffix
	lib:libxml2$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	"

PROVIDES_devel="
	strigi${secondaryArchSuffix}_devel = $portVersion
	devel:libsearchclient$secondaryArchSuffix = $portVersion
	devel:libstreamanalyzer$secondaryArchSuffix = $portVersion
	devel:libstreams$secondaryArchSuffix = $portVersion
	devel:libstrigihtmlgui$secondaryArchSuffix = $portVersion
	"
REQUIRES_devel="
	haiku${secondaryArchSuffix}_devel
	strigi${secondaryArchSuffix} == $portVersion base
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libbz2$secondaryArchSuffix
	devel:libiconv$secondaryArchSuffix
	devel:libxml2$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:cmake
	cmd:g++${secondaryArchSuffix}
	cmd:make
	cmd:perl
	cmd:pkg_config$secondaryArchSuffix
	"

BUILD()
{
	cmake $cmakeDirArgs -DCMAKE_BUILD_TYPE=Release \
		-DENABLE_DBUS=off .
	make $jobArgs
}

INSTALL()
{
	make install

	prepareInstalledDevelLibs \
		libstreamanalyzer \
		libstreams \
		libsearchclient \
		libstrigihtmlgui
	fixPkgconfig

	packageEntries devel \
		$developDir \
		$libDir/cmake
}
