]> git.pld-linux.org Git - SPECS.git/blob - xsw.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / xsw.spec
1 Summary:        XShipWars - Multiplayer space gaming system
2 Summary(pl.UTF-8):      XShipWars - System gry kosmicznej dla wielu graczy
3 Name:           xsw
4 Version:        1.34.0
5 Release:        3
6 License:        GPL-like
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
13 Source4:        swserv.init
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)
24
25 %description
26 XShipWars is a highly customizable and massivly multiplayer space
27 gamming system designed for play entirly over the Internet.
28
29 %description -l pl.UTF-8
30 XShipWars jest wysoko konfigurowalnym systemem gry kosmicznej dla
31 wielu graczy do grania przez Internet.
32
33 %package client
34 Summary:        XShipWars client
35 Summary(pl.UTF-8):      Klient XShipWars
36 Group:          X11/Applications/Games
37 Requires:       xsw-data
38 Requires:       xsw-images
39 Requires:       xsw-sounds
40
41 %description client
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.
45
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.
49
50 %package server
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
63 Requires:       rc-scripts
64 Provides:       group(swserv)
65 Provides:       user(swserv)
66
67 %description server
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.
71
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.
75
76 %package monitor
77 Summary:        XShipWars monitor
78 Summary(pl.UTF-8):      Monitor XShipWars
79 Group:          X11/Applications/Games
80 Requires:       %{name}-client
81
82 %description monitor
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.
86
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.
90
91 %package unvedit
92 Summary:        XShipWars universe editor
93 Summary(pl.UTF-8):      Edytor wszechświata XShipWars
94 Group:          X11/Applications/Games
95 Requires:       %{name}-client
96
97 %description unvedit
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.
101
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
105 wszechświata do gry.
106
107 %prep
108 %setup -q
109 %patch0 -p1
110 %patch1 -p1
111
112 %build
113 # not autoconf-generated configure
114 ./configure.client Linux \
115         --prefix=%{_prefix} \
116         --CFLAGS="%{rpmcflags}"
117 %{__make} -f Makefile.client
118
119 ./configure.server Linux \
120         --prefix=%{_prefix} \
121         --CFLAGS="%{rpmcflags}"
122 %{__make} -f Makefile.server
123
124 ./configure.monitor Linux \
125         --prefix=%{_prefix} \
126         --CFLAGS="%{rpmcflags}"
127 %{__make} -f Makefile.monitor
128
129 ./configure.unvedit Linux \
130         --prefix=%{_prefix} \
131         --CFLAGS="%{rpmcflags}"
132 %{__make} -f Makefile.unvedit
133
134 %install
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}
138
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
143
144 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/xshipwars/universes # comes with data
145
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
150
151 %{__make} -f Makefile.monitor install \
152         GAMES_DIR=$RPM_BUILD_ROOT%{_bindir} \
153         XSW_DIR=$RPM_BUILD_ROOT%{_datadir}/xshipwars
154
155 %{__make} -f Makefile.unvedit install \
156         GAMES_BIN=$RPM_BUILD_ROOT%{_bindir} \
157         XSW_DATA_DIR=$RPM_BUILD_ROOT%{_datadir}/xshipwars
158
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
164
165 %clean
166 rm -rf $RPM_BUILD_ROOT
167
168 %pre server
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
172 fi
173 %groupadd -P %{name}-server -g 96 -r -f swserv
174
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
178 fi
179 %useradd -P %{name}-server -M -o -r -u 96 -g swserv -c "XShipWars server" -d /home/services/swserv -s /bin/sh swserv
180
181 %post server
182 if [ "$1" = "1" ]; then
183         /sbin/chkconfig --add swserv
184         echo "Run \"/etc/rc.d/init.d/swserv start\" to start swserv." >&2
185 else
186         if [ -f /var/lock/subsys/swserv ]; then
187                 /etc/rc.d/init.d/swserv restart >&2
188         fi
189 fi
190
191 %preun server
192 if [ "$1" = "0" ]; then
193         if [ -f /var/lock/sybsys/swserv ]; then
194                 /etc/rc.d/init.d/swserv stop >&2
195         fi
196         /sbin/chkconfig --del swserv
197         rm -f %{_datadir}/swserv/errors
198 fi
199
200 %postun server
201 if [ "$1" = "0" ]; then
202         %userremove swserv
203         %groupremove swserv
204 fi
205
206 %files client
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
216
217 %files server
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
231
232 %files monitor
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{_bindir}/monitor
235 %{_datadir}/xshipwars/images/monitor
236 %{_applnkdir}/Games/monitor.desktop
237
238 %files unvedit
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_bindir}/unvedit
241 %{_datadir}/xshipwars/images/unvedit
242 %{_applnkdir}/Games/unvedit.desktop
This page took 4.253987 seconds and 3 git commands to generate.