blob: 9aa25a8c179952422142d6c71328f0de9f1fd896 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop wrapper
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="/opt/${PN}/lib.*"
LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="${DEPEND}
media-libs/libsdl[opengl]
media-libs/sdl-mixer[mikmod]
media-libs/freetype:2"
pkg_nofetch() {
ewarn
ewarn "Place ${A} to ${PORTAGE_ACTUAL_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="/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
make_wrapper "${PN}" "${dir}/$exe"
dodoc changes.txt mods.txt readme.txt
}
|