]> git.draconx.ca Git - gentoo-draconx.git/blob - games-strategy/uplink/uplink-1.6.ebuild
xpdf: Version bump.
[gentoo-draconx.git] / games-strategy / uplink / uplink-1.6.ebuild
1 # This should be bumped to EAPI=4 as soon as the games eclass supports it, so
2 # that doins preserves symlinks.
3 EAPI=3
4
5 inherit games
6
7 MY_P="${PN}_${PV}-1"
8
9 DESCRIPTION="Crack into virtual computer systems"
10 HOMEPAGE="http://www.uplink.co.uk"
11 SRC_URI="amd64? ( ${MY_P}_amd64.tar.gz )
12         x86? ( ${MY_P}_i386.tar.gz )"
13 RESTRICT="fetch"
14
15 # Bundled libs :(
16 QA_PRESTRIPPED="${GAMES_PREFIX_OPT}/${PN}/lib.*"
17
18 LICENSE="uplink"
19 SLOT="0"
20 KEYWORDS="~amd64 ~x86"
21 IUSE=""
22
23 DEPEND=""
24 RDEPEND="${DEPEND}
25         media-libs/libsdl[opengl]
26         media-libs/sdl-mixer[mikmod]
27         media-libs/freetype:2"
28
29 pkg_nofetch() {
30         ewarn
31         ewarn "Place ${A} to ${DISTDIR}"
32         ewarn
33 }
34
35 src_unpack() {
36         local root
37
38         unpack "${A}"
39
40         if use amd64; then
41                 root=uplink-x64
42         elif use x86; then
43                 root=uplink-x86
44         else
45                 die "unsupported architecture"
46         fi
47
48         mv "$root" uplink || die "failed to move unpacked data"
49 }
50
51 S="${WORKDIR}/${PN}"
52
53 src_install() {
54         local dir="${GAMES_PREFIX_OPT}/${PN}"
55         local exe lib
56
57         insinto "${dir}"
58         doins *.dat
59
60         if use amd64; then
61                 lib=lib64
62                 exe=uplink.bin.x86_64
63         elif use x86; then
64                 lib=lib
65                 exe=uplink.bin.x86
66         else
67                 die "unsupported architecture"
68         fi
69
70         # The system SDL libs should work fine, but install the other bundled
71         # libraries which use older SONAMEs than the versions in Gentoo.
72         insinto "${dir}/${lib}"
73         doins "${lib}"/libjpeg.so.62*
74         doins "${lib}"/libtiff.so.3*
75         doins "${lib}"/libmikmod.so.2*
76
77         exeinto "${dir}"
78         doexe "${exe}"
79
80         doicon uplink.png
81         make_desktop_entry "${PN}" Uplink uplink
82         games_make_wrapper "${PN}" "${dir}/$exe"
83
84         dodoc *.txt
85
86         prepgamesdirs
87 }