1 Summary: XShipWars - Multiplayer space gaming system
2 Summary(pl.UTF-8): XShipWars - System gry kosmicznej dla wielu graczy
7 Group: X11/Applications/Games
8 Source0: ftp://gd.tuwien.ac.at/games/wolfpack/%{name}-%{version}.tar.bz2
9 # Source0-md5: 09a3109f8588af9940d71522c713007c
10 Source1: %{name}.desktop
11 Source2: monitor.desktop
12 Source3: unvedit.desktop
14 Source5: swserv.sysconfig
15 Patch0: %{name}-paths.patch
16 Patch1: %{name}-fix.patch
17 URL: http://wolfpack.twu.net/ShipWars/XShipWars/
18 BuildRequires: XFree86-devel
19 BuildRequires: esound-devel
20 BuildRequires: libjsw-devel
21 BuildRequires: rpmbuild(macros) >= 1.202
22 BuildRequires: yiff-devel
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 XShipWars is a highly customizable and massivly multiplayer space
27 gamming system designed for play entirly over the Internet.
29 %description -l pl.UTF-8
30 XShipWars jest wysoko konfigurowalnym systemem gry kosmicznej dla
31 wielu graczy do grania przez Internet.
34 Summary: XShipWars client
35 Summary(pl.UTF-8): Klient XShipWars
36 Group: X11/Applications/Games
42 XShipWars is a highly customizable and massivly multiplayer space
43 gamming system designed for play entirly over the Internet. This
44 package contains game client.
46 %description client -l pl.UTF-8
47 XShipWars jest wysoko konfigurowalnym systemem gry kosmicznej dla
48 wielu graczy do grania przez Internet. Ten pakiet zawiera klienta.
51 Summary: XShipWars server
52 Summary(pl.UTF-8): Serwer XShipWars
53 Group: X11/Applications/Games
54 Requires(post,preun): /sbin/chkconfig
55 Requires(postun): /usr/sbin/groupdel
56 Requires(postun): /usr/sbin/userdel
57 Requires(pre): /bin/id
58 Requires(pre): /usr/bin/getgid
59 Requires(pre): /usr/sbin/groupadd
60 Requires(pre): /usr/sbin/groupmod
61 Requires(pre): /usr/sbin/useradd
62 Requires(pre): /usr/sbin/usermod
64 Provides: group(swserv)
65 Provides: user(swserv)
68 XShipWars is a highly customizable and massivly multiplayer space
69 gamming system designed for play entirly over the Internet. This
70 package contains game server.
72 %description server -l pl.UTF-8
73 XShipWars jest wysoko konfigurowalnym systemem gry kosmicznej dla
74 wielu graczy do grania przez Internet. Ten pakiet zawiera serwer.
77 Summary: XShipWars monitor
78 Summary(pl.UTF-8): Monitor XShipWars
79 Group: X11/Applications/Games
80 Requires: %{name}-client
83 XShipWars is a highly customizable and massivly multiplayer space
84 gamming system designed for play entirly over the Internet. This
85 package contains game monitor.
87 %description monitor -l pl.UTF-8
88 XShipWars jest wysoko konfigurowalnym systemem gry kosmicznej dla
89 wielu graczy do grania przez Internet. Ten pakiet zawiera monitor gry.
92 Summary: XShipWars universe editor
93 Summary(pl.UTF-8): Edytor wszechświata XShipWars
94 Group: X11/Applications/Games
95 Requires: %{name}-client
98 XShipWars is a highly customizable and massivly multiplayer space
99 gamming system designed for play entirly over the Internet. This
100 package contains universe editor for the game.
102 %description unvedit -l pl.UTF-8
103 XShipWars jest wysoko konfigurowalnym systemem gry kosmicznej dla
104 wielu graczy do grania przez Internet. Ten pakiet zawiera edytor
113 # not autoconf-generated configure
114 ./configure.client Linux \
115 --prefix=%{_prefix} \
116 --CFLAGS="%{rpmcflags}"
117 %{__make} -f Makefile.client
119 ./configure.server Linux \
120 --prefix=%{_prefix} \
121 --CFLAGS="%{rpmcflags}"
122 %{__make} -f Makefile.server
124 ./configure.monitor Linux \
125 --prefix=%{_prefix} \
126 --CFLAGS="%{rpmcflags}"
127 %{__make} -f Makefile.monitor
129 ./configure.unvedit Linux \
130 --prefix=%{_prefix} \
131 --CFLAGS="%{rpmcflags}"
132 %{__make} -f Makefile.unvedit
135 rm -rf $RPM_BUILD_ROOT
136 install -d $RPM_BUILD_ROOT%{_datadir}/xshipwars/{images,sounds}
137 install -d $RPM_BUILD_ROOT{%{_applnkdir}/Games,/etc/sysconfig,/etc/rc.d/init.d}
139 %{__make} -f Makefile.client install \
140 GAMES_DIR=$RPM_BUILD_ROOT%{_bindir} \
141 XSW_DIR=$RPM_BUILD_ROOT%{_datadir}/xshipwars \
142 XSW_ETC_DIR=$RPM_BUILD_ROOT%{_sysconfdir}/xshipwars
144 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/xshipwars/universes # comes with data
146 %{__make} -f Makefile.server install \
147 SWSERV_BASE_DIR=$RPM_BUILD_ROOT/home/services/swserv \
148 SWSERV_BIN_DIR=$RPM_BUILD_ROOT%{_bindir} \
149 SWSERV_ETC_DIR=$RPM_BUILD_ROOT%{_sysconfdir}/swserv
151 %{__make} -f Makefile.monitor install \
152 GAMES_DIR=$RPM_BUILD_ROOT%{_bindir} \
153 XSW_DIR=$RPM_BUILD_ROOT%{_datadir}/xshipwars
155 %{__make} -f Makefile.unvedit install \
156 GAMES_BIN=$RPM_BUILD_ROOT%{_bindir} \
157 XSW_DATA_DIR=$RPM_BUILD_ROOT%{_datadir}/xshipwars
159 install %{SOURCE1} $RPM_BUILD_ROOT%{_applnkdir}/Games
160 install %{SOURCE2} $RPM_BUILD_ROOT%{_applnkdir}/Games
161 install %{SOURCE3} $RPM_BUILD_ROOT%{_applnkdir}/Games
162 install %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/swserv
163 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/swserv
166 rm -rf $RPM_BUILD_ROOT
169 # trigger would had been better place for this
170 if [ "$1" = 1 -a "`/usr/bin/getgid swserv`" = "91" ]; then
171 /usr/sbin/groupmod -g 96 swserv
173 %groupadd -P %{name}-server -g 96 -r -f swserv
175 # trigger would had been better place for this
176 if [ -n "`/bin/id -u swserv 2>/dev/null`" ] && [ "$1" = 1 -a "`/bin/id -u swserv`" = "91" ]; then
177 /usr/sbin/usermod -u 96 swserv
179 %useradd -P %{name}-server -M -o -r -u 96 -g swserv -c "XShipWars server" -d /home/services/swserv -s /bin/sh swserv
182 if [ "$1" = "1" ]; then
183 /sbin/chkconfig --add swserv
184 echo "Run \"/etc/rc.d/init.d/swserv start\" to start swserv." >&2
186 if [ -f /var/lock/subsys/swserv ]; then
187 /etc/rc.d/init.d/swserv restart >&2
192 if [ "$1" = "0" ]; then
193 if [ -f /var/lock/sybsys/swserv ]; then
194 /etc/rc.d/init.d/swserv stop >&2
196 /sbin/chkconfig --del swserv
197 rm -f %{_datadir}/swserv/errors
201 if [ "$1" = "0" ]; then
207 %defattr(644,root,root,755)
208 %doc CREDITS LICENSE README TODO
209 %dir %{_sysconfdir}/xshipwars
210 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/xshipwars/*
211 %attr(755,root,root) %{_bindir}/xsw
212 %dir %{_datadir}/xshipwars
213 %{_datadir}/xshipwars/images
214 %{_datadir}/xshipwars/sounds
215 %{_applnkdir}/Games/xsw.desktop
218 %defattr(644,root,root,755)
219 %doc CREDITS LICENSE README TODO
220 %attr(751,root,swserv) %dir /home/services/swserv
221 %attr(775,root,swserv) /home/services/swserv/db
222 %attr(775,root,swserv) /home/services/swserv/logs
223 %attr(775,root,swserv) /home/services/swserv/public_html
224 %attr(775,root,swserv) /home/services/swserv/tmp
225 %attr(774,root,swserv) /home/services/swserv/restart
226 %attr(754,root,swserv) %{_bindir}/swserv
227 %dir %{_sysconfdir}/swserv
228 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/swserv/*
229 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/swserv
230 %attr(754,root,root) /etc/rc.d/init.d/swserv
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{_bindir}/monitor
235 %{_datadir}/xshipwars/images/monitor
236 %{_applnkdir}/Games/monitor.desktop
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_bindir}/unvedit
241 %{_datadir}/xshipwars/images/unvedit
242 %{_applnkdir}/Games/unvedit.desktop