here's an ebuild i created to keep everything in portage (and overlay). i only tested it on my box, and it's my very first ebuild.
Code: Select all
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=3
inherit eutils games
DESCRIPTION="Osmos is a puzzle game with physics-based gameplay, dreamlike
visuals and an ambient soundtrack."
HOMEPAGE="http://www.hemispheregames.com/osmos/"
RESTRICT="fetch"
LICENSE=""
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
DEPEND="x11-base/xorg-server
virtual/opengl
media-libs/openal"
RDEPEND="${DEPEND}"
MY_PN="Osmos"
SRC_URI="${MY_PN}_${PV}.tar.gz"
S=${WORKDIR}/${MY_PN}
pkg_nofetch() {
echo
elog "In order to play this game, you have to purchase it from ${HOMEPAGE}.
After receiving the download link place the downloaded file in ${DISTDIR}."
echo
}
src_install() {
local d=${GAMES_PREFIX_OPT}/${MY_PN}
insinto "${d}"
doins -r * || die
# create a symlink to the binary in the games bin directory
dosym ${d}/${MY_PN} "${GAMES_BINDIR}"/${PN}
# create an icon in the /usr/share/pixmaps directory
newicon Icons/32x32.png ${PN}.png
# create a desktop entry
make_desktop_entry ${PN} Osmos
pushd "${D}${d}" >/dev/null
chmod a+rx ${MY_PN}* || die
popd >/dev/null
prepgamesdirs
}