1 |
commit: 32303459a081de5445c064e4cbffac30fe288d24 |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 31 21:52:22 2020 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 31 21:54:38 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32303459 |
7 |
|
8 |
games-fps/ut2003: Fix SRC_URI, EAPI 7, fix server, align with UT2004 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/715540 |
11 |
Package-Manager: Portage-2.3.96, Repoman-2.3.20 |
12 |
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> |
13 |
|
14 |
games-fps/ut2003/Manifest | 2 +- |
15 |
games-fps/ut2003/files/ut2003-ded.confd | 6 ++ |
16 |
games-fps/ut2003/files/ut2003-ded.initd | 13 +++++ |
17 |
games-fps/ut2003/ut2003-2225-r4.ebuild | 99 --------------------------------- |
18 |
games-fps/ut2003/ut2003-2225-r5.ebuild | 98 ++++++++++++++++++++++++++++++++ |
19 |
5 files changed, 118 insertions(+), 100 deletions(-) |
20 |
|
21 |
diff --git a/games-fps/ut2003/Manifest b/games-fps/ut2003/Manifest |
22 |
index f580ec1670f..dab21529521 100644 |
23 |
--- a/games-fps/ut2003/Manifest |
24 |
+++ b/games-fps/ut2003/Manifest |
25 |
@@ -1 +1 @@ |
26 |
-DIST ut2003lnx_patch2225.tar.tar 10039316 BLAKE2B a15398eb2b66606f3e7b1382b01fda6b5d38982bc3fe7065184232eb18a8c85792147187951e810ecb6af738b5f5a15a2e56832d7e91fb21ab8956d699817f76 SHA512 3c44b6254b2b778bf2aca826c710f51db4ec0687c21f1c98e1070f3a9ad7e1a809e741a5b94e20a44c56c60a8b1e4a049788ff5f2a4d581c4eedf3dbbc0da86d |
27 |
+DIST ut2003lnx_patch2225.tar.bz2 10039316 BLAKE2B a15398eb2b66606f3e7b1382b01fda6b5d38982bc3fe7065184232eb18a8c85792147187951e810ecb6af738b5f5a15a2e56832d7e91fb21ab8956d699817f76 SHA512 3c44b6254b2b778bf2aca826c710f51db4ec0687c21f1c98e1070f3a9ad7e1a809e741a5b94e20a44c56c60a8b1e4a049788ff5f2a4d581c4eedf3dbbc0da86d |
28 |
|
29 |
diff --git a/games-fps/ut2003/files/ut2003-ded.confd b/games-fps/ut2003/files/ut2003-ded.confd |
30 |
new file mode 100644 |
31 |
index 00000000000..e6f81661a92 |
32 |
--- /dev/null |
33 |
+++ b/games-fps/ut2003/files/ut2003-ded.confd |
34 |
@@ -0,0 +1,6 @@ |
35 |
+# User and group the server should run as. |
36 |
+ut2003_ded_user="nobody" |
37 |
+ut2003_ded_group="nobody" |
38 |
+ |
39 |
+# Any extra options you want to pass to the server. |
40 |
+ut2003_ded_opts="DM-Antalus" |
41 |
|
42 |
diff --git a/games-fps/ut2003/files/ut2003-ded.initd b/games-fps/ut2003/files/ut2003-ded.initd |
43 |
new file mode 100644 |
44 |
index 00000000000..19c8f1ada61 |
45 |
--- /dev/null |
46 |
+++ b/games-fps/ut2003/files/ut2003-ded.initd |
47 |
@@ -0,0 +1,13 @@ |
48 |
+#!/sbin/openrc-run |
49 |
+# Copyright 1999-2020 Gentoo Authors |
50 |
+# Distributed under the terms of the GNU General Public License v2 |
51 |
+ |
52 |
+pidfile="/var/run/${RC_SVCNAME}.pid" |
53 |
+command_background="true" |
54 |
+command_user="${ut2003_ded_user}:${ut2003_ded_group}" |
55 |
+command="ut2003-ded" |
56 |
+command_args="${ut2003_ded_opts}" |
57 |
+ |
58 |
+depend() { |
59 |
+ need net |
60 |
+} |
61 |
|
62 |
diff --git a/games-fps/ut2003/ut2003-2225-r4.ebuild b/games-fps/ut2003/ut2003-2225-r4.ebuild |
63 |
deleted file mode 100644 |
64 |
index 5e82f5af64d..00000000000 |
65 |
--- a/games-fps/ut2003/ut2003-2225-r4.ebuild |
66 |
+++ /dev/null |
67 |
@@ -1,99 +0,0 @@ |
68 |
-# Copyright 1999-2019 Gentoo Authors |
69 |
-# Distributed under the terms of the GNU General Public License v2 |
70 |
- |
71 |
-EAPI=5 |
72 |
- |
73 |
-inherit eutils games |
74 |
- |
75 |
-DESCRIPTION="Sequel to the 1999 Game of the Year multi-player first-person shooter" |
76 |
-HOMEPAGE="http://www.unrealtournament2003.com/" |
77 |
-SRC_URI="ftp://ftp.infogrames.net/misc/ut2003/ut2003lnx_patch2225.tar.tar" |
78 |
- |
79 |
-LICENSE="ut2003" |
80 |
-SLOT="0" |
81 |
-KEYWORDS="~amd64 ~x86" |
82 |
-IUSE="dedicated" |
83 |
-RESTRICT="bindist strip" |
84 |
- |
85 |
-RDEPEND=" |
86 |
- games-fps/ut2003-data |
87 |
- dedicated? ( games-server/ut2003-ded ) |
88 |
- !dedicated? ( virtual/opengl[abi_x86_32(-)] ) |
89 |
-" |
90 |
-DEPEND="" |
91 |
- |
92 |
-S=${WORKDIR} |
93 |
- |
94 |
-dir="${GAMES_PREFIX_OPT}/${PN}" |
95 |
-Ddir="${D}/${dir}" |
96 |
- |
97 |
-src_unpack() { |
98 |
- unpack ut2003lnx_patch${PV}.tar.tar |
99 |
-} |
100 |
- |
101 |
-src_install() { |
102 |
- insinto "${dir}" |
103 |
- |
104 |
- games_make_wrapper ut2003 ./ut2003 "${dir}" "${dir}" |
105 |
- make_desktop_entry ut2003 "Unreal Tournament 2003" ut2003 |
106 |
- |
107 |
- # TODO: change this to use doexe/doins |
108 |
- # this brings our install up to the newest version |
109 |
- cp -r "${S}"/ut2003-lnx-2225/* "${Ddir}" || die |
110 |
- |
111 |
- prepgamesdirs |
112 |
-} |
113 |
- |
114 |
-pkg_postinst() { |
115 |
- games_pkg_postinst |
116 |
- |
117 |
- # here is where we check for the existence of a cdkey... |
118 |
- # if we don't find one, we ask the user for it |
119 |
- if [[ -f "${dir}"/System/cdkey ]] ; then |
120 |
- elog "A cdkey file is already present in ${dir}/System" |
121 |
- else |
122 |
- ewarn "You MUST run this before playing the game:" |
123 |
- ewarn "emerge --config =${CATEGORY}/${PF}" |
124 |
- ewarn "That way you can (re)enter your cdkey." |
125 |
- fi |
126 |
- elog |
127 |
- elog "To play the game run:" |
128 |
- elog " ut2003" |
129 |
- ewarn |
130 |
- ewarn "If you are not installing for the first time and you plan on running" |
131 |
- ewarn "a server, you will probably need to edit your" |
132 |
- ewarn "~/.ut2003/System/UT2003.ini file and add a line that says" |
133 |
- ewarn "AccessControlClass=crashfix.iaccesscontrolini to your" |
134 |
- ewarn "[Engine.GameInfo] section to close a security issue." |
135 |
-} |
136 |
- |
137 |
-pkg_postrm() { |
138 |
- ewarn "This package leaves a cdkey file in ${dir}/System that you need" |
139 |
- ewarn "to remove to completely get rid of this game's files." |
140 |
-} |
141 |
- |
142 |
-pkg_config() { |
143 |
- ewarn "Your CD key is NOT checked for validity here." |
144 |
- ewarn " Make sure you type it in correctly." |
145 |
- eerror "If you CTRL+C out of this, the game will not run!" |
146 |
- echo |
147 |
- einfo "CD key format is: XXXX-XXXX-XXXX-XXXX" |
148 |
- while true ; do |
149 |
- einfo "Please enter your CD key:" |
150 |
- read CDKEY1 |
151 |
- einfo "Please re-enter your CD key:" |
152 |
- read CDKEY2 |
153 |
- if [[ "${CDKEY1}" == "" ]] ; then |
154 |
- echo "You entered a blank CD key. Try again." |
155 |
- else |
156 |
- if [[ "${CDKEY1}" == "${CDKEY2}" ]] ; then |
157 |
- echo "${CDKEY1}" | tr a-z A-Z > ${dir}/System/cdkey |
158 |
- einfo "Thank you!" |
159 |
- chown games:games "${dir}"/System/cdkey |
160 |
- break |
161 |
- else |
162 |
- eerror "Your CD key entries do not match. Try again." |
163 |
- fi |
164 |
- fi |
165 |
- done |
166 |
-} |
167 |
|
168 |
diff --git a/games-fps/ut2003/ut2003-2225-r5.ebuild b/games-fps/ut2003/ut2003-2225-r5.ebuild |
169 |
new file mode 100644 |
170 |
index 00000000000..9880ab073d0 |
171 |
--- /dev/null |
172 |
+++ b/games-fps/ut2003/ut2003-2225-r5.ebuild |
173 |
@@ -0,0 +1,98 @@ |
174 |
+# Copyright 1999-2020 Gentoo Authors |
175 |
+# Distributed under the terms of the GNU General Public License v2 |
176 |
+ |
177 |
+EAPI=7 |
178 |
+ |
179 |
+inherit desktop eutils |
180 |
+ |
181 |
+DESCRIPTION="Sequel to the 1999 Game of the Year multi-player first-person shooter" |
182 |
+HOMEPAGE="https://en.wikipedia.org/wiki/Unreal_Tournament_2003" |
183 |
+SRC_URI="https://ftp.snt.utwente.nl/pub/games/UT2003/Patches/Linux/${PN}lnx_patch${PV}.tar.bz2" |
184 |
+ |
185 |
+LICENSE="ut2003" |
186 |
+SLOT="0" |
187 |
+KEYWORDS="-* ~amd64 ~x86" |
188 |
+IUSE="dedicated" |
189 |
+RESTRICT="bindist strip" |
190 |
+ |
191 |
+RDEPEND=" |
192 |
+ !games-server/ut2003-ded |
193 |
+ games-fps/ut2003-data |
194 |
+ media-libs/libsdl[abi_x86_32] |
195 |
+ sys-libs/glibc |
196 |
+ virtual/opengl[abi_x86_32] |
197 |
+" |
198 |
+ |
199 |
+BDEPEND="app-admin/chrpath" |
200 |
+ |
201 |
+S="${WORKDIR}/${PN}-lnx-${PV}" |
202 |
+DIR="/opt/${PN}" |
203 |
+ |
204 |
+QA_PREBUILT="*" |
205 |
+ |
206 |
+src_prepare() { |
207 |
+ default |
208 |
+ chrpath -d System/{{ucc,${PN}}-bin,*.so} || die |
209 |
+} |
210 |
+ |
211 |
+src_install() { |
212 |
+ insinto "${DIR}" |
213 |
+ doins -r . |
214 |
+ fperms +x "${DIR}"/System/{ucc,${PN}}-bin |
215 |
+ |
216 |
+ make_wrapper ${PN} ./${PN}-bin "${DIR}"/System "${DIR}"/System |
217 |
+ make_wrapper ${PN}-ded "./ucc-bin server" "${DIR}"/System "${DIR}"/System |
218 |
+ |
219 |
+ make_desktop_entry ${PN} "Unreal Tournament 2003" applications-games |
220 |
+ |
221 |
+ newconfd "${FILESDIR}"/${PN}-ded.confd ${PN}-ded |
222 |
+ newinitd "${FILESDIR}"/${PN}-ded.initd ${PN}-ded |
223 |
+} |
224 |
+ |
225 |
+pkg_postinst() { |
226 |
+ # Here is where we check for the existence of a cdkey. |
227 |
+ # If we don't find one, we ask the user for it. |
228 |
+ if [[ -f ${EROOT}${DIR}/System/cdkey ]] ; then |
229 |
+ einfo "A cdkey file is already present in ${EPREFIX}${DIR}/System" |
230 |
+ else |
231 |
+ ewarn "You MUST run this before playing the game:" |
232 |
+ ewarn "emerge --config =${CATEGORY}/${PF}" |
233 |
+ ewarn "That way you can (re)enter your cdkey." |
234 |
+ fi |
235 |
+ ewarn |
236 |
+ ewarn "If you are not installing for the first time and you plan on running" |
237 |
+ ewarn "a server, you will probably need to edit your" |
238 |
+ ewarn "~/.ut2003/System/UT2003.ini file and add a line that says" |
239 |
+ ewarn "AccessControlClass=crashfix.iaccesscontrolini to your" |
240 |
+ ewarn "[Engine.GameInfo] section to close a security issue." |
241 |
+} |
242 |
+ |
243 |
+pkg_postrm() { |
244 |
+ ewarn "This package leaves a cdkey file in ${EROOT}${DIR}/System that you need" |
245 |
+ ewarn "to remove to completely get rid of this game's files." |
246 |
+} |
247 |
+ |
248 |
+pkg_config() { |
249 |
+ ewarn "Your CD key is NOT checked for validity here so" |
250 |
+ ewarn "make sure you type it in correctly." |
251 |
+ ewarn "If you CTRL+C out of this, the game will not run!" |
252 |
+ echo |
253 |
+ einfo "CD key format is: XXXX-XXXX-XXXX-XXXX" |
254 |
+ while true ; do |
255 |
+ einfo "Please enter your CD key:" |
256 |
+ read CDKEY1 |
257 |
+ einfo "Please re-enter your CD key:" |
258 |
+ read CDKEY2 |
259 |
+ if [[ -z ${CDKEY1} || -z ${CDKEY2} ]] ; then |
260 |
+ echo "You entered a blank CD key. Try again." |
261 |
+ else |
262 |
+ if [[ ${CDKEY1} == ${CDKEY2} ]] ; then |
263 |
+ echo "${CDKEY1^^}" > "${EROOT}${DIR}"/System/cdkey || die |
264 |
+ einfo "Thank you!" |
265 |
+ break |
266 |
+ else |
267 |
+ eerror "Your CD key entries do not match. Try again." |
268 |
+ fi |
269 |
+ fi |
270 |
+ done |
271 |
+} |