1 |
nyhm 09/10/01 14:05:04 |
2 |
|
3 |
Modified: games-mods.eclass |
4 |
Log: |
5 |
unify server.cfg stuff (even though only quake3 mods use it atm) |
6 |
|
7 |
Revision Changes Path |
8 |
1.25 eclass/games-mods.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.25&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?rev=1.25&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/games-mods.eclass?r1=1.24&r2=1.25 |
13 |
|
14 |
Index: games-mods.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v |
17 |
retrieving revision 1.24 |
18 |
retrieving revision 1.25 |
19 |
diff -u -r1.24 -r1.25 |
20 |
--- games-mods.eclass 1 Oct 2009 13:35:21 -0000 1.24 |
21 |
+++ games-mods.eclass 1 Oct 2009 14:05:04 -0000 1.25 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2009 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.24 2009/10/01 13:35:21 nyhm Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/games-mods.eclass,v 1.25 2009/10/01 14:05:04 nyhm Exp $ |
27 |
|
28 |
# Variables to specify in an ebuild which uses this eclass: |
29 |
# GAME - (doom3, quake4 or ut2004, etc), unless ${PN} starts with e.g. "doom3-" |
30 |
@@ -27,6 +27,7 @@ |
31 |
GAME_EXE="doom3" |
32 |
DED_EXE="doom3-ded" |
33 |
DED_OPTIONS="+set dedicated 1 +exec server.cfg" |
34 |
+ DED_CFG_DIR=".doom3" |
35 |
;; |
36 |
"enemy-territory") |
37 |
RDEPEND="games-fps/enemy-territory" |
38 |
@@ -36,6 +37,7 @@ |
39 |
GAME_EXE="et" |
40 |
DED_EXE="et-ded" |
41 |
DED_OPTIONS="+set dedicated 1 +exec server.cfg" |
42 |
+ DED_CFG_DIR=".etwolf" |
43 |
;; |
44 |
"quake3") |
45 |
RDEPEND="|| ( games-fps/quake3 games-fps/quake3-bin )" |
46 |
@@ -45,6 +47,7 @@ |
47 |
GAME_EXE="quake3" |
48 |
DED_EXE="quake3-ded" |
49 |
DED_OPTIONS="+set dedicated 1 +exec server.cfg" |
50 |
+ DED_CFG_DIR=".q3a" |
51 |
;; |
52 |
"quake4") |
53 |
RDEPEND="games-fps/quake4-bin" |
54 |
@@ -54,6 +57,7 @@ |
55 |
GAME_EXE="quake4" |
56 |
DED_EXE="quake4-ded" |
57 |
DED_OPTIONS="+set dedicated 1 +exec server.cfg" |
58 |
+ DED_CFG_DIR=".quake4" |
59 |
;; |
60 |
"ut2003") |
61 |
RDEPEND="games-fps/ut2003" |
62 |
@@ -63,6 +67,7 @@ |
63 |
GAME_EXE="ut2003" |
64 |
DED_EXE="ucc" |
65 |
DED_OPTIONS="" |
66 |
+ DED_CFG_DIR="" |
67 |
;; |
68 |
"ut2004") |
69 |
RDEPEND="games-fps/ut2004" |
70 |
@@ -72,6 +77,7 @@ |
71 |
GAME_EXE="ut2004" |
72 |
DED_EXE="ucc" |
73 |
DED_OPTIONS="" |
74 |
+ DED_CFG_DIR="" |
75 |
;; |
76 |
*) |
77 |
eerror "This game is either not supported or you must set the GAME" |
78 |
@@ -338,31 +344,12 @@ |
79 |
fi |
80 |
|
81 |
if use dedicated ; then |
82 |
- if [[ -e ${FILESDIR}/server.cfg ]] ; then |
83 |
+ if [[ -f ${FILESDIR}/server.cfg ]] ; then |
84 |
insinto "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR} |
85 |
doins "${FILESDIR}"/server.cfg || die "Copying server config" |
86 |
- case ${GAME} in |
87 |
- doom3) |
88 |
- dodir "${GAMES_PREFIX}"/.doom3/${MOD_DIR} |
89 |
- dosym "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}/server.cfg \ |
90 |
- "${GAMES_PREFIX}"/.doom3/${MOD_DIR} |
91 |
- ;; |
92 |
- enemy-territory) |
93 |
- dodir "${GAMES_PREFIX}"/.etwolf/${MOD_DIR} |
94 |
- dosym "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}/server.cfg \ |
95 |
- "${GAMES_PREFIX}"/.etwolf/${MOD_DIR} |
96 |
- ;; |
97 |
- quake3) |
98 |
- dodir "${GAMES_PREFIX}"/.q3a/${MOD_DIR} |
99 |
- dosym "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}/server.cfg \ |
100 |
- "${GAMES_PREFIX}"/.q3a/${MOD_DIR} |
101 |
- ;; |
102 |
- quake4) |
103 |
- dodir "${GAMES_PREFIX}"/.quake4/${MOD_DIR} |
104 |
- dosym "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}/server.cfg \ |
105 |
- "${GAMES_PREFIX}"/.quake4/${MOD_DIR} |
106 |
- ;; |
107 |
- esac |
108 |
+ dodir "${GAMES_PREFIX}"/${DED_CFG_DIR}/${MOD_DIR} |
109 |
+ dosym "${GAMES_SYSCONFDIR}"/${GAME}/${MOD_DIR}/server.cfg \ |
110 |
+ "${GAMES_PREFIX}"/${DED_CFG_DIR}/${MOD_DIR}/server.cfg |
111 |
fi |
112 |
games-mods_make_ded_exec |
113 |
newgamesbin "${T}"/${GAME_EXE}-${MOD_DIR}-ded.bin \ |