1 |
commit: d1d13e3aa811314a41cc87d4ce5af54b24574847 |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 27 22:34:34 2019 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 27 23:44:07 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1d13e3a |
7 |
|
8 |
games-server/ut2004-ded: EAPI 7, drop games eclass, misc improvements |
9 |
|
10 |
This now blocks games-server/ut2004(-data) entirely rather than just |
11 |
the dedicated USE flag. This allows both to be installed to |
12 |
/opt/ut2004, vastly simplying the related ebuilds. |
13 |
|
14 |
This was admittedly done in a hurry but it seems to work. I have |
15 |
chosen nobody:nobody for the server user and group because I don't |
16 |
have time to formally request one. This may be sufficient anyway. |
17 |
|
18 |
Also fixes collision with games-fps/ut2004-bonuspack-ece. |
19 |
|
20 |
Closes: https://bugs.gentoo.org/594642 |
21 |
Package-Manager: Portage-2.3.78, Repoman-2.3.17 |
22 |
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> |
23 |
|
24 |
games-server/ut2004-ded/files/ut2004-ded.confd | 11 +-- |
25 |
games-server/ut2004-ded/files/ut2004-ded.initd | 26 ++---- |
26 |
.../ut2004-ded/ut2004-ded-3369.3-r1.ebuild | 93 ---------------------- |
27 |
.../ut2004-ded/ut2004-ded-3369.3-r2.ebuild | 88 ++++++++++++++++++++ |
28 |
4 files changed, 99 insertions(+), 119 deletions(-) |
29 |
|
30 |
diff --git a/games-server/ut2004-ded/files/ut2004-ded.confd b/games-server/ut2004-ded/files/ut2004-ded.confd |
31 |
index a485b12d221..e82238b93de 100644 |
32 |
--- a/games-server/ut2004-ded/files/ut2004-ded.confd |
33 |
+++ b/games-server/ut2004-ded/files/ut2004-ded.confd |
34 |
@@ -1,9 +1,6 @@ |
35 |
-# User and group the server should run as |
36 |
-ut2004_ded_user="@USER@" |
37 |
-ut2004_ded_group="@GROUP@" |
38 |
+# User and group the server should run as. |
39 |
+ut2004_ded_user="nobody" |
40 |
+ut2004_ded_group="nobody" |
41 |
|
42 |
-# Directory to use for HOME |
43 |
-ut2004_ded_home="@HOME@" |
44 |
- |
45 |
-# Any extra options you want to pass to the server |
46 |
+# Any extra options you want to pass to the server. |
47 |
ut2004_ded_opts="DM-Deck17" |
48 |
|
49 |
diff --git a/games-server/ut2004-ded/files/ut2004-ded.initd b/games-server/ut2004-ded/files/ut2004-ded.initd |
50 |
index fe323a9e00e..c4cf9810cd1 100644 |
51 |
--- a/games-server/ut2004-ded/files/ut2004-ded.initd |
52 |
+++ b/games-server/ut2004-ded/files/ut2004-ded.initd |
53 |
@@ -1,25 +1,13 @@ |
54 |
#!/sbin/openrc-run |
55 |
-# Copyright 1999-2009 Gentoo Foundation |
56 |
+# Copyright 1999-2019 Gentoo Authors |
57 |
# Distributed under the terms of the GNU General Public License v2 |
58 |
|
59 |
+pidfile="/var/run/${RC_SVCNAME}.pid" |
60 |
+command_background="true" |
61 |
+command_user="${ut2004_ded_user}:${ut2004_ded_group}" |
62 |
+command="ut2004-ded" |
63 |
+command_args="${ut2004_ded_opts}" |
64 |
+ |
65 |
depend() { |
66 |
need net |
67 |
} |
68 |
- |
69 |
-start() { |
70 |
- ebegin "Starting ut2004-ded" |
71 |
- start-stop-daemon --start --quiet --background --make-pidfile \ |
72 |
- --pidfile /var/run/ut2004-ded.pid \ |
73 |
- --chuid ${ut2004_ded_user}:${ut2004_ded_group} \ |
74 |
- --env HOME="${ut2004_ded_home}" \ |
75 |
- --exec "@DIR@/ut2004-ded" \ |
76 |
- -- ${ut2004_ded_opts} |
77 |
- eend $? |
78 |
-} |
79 |
- |
80 |
-stop() { |
81 |
- ebegin "Stopping ut2004-ded" |
82 |
- start-stop-daemon --stop \ |
83 |
- --pidfile /var/run/ut2004-ded.pid |
84 |
- eend $? |
85 |
-} |
86 |
|
87 |
diff --git a/games-server/ut2004-ded/ut2004-ded-3369.3-r1.ebuild b/games-server/ut2004-ded/ut2004-ded-3369.3-r1.ebuild |
88 |
deleted file mode 100644 |
89 |
index cfee57c4fc6..00000000000 |
90 |
--- a/games-server/ut2004-ded/ut2004-ded-3369.3-r1.ebuild |
91 |
+++ /dev/null |
92 |
@@ -1,93 +0,0 @@ |
93 |
-# Copyright 1999-2019 Gentoo Authors |
94 |
-# Distributed under the terms of the GNU General Public License v2 |
95 |
- |
96 |
-EAPI=5 |
97 |
-inherit games |
98 |
- |
99 |
-BONUSPACK_P="dedicatedserver3339-bonuspack.zip" |
100 |
-PATCH_P="ut2004-lnxpatch${PV%.*}-2.tar.bz2" |
101 |
-DESCRIPTION="Unreal Tournament 2004 Linux Dedicated Server" |
102 |
-HOMEPAGE="http://www.unrealtournament.com/" |
103 |
-SRC_URI=" |
104 |
- https://files.chaoticdreams.org/UT2004/DedicatedServer3339-BonusPack.zip -> ${BONUSPACK_P} |
105 |
- http://ut2004.ut-files.com/index.php?dir=Patches/Linux/&file=${PATCH_P} -> ${PATCH_P} |
106 |
- https://dev.gentoo.org/~chewi/distfiles/ut2004-v${PV/./-}-linux-dedicated.7z |
107 |
-" |
108 |
- |
109 |
-LICENSE="ut2003" |
110 |
-SLOT="0" |
111 |
-KEYWORDS="~amd64 ~x86" |
112 |
-IUSE="" |
113 |
-RESTRICT="bindist mirror strip" |
114 |
- |
115 |
-DEPEND="app-arch/unzip |
116 |
- app-arch/p7zip" |
117 |
-RDEPEND="sys-libs/glibc |
118 |
- !games-fps/ut2004[dedicated] |
119 |
- games-fps/ut2004-bonuspack-ece |
120 |
- games-fps/ut2004-bonuspack-mega" |
121 |
- |
122 |
-S=${WORKDIR} |
123 |
- |
124 |
-dir=${GAMES_PREFIX_OPT}/${PN} |
125 |
- |
126 |
-src_prepare() { |
127 |
- cp -rf UT2004-Patch/* . || die |
128 |
- rm -rf System/{ucc-bin*,ut2004-bin*,*.dll,*.exe} UT2004-Patch |
129 |
- if use amd64 ; then |
130 |
- mv -f ut2004-ucc-bin-09192008/ucc-bin-linux-amd64 System/ucc-bin || die |
131 |
- else |
132 |
- mv -f ut2004-ucc-bin-09192008/ucc-bin System/ || die |
133 |
- fi |
134 |
- rm -rf ut2004-ucc-bin-09192008 |
135 |
- # Owned by ut2004-bonuspack-ece |
136 |
- rm -f Animations/{MetalGuardAnim,ONSBPAnimations,NecrisAnim,MechaSkaarjAnims}.ukx |
137 |
- rm -f Help/BonusPackReadme.txt |
138 |
- rm -f Maps/{ONS-Adara,ONS-IslandHop,ONS-Tricky,ONS-Urban}.ut2 |
139 |
- rm -f Sounds/{CicadaSnds,DistantBooms,ONSBPSounds}.uax |
140 |
- rm -f StaticMeshes/{HourAdara,BenMesh02,BenTropicalSM01,ONS-BPJW1,PC_UrbanStatic}.usx |
141 |
- rm -f System/{ONS-IslandHop,ONS-Tricky,ONS-Adara,ONS-Urban,OnslaughtBP}.int |
142 |
- rm -f System/xaplayersl3.upl |
143 |
- rm -f Textures/{ONSBPTextures,BonusParticles,HourAdaraTexor,BenTex02,BenTropical01,PC_UrbanTex,AW-2k4XP,ONSBP_DestroyedVehicles,UT2004ECEPlayerSkins,CicadaTex,Construction_S}.utx |
144 |
- # Owned by ut2004-bonuspack-mega |
145 |
- rm -f System/{Manifest.ini,Manifest.int,Packages.md5} |
146 |
-} |
147 |
- |
148 |
-src_install() { |
149 |
- einfo "This will take a while... go get a pizza or something" |
150 |
- |
151 |
- games_make_wrapper ${PN} "./ucc-bin server" "${dir}"/System |
152 |
- |
153 |
- insinto "${dir}" |
154 |
- doins -r * |
155 |
- fperms +x "${dir}"/System/ucc-bin |
156 |
- |
157 |
- sed \ |
158 |
- -e "s:@USER@:${GAMES_USER_DED}:" \ |
159 |
- -e "s:@GROUP@:${GAMES_GROUP}:" \ |
160 |
- -e "s:@HOME@:${GAMES_PREFIX}:" \ |
161 |
- "${FILESDIR}"/${PN}.confd > "${T}"/${PN}.confd || die |
162 |
- newconfd "${T}"/${PN}.confd ${PN} |
163 |
- |
164 |
- sed \ |
165 |
- -e "s:@DIR@:${GAMES_BINDIR}:g" \ |
166 |
- "${FILESDIR}"/${PN}.initd > "${T}"/${PN}.initd || die |
167 |
- newinitd "${T}"/${PN}.initd ${PN} |
168 |
- |
169 |
- prepgamesdirs |
170 |
-} |
171 |
- |
172 |
-pkg_postinst() { |
173 |
- games_pkg_postinst |
174 |
- ewarn "You should take the time to edit the default server INI." |
175 |
- ewarn "Consult the INI Reference at http://www.unrealadmin.org/" |
176 |
- ewarn "for assistance in adjusting the following file:" |
177 |
- ewarn "${dir}/System/Default.ini" |
178 |
- ewarn |
179 |
- ewarn "To have your server authenticate properly to the" |
180 |
- ewarn "central server, you MUST visit the following site" |
181 |
- ewarn "and request a key. This is not required if you" |
182 |
- ewarn "want an unfindable private server. [DoUplink=False]" |
183 |
- ewarn |
184 |
- ewarn "http://unreal.epicgames.com/ut2004server/cdkey.php" |
185 |
-} |
186 |
|
187 |
diff --git a/games-server/ut2004-ded/ut2004-ded-3369.3-r2.ebuild b/games-server/ut2004-ded/ut2004-ded-3369.3-r2.ebuild |
188 |
new file mode 100644 |
189 |
index 00000000000..63f7dcb5240 |
190 |
--- /dev/null |
191 |
+++ b/games-server/ut2004-ded/ut2004-ded-3369.3-r2.ebuild |
192 |
@@ -0,0 +1,88 @@ |
193 |
+# Copyright 1999-2019 Gentoo Authors |
194 |
+# Distributed under the terms of the GNU General Public License v2 |
195 |
+ |
196 |
+EAPI=7 |
197 |
+ |
198 |
+inherit check-reqs eutils |
199 |
+ |
200 |
+BONUSPACK_P="dedicatedserver3339-bonuspack.zip" |
201 |
+PATCH_P="ut2004-lnxpatch${PV%.*}-2.tar.bz2" |
202 |
+DESCRIPTION="Unreal Tournament 2004 Linux Dedicated Server" |
203 |
+HOMEPAGE="https://liandri.beyondunreal.com/Unreal_Tournament_2004" |
204 |
+SRC_URI=" |
205 |
+ https://ut2004.ut-files.com/Entire_Server_Download/${BONUSPACK_P} |
206 |
+ https://ut2004.ut-files.com/Patches/Linux/${PATCH_P} |
207 |
+ https://dev.gentoo.org/~chewi/distfiles/ut2004-v${PV/./-}-linux-dedicated.7z |
208 |
+" |
209 |
+ |
210 |
+LICENSE="ut2003" |
211 |
+SLOT="0" |
212 |
+KEYWORDS="-* ~amd64 ~x86" |
213 |
+RESTRICT="bindist mirror strip" |
214 |
+ |
215 |
+BDEPEND=" |
216 |
+ app-arch/p7zip |
217 |
+ app-arch/unzip |
218 |
+" |
219 |
+ |
220 |
+RDEPEND=" |
221 |
+ !games-fps/ut2004 |
222 |
+ !games-fps/ut2004-data |
223 |
+ games-fps/ut2004-bonuspack-ece |
224 |
+ games-fps/ut2004-bonuspack-mega |
225 |
+ sys-libs/glibc |
226 |
+" |
227 |
+ |
228 |
+CHECKREQS_DISK_BUILD="2G" |
229 |
+QA_PREBUILT="*" |
230 |
+ |
231 |
+S="${WORKDIR}" |
232 |
+DIR="/opt/${PN%-ded}" |
233 |
+ |
234 |
+src_prepare() { |
235 |
+ default |
236 |
+ |
237 |
+ if use amd64; then |
238 |
+ mv ut2004-ucc-bin-09192008/ucc-bin{-linux-amd64,} || die |
239 |
+ fi |
240 |
+ |
241 |
+ cp -r UT2004-Patch/* ./ || die |
242 |
+ mv ut2004-ucc-bin-09192008/ucc-bin System/ || die |
243 |
+ rm -r System/{ut2004-bin*,*.dll,*.exe} UT2004-Patch/ ut2004-ucc-bin-09192008/ || die |
244 |
+ |
245 |
+ # In ut2004-bonuspack-ece. |
246 |
+ rm \ |
247 |
+ Animations/{MechaSkaarjAnims,MetalGuardAnim,NecrisAnim,ONSBPAnimations}.ukx \ |
248 |
+ Help/BonusPackReadme.txt \ |
249 |
+ Maps/ONS-{Adara,Aridoom,Ascendancy,IslandHop,Tricky,Urban}.ut2 \ |
250 |
+ Sounds/{CicadaSnds,DistantBooms,ONSBPSounds}.uax \ |
251 |
+ StaticMeshes/{BenMesh02,BenTropicalSM01,HourAdara,ONS-BPJW1,PC_UrbanStatic}.usx \ |
252 |
+ System/{ONS-{Adara,IslandHop,Tricky,Urban},OnslaughtBP}.int \ |
253 |
+ System/xaplayersl3.upl \ |
254 |
+ Textures/{AW-2k4XP,BenTex02,BenTropical01,BonusParticles,CicadaTex,Construction_S,HourAdaraTexor,ONSBP{_DestroyedVehicles,Textures},PC_UrbanTex,UT2004ECEPlayerSkins}.utx \ |
255 |
+ || die |
256 |
+ |
257 |
+ # In ut2004-bonuspack-mega. |
258 |
+ rm System/{Manifest.in[it],Packages.md5} || die |
259 |
+} |
260 |
+ |
261 |
+src_install() { |
262 |
+ insinto "${DIR}" |
263 |
+ doins -r * |
264 |
+ fperms +x "${DIR}"/System/ucc-bin |
265 |
+ |
266 |
+ make_wrapper ${PN} "./ucc-bin server" "${DIR}"/System |
267 |
+ newconfd "${FILESDIR}"/${PN}.confd ${PN} |
268 |
+ newinitd "${FILESDIR}"/${PN}.initd ${PN} |
269 |
+} |
270 |
+ |
271 |
+pkg_postinst() { |
272 |
+ elog "You should take the time to edit the default server INI. Consult the INI" |
273 |
+ elog "Reference at https://unrealadmin.org/server_ini_reference/ut2004 for" |
274 |
+ elog "assistance in adjusting ${DIR}/System/Default.ini." |
275 |
+ elog |
276 |
+ elog "To have your server authenticate properly to the central server, you" |
277 |
+ elog "MUST visit https://www.unrealadmin.org/server_cdkey and request a key." |
278 |
+ elog "This is not required if you want an unlisted private server with" |
279 |
+ elog "[DoUplink=False]." |
280 |
+} |