1 |
mr_bones_ 12/02/08 02:01:39 |
2 |
|
3 |
Added: sauerbraten.init sauerbraten.conf |
4 |
sauerbraten-2010.07.28-system-enet.patch |
5 |
Log: |
6 |
version bump (bug #366321) with contributions from at least Jon Severinsson, Petr Pisar, Tomáš Chvátal, and Paul Hartman (bug #111566) |
7 |
|
8 |
(Portage version: 2.1.10.44/cvs/Linux i686) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 games-fps/sauerbraten/files/sauerbraten.init |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-fps/sauerbraten/files/sauerbraten.init?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-fps/sauerbraten/files/sauerbraten.init?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: sauerbraten.init |
17 |
=================================================================== |
18 |
#!/sbin/runscript |
19 |
|
20 |
depend() { |
21 |
use net |
22 |
} |
23 |
|
24 |
start() { |
25 |
[ $(echo ${RUNMASTER} | tr '[:upper:]' '[:lower:]') = "yes" ] && start_master |
26 |
[ $(echo ${RUNSERVER} | tr '[:upper:]' '[:lower:]') = "yes" ] && start_server |
27 |
true |
28 |
} |
29 |
|
30 |
start_server() { |
31 |
ebegin "Starting Sauerbraten dedicated server" |
32 |
|
33 |
# Make sure necessary parameters are set |
34 |
SERVERCONFIG="${SERVERCONFIG:-%SYSCONFDIR%}" |
35 |
|
36 |
if [ ! -d ${SERVERCONFIG} ]; then |
37 |
einfo "No ${SERVERCONFIG} around. Creating new..." |
38 |
mkdir ${SERVERCONFIG} |
39 |
chown ${USER}:${GROUP} ${SERVERCONFIG} |
40 |
fi |
41 |
|
42 |
start-stop-daemon \ |
43 |
--quiet --start --chuid ${USER}:${GROUP} --chdir ${SERVERCONFIG} \ |
44 |
--make-pidfile --pidfile %GAMES_STATEDIR%/run/sauerbraten/server.pid \ |
45 |
--background --exec %LIBEXECDIR%/sauer_server -- ${SERVERARGS} |
46 |
eend $? |
47 |
} |
48 |
|
49 |
start_master() { |
50 |
ebegin "Starting Sauerbraten master server" |
51 |
|
52 |
# Make sure necessary parameters are set |
53 |
MASTERCONFIG="${MASTERCONFIG:-%SYSCONFDIR%}" |
54 |
[ -n "${MASTERIP}" ] && MASTERPORT="${MASTERPORT:-28787}" |
55 |
MASTERARGS="${MASTERCONFIG}/ ${MASTERPORT} ${MASTERIP}" |
56 |
|
57 |
if [ ! -d ${MASTERCONFIG} ]; then |
58 |
einfo "No ${MASTERCONFIG} around. Creating new..." |
59 |
mkdir ${MASTERCONFIG} |
60 |
chown ${USER}:${GROUP} ${MASTERCONFIG} |
61 |
fi |
62 |
|
63 |
start-stop-daemon \ |
64 |
--quiet --start --chuid ${USER}:${GROUP} \ |
65 |
--make-pidfile --pidfile %GAMES_STATEDIR%/run/sauerbraten/master.pid \ |
66 |
--background --exec %LIBEXECDIR%/sauer_master -- ${MASTERARGS} |
67 |
eend $? |
68 |
} |
69 |
|
70 |
stop() { |
71 |
[ $(echo ${RUNSERVER} | tr '[:upper:]' '[:lower:]') = "yes" ] && stop_server |
72 |
[ $(echo ${RUNMASTER} | tr '[:upper:]' '[:lower:]') = "yes" ] && stop_master |
73 |
true |
74 |
} |
75 |
|
76 |
stop_server() { |
77 |
ebegin "Stopping Sauerbraten dedicated server" |
78 |
start-stop-daemon --stop --retry 3 --pidfile %GAMES_STATEDIR%/run/sauerbraten/server.pid |
79 |
eend $? |
80 |
} |
81 |
|
82 |
stop_master() { |
83 |
ebegin "Stopping Sauerbraten master server" |
84 |
start-stop-daemon --stop --retry 3 --pidfile %GAMES_STATEDIR%/run/sauerbraten/master.pid |
85 |
eend $? |
86 |
} |
87 |
|
88 |
restart() { |
89 |
svc_stop |
90 |
svc_start |
91 |
} |
92 |
|
93 |
|
94 |
|
95 |
1.1 games-fps/sauerbraten/files/sauerbraten.conf |
96 |
|
97 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-fps/sauerbraten/files/sauerbraten.conf?rev=1.1&view=markup |
98 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-fps/sauerbraten/files/sauerbraten.conf?rev=1.1&content-type=text/plain |
99 |
|
100 |
Index: sauerbraten.conf |
101 |
=================================================================== |
102 |
# Config file for /etc/init.d/sauerbraten |
103 |
|
104 |
# Owner of Sauerbraten server processes (must be existing) |
105 |
USER="%GAMES_USER_DED%" |
106 |
GROUP="%GAMES_GROUP%" |
107 |
|
108 |
|
109 |
# Whether to run the dedicated server |
110 |
RUNSERVER="Yes" |
111 |
|
112 |
# Location of the dedicated server config directory |
113 |
SERVERCONFIG="%SYSCONFDIR%" |
114 |
|
115 |
# Additional command line arguments to the dedicated server |
116 |
SERVERARGS="" |
117 |
|
118 |
|
119 |
# Whether to run the master server |
120 |
RUNMASTER="No" |
121 |
|
122 |
# Location of the master server config directory |
123 |
MASTERCONFIG="%SYSCONFDIR%" |
124 |
|
125 |
# What port should the masterserver use |
126 |
MASTERPORT="28787" |
127 |
|
128 |
# What ip should the masterserver bind to |
129 |
MASTERIP="" |
130 |
|
131 |
|
132 |
|
133 |
1.1 games-fps/sauerbraten/files/sauerbraten-2010.07.28-system-enet.patch |
134 |
|
135 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-fps/sauerbraten/files/sauerbraten-2010.07.28-system-enet.patch?rev=1.1&view=markup |
136 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-fps/sauerbraten/files/sauerbraten-2010.07.28-system-enet.patch?rev=1.1&content-type=text/plain |
137 |
|
138 |
Index: sauerbraten-2010.07.28-system-enet.patch |
139 |
=================================================================== |
140 |
--- sauerbraten/src/Makefile |
141 |
+++ sauerbraten/src/Makefile |
142 |
@@ -4,7 +4,7 @@ override CXXFLAGS+= -Wall -fsigned-char |
143 |
PLATFORM= $(shell uname -s) |
144 |
PLATFORM_PREFIX= native |
145 |
|
146 |
-INCLUDES= -Ishared -Iengine -Ifpsgame -Ienet/include |
147 |
+INCLUDES= -Ishared -Iengine -Ifpsgame |
148 |
|
149 |
STRIP= |
150 |
ifeq (,$(findstring -g,$(CXXFLAGS))) |
151 |
@@ -20,8 +20,8 @@ WINDRES= windres |
152 |
CLIENT_INCLUDES= $(INCLUDES) -Iinclude |
153 |
CLIENT_LIBS= -mwindows -Llib -lSDL -lSDL_image -lSDL_mixer -lzdll -lopengl32 -lenet -lws2_32 -lwinmm |
154 |
else |
155 |
-CLIENT_INCLUDES= $(INCLUDES) -I/usr/X11R6/include `sdl-config --cflags` |
156 |
-CLIENT_LIBS= -Lenet/.libs -lenet -L/usr/X11R6/lib `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL |
157 |
+CLIENT_INCLUDES= $(INCLUDES) `sdl-config --cflags` |
158 |
+CLIENT_LIBS= -lenet `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL |
159 |
endif |
160 |
ifeq ($(PLATFORM),Linux) |
161 |
CLIENT_LIBS+= -lrt |
162 |
@@ -91,7 +91,7 @@ SERVER_INCLUDES= -DSTANDALONE $(INCLUDES |
163 |
SERVER_LIBS= -Llib -lzdll -lenet -lws2_32 -lwinmm |
164 |
else |
165 |
SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) |
166 |
-SERVER_LIBS= -Lenet/.libs -lenet -lz |
167 |
+SERVER_LIBS= -lenet -lz |
168 |
endif |
169 |
SERVER_OBJS= \ |
170 |
shared/crypto-standalone.o \ |
171 |
@@ -116,15 +116,6 @@ default: all |
172 |
|
173 |
all: client server |
174 |
|
175 |
-enet/Makefile: |
176 |
- cd enet; ./configure --enable-shared=no --enable-static=yes |
177 |
- |
178 |
-libenet: enet/Makefile |
179 |
- $(MAKE) -C enet/ all |
180 |
- |
181 |
-clean-enet: enet/Makefile |
182 |
- $(MAKE) -C enet/ clean |
183 |
- |
184 |
clean: |
185 |
-$(RM) $(CLIENT_PCH) $(CLIENT_OBJS) $(SERVER_OBJS) $(MASTER_OBJS) sauer_client sauer_server sauer_master |
186 |
|
187 |
@@ -159,13 +150,13 @@ master: $(MASTER_OBJS) |
188 |
|
189 |
install: all |
190 |
else |
191 |
-client: libenet $(CLIENT_OBJS) |
192 |
+client: $(CLIENT_OBJS) |
193 |
$(CXX) $(CXXFLAGS) -o sauer_client $(CLIENT_OBJS) $(CLIENT_LIBS) |
194 |
|
195 |
-server: libenet $(SERVER_OBJS) |
196 |
+server: $(SERVER_OBJS) |
197 |
$(CXX) $(CXXFLAGS) -o sauer_server $(SERVER_OBJS) $(SERVER_LIBS) |
198 |
|
199 |
-master: libenet $(MASTER_OBJS) |
200 |
+master: $(MASTER_OBJS) |
201 |
$(CXX) $(CXXFLAGS) -o sauer_master $(MASTER_OBJS) $(SERVER_LIBS) |
202 |
|
203 |
install: all |