]> git.pld-linux.org Git - packages/wesnoth.git/blob - wesnoth.spec
- sr@latin is proper locale - included
[packages/wesnoth.git] / wesnoth.spec
1 # TODO
2 # - use desktop file included with project (consider which one are better)
3 # - unpackaged language files
4 # Conditional build
5 %bcond_without  server  # without server
6 %bcond_without  tools   # without tools
7 %bcond_without  fribidi # without Bidirectional language support
8 #
9 Summary:        Strategy game with a fantasy theme
10 Summary(hu.UTF-8):      Fantasy környezetben játszódó stratégiai játék
11 Summary(pl.UTF-8):      Strategiczna gra z motywem fantasy
12 Name:           wesnoth
13 Version:        1.6.4
14 Release:        1
15 Epoch:          1
16 License:        GPL v2+
17 Group:          X11/Applications/Games/Strategy
18 Source0:        http://dl.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2
19 # Source0-md5:  c8bc4c5b2be28e29563dfe3f89eafd51
20 Source1:        %{name}.desktop
21 Source2:        %{name}_editor.desktop
22 Source3:        %{name}d.init
23 Patch0:         %{name}-Makefile.patch
24 Patch1:         %{name}-locale_dir.patch
25 Patch2:         %{name}-werror.patch
26 URL:            http://www.wesnoth.org/
27 BuildRequires:  SDL-devel >= 1.2.7
28 BuildRequires:  SDL_image-devel >= 1.2
29 BuildRequires:  SDL_mixer-devel >= 1.2
30 BuildRequires:  SDL_net-devel >= 1.2
31 BuildRequires:  SDL_ttf-devel >= 2.0.8
32 BuildRequires:  autoconf >= 2.59
33 BuildRequires:  automake >= 1:1.9
34 BuildRequires:  boost-devel >= 1.33
35 %{?with_fribidi:BuildRequires:  fribidi-devel}
36 BuildRequires:  gettext-devel
37 BuildRequires:  libpng-devel
38 BuildRequires:  libstdc++-devel
39 BuildRequires:  libtool >= 2:1.5
40 BuildRequires:  libvorbis-devel
41 BuildRequires:  pkg-config
42 BuildRequires:  python-devel
43 BuildRequires:  rpm-pythonprov
44 BuildRequires:  rpmbuild(macros) >= 1.268
45 BuildRequires:  sed >= 4.0
46 BuildRequires:  zipios++-devel
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %description
50 Battle for Wesnoth is a fantasy strategy game. Battle for control of
51 villages, using variety of units which have advantages and
52 disadvantages in different types of terrains and against different
53 types of attacks. Units gain experience and advance levels, and are
54 carried over from one scenario to the next campaign.
55
56 %description -l hu.UTF-8
57 Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó
58 stratégiai játék. Harc a falvak megszerzéséért, különböző egységek
59 felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a
60 különféle terepeken és a különböző támadási stílusok ellen. Az
61 egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a
62 következő pályára.
63
64 %description -l pl.UTF-8
65 Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
66 wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
67 jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
68 ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
69 przenoszone z jednej scenerii do następnej kampanii.
70
71 %package server
72 Summary:        Network server for Wesnoth
73 Summary(hu.UTF-8):      Hálózati szerver Wesnoth-hoz
74 Summary(pl.UTF-8):      Sieciowy serwer dla Wesnoth
75 Group:          X11/Applications/Games/Strategy
76 Requires(post,preun):   /sbin/chkconfig
77 Requires(postun):       /usr/sbin/groupdel
78 Requires(postun):       /usr/sbin/userdel
79 Requires(pre):  /usr/sbin/groupadd
80 Requires(pre):  /usr/sbin/useradd
81 Requires:       rc-scripts >= 0.4.0.17
82
83 %description server
84 Server for playing networked games of Wesnoth.
85
86 %description server -l hu.UTF-8
87 Szerver a Wesnoth hálózati játékához.
88
89 %description server -l pl.UTF-8
90 Serwer do prowadzenia sieciowych gier Wesnoth.
91
92 %package tools
93 Summary:        Tools for Wesnoth
94 Summary(hu.UTF.8):      Eszközök a Wesnoth-hoz
95 Summary(pl.UTF-8):      Narzędzia dla Wesnoth
96 Group:          X11/Applications/Games/Strategy
97 Requires:       %{name} = %{epoch}:%{version}-%{release}
98
99 %description tools
100 Map editor and translations tools.
101
102 %description tools -l hu.UTF-8
103 Pályaszerkesztők és fordítási eszközök.
104
105 %description tools -l pl.UTF-8
106 Edytor map i narzędzia do tłumaczeń.
107
108 %prep
109 %setup -q
110 %patch0 -p1
111 %patch1 -p1
112 %patch2 -p1
113 %{__sed} -i 's,$PYTHON_PREFIX"/lib/,"%{_libdir}/,g' configure.ac
114
115 %build
116 %{__gettextize}
117 %{__aclocal} -I m4
118 %{__autoconf}
119 %{__autoheader}
120 %{__automake}
121 %configure \
122         PYTHON_VERSION=%{py_ver} \
123         %{?with_server:--enable-server} \
124         %{?with_server:--enable-campaign-server} \
125         --enable-python-install \
126         %{?with_tools:--enable-editor} \
127         %{?with_tools:--enable-tools} \
128         --with%{!?with_fribidi:out}-fribidi \
129         --docdir=%{_docdir}/%{name}-%{version} \
130         --with-icondir=%{_pixmapsdir} \
131         --with-zipios
132 %{__make}
133
134 %install
135 rm -rf $RPM_BUILD_ROOT
136 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,%{_docdir}/%{name}-%{version}}
137
138 %{__make} install \
139         DESTDIR=$RPM_BUILD_ROOT
140
141 # install additional docs
142 install changelog README  $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
143 gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README}
144
145 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
146 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
147 %if %{with server}
148 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
149 %endif
150
151 mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{nb_NO,nb}
152
153 # unsupported(?)
154 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
155 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/fur_IT
156 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
157 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/racv
158 rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
159
160 # the same as manuals from %{_mandir}/man?
161 rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
162
163 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
164 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
165 %py_postclean
166
167 %find_lang %{name} --all-name
168
169 %clean
170 rm -rf $RPM_BUILD_ROOT
171
172 %pre server
173 %groupadd -P %{name}-server -g 178  wesnothd
174 %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
175
176 %post server
177 /sbin/chkconfig --add wesnothd
178 %service wesnothd restart
179
180 %preun server
181 if [ "$1" = "0" ]; then
182         %service wesnothd stop
183         /sbin/chkconfig --del wesnothd
184         %userremove wesnothd
185         %groupremove wesnothd
186 fi
187
188 %files -f %{name}.lang
189 %defattr(644,root,root,755)
190 %doc %{_docdir}/%{name}-%{version}
191 %attr(755,root,root) %{_bindir}/wesnoth
192 %{_mandir}/man6/wesnoth.6*
193 %lang(cs) %{_mandir}/cs/man6/wesnoth.6*
194 #%%lang(da) %{_mandir}/da/man6/wesnoth.6*
195 %lang(de) %{_mandir}/de/man6/wesnoth.6*
196 %lang(es) %{_mandir}/es/man6/wesnoth.6*
197 %lang(fi) %{_mandir}/fi/man6/wesnoth.6*
198 %lang(fr) %{_mandir}/fr/man6/wesnoth.6*
199 %lang(gl) %{_mandir}/gl/man6/wesnoth.6*
200 %lang(hu) %{_mandir}/hu/man6/wesnoth.6*
201 %lang(it) %{_mandir}/it/man6/wesnoth.6*
202 #%%lang(ja) %{_mandir}/ja/man6/wesnoth.6*
203 %lang(lt) %{_mandir}/lt/man6/wesnoth.6*
204 #%%lang(nl) %{_mandir}/nl/man6/wesnoth.6*
205 %lang(pl) %{_mandir}/pl/man6/wesnoth.6*
206 #%%lang(ru) %{_mandir}/ru/man6/wesnoth.6*
207 %lang(sk) %{_mandir}/sk/man6/wesnoth.6*
208 %lang(sr) %{_mandir}/sr/man6/wesnoth.6*
209 %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnoth.6*
210 %lang(sv) %{_mandir}/sv/man6/wesnoth.6*
211 %lang(tr) %{_mandir}/tr/man6/wesnoth.6*
212 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
213 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
214 %{_datadir}/%{name}
215 %{_desktopdir}/%{name}.desktop
216 %{_pixmapsdir}/%{name}-icon.png
217
218 %if %{with server}
219 %files server
220 %defattr(644,root,root,755)
221 %attr(755,root,root) %{_bindir}/campaignd
222 %attr(755,root,root) %{_bindir}/wesnothd
223 %attr(754,root,root) /etc/rc.d/init.d/wesnothd
224 %{_mandir}/man6/wesnothd.6*
225 %lang(cs) %{_mandir}/cs/man6/wesnothd.6*
226 #%%lang(da) %{_mandir}/da/man6/wesnothd.6*
227 %lang(de) %{_mandir}/de/man6/wesnothd.6*
228 %lang(es) %{_mandir}/es/man6/wesnothd.6*
229 %lang(fi) %{_mandir}/fi/man6/wesnothd.6*
230 %lang(fr) %{_mandir}/fr/man6/wesnothd.6*
231 #%%lang(gl) %{_mandir}/gl/man6/wesnothd.6*
232 %lang(hu) %{_mandir}/hu/man6/wesnothd.6*
233 %lang(it) %{_mandir}/it/man6/wesnothd.6*
234 #%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
235 %lang(lt) %{_mandir}/lt/man6/wesnothd.6*
236 #%%lang(nl) %{_mandir}/nl/man6/wesnothd.6*
237 %lang(pl) %{_mandir}/pl/man6/wesnothd.6*
238 #%%lang(sk) %{_mandir}/sk/man6/wesnothd.6*
239 %lang(sr) %{_mandir}/sr/man6/wesnothd.6*
240 %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6*
241 %lang(sv) %{_mandir}/sv/man6/wesnothd.6*
242 %lang(tr) %{_mandir}/tr/man6/wesnothd.6*
243 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
244 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
245 %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
246 %endif
247
248 %if %{with tools}
249 %files tools
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_bindir}/cutter
252 %attr(755,root,root) %{_bindir}/exploder
253 %attr(755,root,root) %{_bindir}/wesnoth_addon_manager
254 #%%attr(755,root,root) %{_bindir}/wesnoth_editor
255 %attr(755,root,root) %{_bindir}/wmlindent
256 %attr(755,root,root) %{_bindir}/wmllint
257 %attr(755,root,root) %{_bindir}/wmlscope
258 #%%{_mandir}/man6/wesnoth_editor.6*
259 #%%lang(cs) %{_mandir}/cs/man6/wesnoth_editor.6*
260 #%%lang(da) %{_mandir}/da/man6/wesnoth_editor.6*
261 #%%lang(de) %{_mandir}/de/man6/wesnoth_editor.6*
262 #%%lang(es) %{_mandir}/es/man6/wesnoth_editor.6*
263 #%%lang(fr) %{_mandir}/fr/man6/wesnoth_editor.6*
264 #%%lang(gl) %{_mandir}/gl/man6/wesnoth_editor.6*
265 #%%lang(hu) %{_mandir}/hu/man6/wesnoth_editor.6*
266 #%%lang(it) %{_mandir}/it/man6/wesnoth_editor.6*
267 #%%lang(ja) %{_mandir}/ja/man6/wesnoth_editor.6*
268 #%%lang(lt) %{_mandir}/lt/man6/wesnoth_editor.6*
269 #%%lang(nl) %{_mandir}/nl/man6/wesnoth_editor.6*
270 #%%lang(pl) %{_mandir}/pl/man6/wesnoth_editor.6*
271 #%%lang(sk) %{_mandir}/sk/man6/wesnoth_editor.6*
272 #%%lang(sr) %{_mandir}/sr/man6/wesnoth_editor.6*
273 #%%lang(sv) %{_mandir}/sv/man6/wesnoth_editor.6*
274 #%%lang(tr) %{_mandir}/tr/man6/wesnoth_editor.6*
275 #%%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth_editor.6*
276 #%%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth_editor.6*
277 %{_desktopdir}/%{name}_editor.desktop
278 %{_pixmapsdir}/%{name}_editor-icon.png
279 %dir %{py_sitedir}/%{name}
280 %{py_sitedir}/%{name}/*.py[co]
281 %endif
This page took 0.293586 seconds and 4 git commands to generate.