# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games MY_P="linuxpatch1.31.tar.gz" DESCRIPTION="Uplink is a commercial hacking strategy game." HOMEPAGE="http://www.uplink.co.uk/" SRC_URI="http://www.introversion.co.uk/uplink/downloads/${MY_P}" LICENSE="uplink" SLOT="0" KEYWORDS="~amd64 ~x86" RESTRICT="nostrip nomirror" IUSE="" RDEPEND="" DEPEND="${RDEPEND} app-arch/unzip app-arch/tar" dir=${GAMES_PREFIX_OPT}/${PN} Ddir=${D}/${dir} pkg_setup() { games_pkg_setup # If the file still exists from an earlier install, assume its the same # Otherwise copy it from the CD if [ -e ${DISTDIR}/uplink.zip ] ; then # Do nothing einfo "Found local copy of uplink.zip" else cdrom_get_cds linux if [ -e ${CDROM_ROOT}/linux/uplink.zip ] ; then export CDROM_ROOT=${CDROM_ROOT}/linux einfo "Found the original Uplink CD" einfo "Copying uplink.zip to ${DISTDIR}" cp ${CDROM_ROOT}/uplink.zip ${DISTDIR}/uplink.zip else die "You need the original Uplink CD" fi fi } src_install () { dodir ${dir} # Unzip basic uplink cd ${Ddir} unzip -qq ${DISTDIR}/uplink.zip # Copy over patch files cp ${WORKDIR}/* ./ # Correct permissions chown -R root:games ${Ddir} chmod 640 ${Ddir}/* chmod 750 ${Ddir}/uplink games_make_wrapper uplink ./uplink "${dir}" "${dir}" make_desktop_entry uplink "Uplink" "" "Game" } pkg_postinst () { games_pkg_postinst einfo "The first time you start uplink, it will patch itself and then exit. Restart the game to play." }