# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 inherit eutils games DESCRIPTION="Control your own kingdom in this simulation." HOMEPAGE="http://www.linuxgamepublishing.com/info.php?id=8&" LICENSE="as-is" SLOT="0" KEYWORDS="~amd64 ~x86" # ~ppc IUSE="" RDEPEND="virtual/x11" S=${WORKDIR} dir=${GAMES_PREFIX_OPT}/${PN} Ddir=${D}/${dir} pkg_setup() { games_pkg_setup } src_install() { cdrom_get_cds majesty.xpm dodoc ${CDROM_ROOT}/README* || die "dodoc" einfo "Copying files... this may take a while..." insinto ${dir} exeinto ${dir} einfo "Unpacking game data ..." cd ${Ddir} tar xf ${CDROM_ROOT}/data.tar.gz || die "unpacking data" tar xf ${CDROM_ROOT}/datamx.tar.gz || die "unpacking data" tar xf ${CDROM_ROOT}/quests.tar.gz || die "unpacking quests" tar xf ${CDROM_ROOT}/questsmx.tar.gz || die "unpacking quests" cd ${S} doins -r ${CDROM_ROOT}/music || die "doins movies" doins -r ${CDROM_ROOT}/movies || die "doins movies" doins -r ${CDROM_ROOT}/bin/Linux/x86/glibc-2.2/netmodules || die "doins static libopenplay library" doins ${CDROM_ROOT}/majesty.{bmp,xpm} ${CDROM_ROOT}/majestysite.url || die "doins" doicon ${CDROM_ROOT}/majesty.xpm || die "doicon" # I am only installing the static version for now if use x86 || use amd64; then # majx includes all missions in majesty # doexe ${CDROM_ROOT}/bin/Linux/x86/glibc-2.1/majesty || die "doexe majesty" doexe ${CDROM_ROOT}/bin/Linux/x86/glibc-2.1/majx || die "doexe majx" elif use ppc; then # majx includes all missions in majesty # doexe ${CDROM_ROOT}/bin/Linux/ppc/glibc-2.1/majesty || die "doexe majesty" doexe ${CDROM_ROOT}/bin/Linux/ppc/glibc-2.1/majx || die "doexe majx" fi # now, since these files are coming off a cd, the times/sizes/md5sums wont # be different ... that means portage will try to unmerge some files (!) # we run touch on ${D} so as to make sure portage doesnt do any such thing find ${Ddir} -exec touch '{}' \; newicon ${CDROM_ROOT}/majesty.xpm majesty.xpm # majx includes all missions in majesty #games_make_wrapper majesty ./majesty "${dir}" "${dir}" games_make_wrapper majx ./majx "${dir}" "${dir}" prepgamesdirs # majx includes all missions in majesty #make_desktop_entry majesty "Majesty" majesty.xpm make_desktop_entry majx "Majesty: with The Northern Expansion" "majesty.xpm" }