SUMMARY="Some default themes for Haiku"
DESCRIPTION="A collection of themes for the Haiku Theme Manager.

The Haiku Theme Manager is compatible with the one that shipped with ZETA. \
Users can choose which part of a theme to apply or save. It can also import \
BeTheme themes, and to some degree, MS Plus themes. It is add-ons based, so it \
can be extended."
HOMEPAGE="https://github.com/mmuman/HaikuThemes"
COPYRIGHT="2000-2019 François Revol"
LICENSE="MIT"
REVISION="4"
srcGitRev="35017d4ef1099f1bc4114b47fec9cfca0dff4816"
SOURCE_URI="$HOMEPAGE/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="fda488324d67ee6a77cb5cb69a1a769184089135fa3f43f117bbc6fe0bedb1db"
SOURCE_DIR="HaikuThemes-$srcGitRev"

ARCHITECTURES="any"

PROVIDES="
	themes = $portVersion
	"
REQUIRES="
	haiku
	"
BUILD_REQUIRES="
	haiku_devel >= $haikuVersion
	"
BUILD_PREREQUIRES="
	"
SUPPLEMENTS="
	thememanager
	"

# separate packages for other topics

SUMMARY_tunetracker="TuneTracker theme for Haiku"
ARCHITECTURES_tunetracker="any"
PROVIDES_tunetracker="
	themes_tunetracker = $portVersion
	"
REQUIRES_tunetracker="
	haiku_devel >= $haikuVersion
	"
SUPPLEMENTS_tunetracker="
	thememanager
	"

SUMMARY_stargate="Stargate SG1, SGA, SGU themes for Haiku"
ARCHITECTURES_stargate="any"
PROVIDES_stargate="
	themes_stargate = $portVersion
	"
REQUIRES_stargate="
	haiku_devel >= $haikuVersion
	"
SUPPLEMENTS_stargate="
	thememanager
	"


BUILD()
{
	cd UIThemes
}

INSTALL()
{
	cd UIThemes
	mkdir -p $dataDir/UIThemes

	themes_base="Haiku Citrus gonxish Matrix2 moz-modern nucleo Olive smoke win2k"
	themes_tunetracker="TuneTracker"
	themes_stargate="AOS-Lantean Stargate_Atlantis Stargate_Atlantis_Ancient"

	for t in $themes_base $themes_tunetracker $themes_stargate; do
		echo "copying '$t'"
		cp -R "$t" "$dataDir/UIThemes/"
	done

	paths_tunetracker=""

	for t in ${themes_tunetracker}; do
		paths_tunetracker="$paths_tunetracker $dataDir/UIThemes/$t"
	done

	packageEntries tunetracker \
		$paths_tunetracker

	paths_stargate=""

	# symlink fonts
	mkdir -p "$fontsDir/ttfonts"

#	for t in "$dataDir/UIThemes/Stargate_Atlantis/Stargate Atlantis Base/SGA Fonts"/*; do
#		fp="$(basename "$t")"
#		ln -s "$t" "$fontsDir/ttfonts/$fp"
#		paths_stargate="$paths_stargate $fontsDir/ttfonts/$fp"
#	done

	for t in ${themes_stargate}; do
		paths_stargate="$paths_stargate $dataDir/UIThemes/$t"
	done
	packageEntries stargate \
		$paths_stargate
}
