# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games EXPORT_FUNCTIONS src_install MY_DATADIR_NAME=${PN} WRAPPER=${PN} ALEPHONE_DATADIR=${GAMES_DATADIR}/AlephOne ALEPHONE_TEXTURESDIR=${ALEPHONE_DATADIR}/Textures MY_DATADIR=${GAMES_DATADIR}/${MY_DATADIR_NAME} MY_TEXTURESDIR=${ALEPHONE_TEXTURESDIR}/${MY_DATADIR_NAME} DATA_FILES="Images Map Map.resources Music Shapes Sounds" MAKE_SYMLINK=yes games-alephone_src_install() { # Install the data files insinto "${MY_DATADIR}" doins -r "${DATA_FILES}" Icons MML "Physics Models" Themes 2> /dev/null # Textures go inside the main AlephOne data directory insinto "${ALEPHONE_TEXTURESDIR}" doins -r Textures/"${MY_DATADIR_NAME}" 2> /dev/null if [ "${MAKE_SYMLINK}" = "yes" ]; then # Create the appropriate symlink dodir "${GAMES_BINDIR}" dosym alephone.sh "${GAMES_BINDIR}"/"${WRAPPER}" # Install the desktop entry and icon if [ -e Icons/AlephOne.png ]; then newicon Icons/AlephOne.png "${MY_DATADIR_NAME}".png # Use the provided icon make_desktop_entry "${WRAPPER}" "${APP_NAME}" "${MY_DATADIR_NAME}".png else # Use the default Aleph One icon make_desktop_entry "${WRAPPER}" "${APP_NAME}" alephone.png fi fi # Make sure the extra dirs exist in case the user wants to add some data keepdir "${MY_DATADIR}"/{Icons,MML,"Physics Models",Themes} "${MY_TEXTURESDIR}" # Make sure all the right stuff has all the right permissions prepgamesdirs }