]> git.draconx.ca Git - gentoo-draconx.git/commitdiff
Add games-strategy/uplink.
authorNick Bowler <nbowler@draconx.ca>
Thu, 24 Nov 2011 21:01:09 +0000 (16:01 -0500)
committerNick Bowler <nbowler@draconx.ca>
Thu, 24 Nov 2011 21:13:56 +0000 (16:13 -0500)
games-strategy/uplink/Manifest [new file with mode: 0644]
games-strategy/uplink/uplink-1.6.ebuild [new file with mode: 0644]

diff --git a/games-strategy/uplink/Manifest b/games-strategy/uplink/Manifest
new file mode 100644 (file)
index 0000000..0c71dd6
--- /dev/null
@@ -0,0 +1,3 @@
+DIST uplink_1.6-1_amd64.tar.gz 22848679 RMD160 0746a2c739335fa3a56a6775ddd1a605da468c7e SHA1 0431a98b09af5ba9502b2c79b0a9e3b97e084f80 SHA256 6a3cdcbc86b2f1a254c3ae340847e4e0d56a6c7524f4814499c3463b575a09e0
+DIST uplink_1.6-1_i386.tar.gz 22897824 RMD160 b6ad33aa58b19a6bffb56d78c8c40cc6be648fa1 SHA1 3fb43adf2062f70b60aa79a8a731cc33e958b376 SHA256 6ea785fcb58cd943a0d36d64824c3df6652a52b6e133026ac9e32761f41be8e8
+EBUILD uplink-1.6.ebuild 1561 RMD160 bbfe9bfa09c1a94b1a555a398f0a185daf14a23b SHA1 ea4e97c057d9fe7d357e875f9c083fb8194f6c22 SHA256 77b3bdb463511fcaf45b8aab1149e9823383f3aca99b59a20ecb41ac72d3b02e
diff --git a/games-strategy/uplink/uplink-1.6.ebuild b/games-strategy/uplink/uplink-1.6.ebuild
new file mode 100644 (file)
index 0000000..c7a2596
--- /dev/null
@@ -0,0 +1,87 @@
+# This should be bumped to EAPI=4 as soon as the games eclass supports it, so
+# that doins preserves symlinks.
+EAPI=3
+
+inherit games
+
+MY_P="${PN}_${PV}-1"
+
+DESCRIPTION="Crack into virtual computer systems"
+HOMEPAGE="http://www.uplink.co.uk"
+SRC_URI="amd64? ( ${MY_P}_amd64.tar.gz )
+       x86? ( ${MY_P}_i386.tar.gz )"
+RESTRICT="fetch"
+
+# Bundled libs :(
+QA_PRESTRIPPED="${GAMES_PREFIX_OPT}/${PN}/lib.*"
+
+LICENSE="uplink"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}
+       media-libs/libsdl[opengl]
+       media-libs/sdl-mixer[mikmod]
+       media-libs/freetype:2"
+
+pkg_nofetch() {
+       ewarn
+       ewarn "Place ${A} to ${DISTDIR}"
+       ewarn
+}
+
+src_unpack() {
+       local root
+
+       unpack "${A}"
+
+       if use amd64; then
+               root=uplink-x64
+       elif use x86; then
+               root=uplink-x86
+       else
+               die "unsupported architecture"
+       fi
+
+       mv "$root" uplink || die "failed to move unpacked data"
+}
+
+S="${WORKDIR}/${PN}"
+
+src_install() {
+       local dir="${GAMES_PREFIX_OPT}/${PN}"
+       local exe lib
+
+       insinto "${dir}"
+       doins *.dat
+
+       if use amd64; then
+               lib=lib64
+               exe=uplink.bin.x86_64
+       elif use x86; then
+               lib=lib
+               exe=uplink.bin.x86
+       else
+               die "unsupported architecture"
+       fi
+
+       # The system SDL libs should work fine, but install the other bundled
+       # libraries which use older SONAMEs than the versions in Gentoo.
+       insinto "${dir}/${lib}"
+       doins "${lib}"/libjpeg.so.62*
+       doins "${lib}"/libtiff.so.3*
+       doins "${lib}"/libmikmod.so.2*
+
+       exeinto "${dir}"
+       doexe "${exe}"
+
+       doicon uplink.png
+       make_desktop_entry "${PN}" Uplink uplink
+       games_make_wrapper "${PN}" "${dir}/$exe"
+
+       dodoc *.txt
+
+       prepgamesdirs
+}