]> git.pld-linux.org Git - packages/wesnoth.git/blob - wesnoth.spec
- updated to 1.10.7 (last 1.10.x)
[packages/wesnoth.git] / wesnoth.spec
1 # TODO
2 # - system lua?
3 # - unpackaged language files
4 #
5 # Conditional build
6 %bcond_without  server  # without server
7 %bcond_without  tools   # without tools
8 %bcond_without  fribidi # without Bidirectional language support
9
10 Summary:        Strategy game with a fantasy theme
11 Summary(hu.UTF-8):      Fantasy környezetben játszódó stratégiai játék
12 Summary(pl.UTF-8):      Gra strategiczna z motywem fantasy
13 Name:           wesnoth
14 Version:        1.10.7
15 Release:        1
16 Epoch:          1
17 License:        GPL v2+
18 Group:          X11/Applications/Games/Strategy
19 Source0:        http://downloads.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2
20 # Source0-md5:  3f460a494530d32aa5d5d0f19c95efbd
21 Source1:        %{name}d.init
22 Source2:        %{name}.tmpfiles
23 Patch0:         %{name}-desktop.patch
24 Patch1:         %{name}-locale_dir.patch
25 URL:            http://www.wesnoth.org/
26 BuildRequires:  SDL-devel >= 1.2.14-4
27 BuildRequires:  SDL_image-devel >= 1.2
28 BuildRequires:  SDL_mixer-devel >= 1.2
29 BuildRequires:  SDL_net-devel >= 1.2
30 BuildRequires:  SDL_ttf-devel >= 2.0.8
31 BuildRequires:  boost-devel >= 1.36
32 BuildRequires:  cmake >= 2.6.0
33 BuildRequires:  dbus-devel
34 BuildRequires:  fontconfig-devel >= 2.4.1
35 %{?with_fribidi:BuildRequires:  fribidi-devel}
36 BuildRequires:  gettext-tools
37 BuildRequires:  libpng-devel
38 BuildRequires:  libstdc++-devel
39 BuildRequires:  pango-devel >= 1:1.14.8
40 BuildRequires:  pkgconfig
41 BuildRequires:  rpm-pythonprov
42 BuildRequires:  rpmbuild(macros) >= 1.605
43 BuildRequires:  sed >= 4.0
44 BuildRequires:  xorg-lib-libICE-devel
45 BuildRequires:  xorg-lib-libSM-devel
46 BuildRequires:  xorg-lib-libX11-devel
47 BuildRequires:  xorg-lib-libXext-devel
48 BuildRequires:  zlib-devel
49 Requires:       %{name}-data = %{epoch}:%{version}
50 Requires:       SDL >= 1.2.14-4
51 Requires:       fontconfig >= 2.4.1
52 Requires:       pango >= 1:1.14.8
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %description
56 Battle for Wesnoth is a fantasy strategy game. Battle for control of
57 villages, using variety of units which have advantages and
58 disadvantages in different types of terrains and against different
59 types of attacks. Units gain experience and advance levels, and are
60 carried over from one scenario to the next campaign.
61
62 %description -l hu.UTF-8
63 Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó
64 stratégiai játék. Harc a falvak megszerzéséért, különböző egységek
65 felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a
66 különféle terepeken és a különböző támadási stílusok ellen. Az
67 egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a
68 következő pályára.
69
70 %description -l pl.UTF-8
71 Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
72 wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
73 jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
74 ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
75 przenoszone z jednej scenerii do następnej kampanii.
76
77 %package server
78 Summary:        Network server for Wesnoth
79 Summary(hu.UTF-8):      Hálózati szerver Wesnoth-hoz
80 Summary(pl.UTF-8):      Sieciowy serwer dla Wesnoth
81 Group:          X11/Applications/Games/Strategy
82 Requires(post,preun):   /sbin/chkconfig
83 Requires(postun):       /usr/sbin/groupdel
84 Requires(postun):       /usr/sbin/userdel
85 Requires(pre):  /usr/sbin/groupadd
86 Requires(pre):  /usr/sbin/useradd
87 Requires:       rc-scripts >= 0.4.0.17
88 Provides:       group(wesnothd)
89 Provides:       user(wesnothd)
90
91 %description server
92 Server for playing networked games of Wesnoth.
93
94 %description server -l hu.UTF-8
95 Szerver a Wesnoth hálózati játékához.
96
97 %description server -l pl.UTF-8
98 Serwer do prowadzenia sieciowych gier Wesnoth.
99
100 %package tools
101 Summary:        Tools for Wesnoth
102 Summary(hu.UTF.8):      Eszközök a Wesnoth-hoz
103 Summary(pl.UTF-8):      Narzędzia dla Wesnoth
104 Group:          X11/Applications/Games/Strategy
105 Requires:       %{name} = %{epoch}:%{version}-%{release}
106
107 %description tools
108 Map editor and translations tools.
109
110 %description tools -l hu.UTF-8
111 Pályaszerkesztők és fordítási eszközök.
112
113 %description tools -l pl.UTF-8
114 Edytor map i narzędzia do tłumaczeń.
115
116 %package data
117 Summary:        Strategy game with a fantasy theme - data files
118 Summary(pl.UTF-8):      Gra strategiczna z motywem fantasy - pliki danych
119 Group:          Applications/Games
120 %if "%{_rpmversion}" >= "4.6"
121 BuildArch:      noarch
122 %endif
123
124 %description data
125 This package contains the data files for Wesnoth.
126
127 %description data -l pl.UTF-8
128 Ten pakiet zawiera pliki danych dla gry Wesnoth.
129
130 %prep
131 %setup -q
132 %patch0 -p1
133 %patch1 -p1
134
135 # don't install locales in %{_datadir}/%{name}
136 %{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt
137
138 %{__sed} -i '1s,/usr/bin/env python$,%{__python},' \
139         data/tools/{about_cfg_to_wiki,expand-terrain-macros.py,extractbindings,imgcheck,journeylifter,scoutDefault.py,terrain2wiki.py,trackplacer,wesnoth_addon_manager,wmlflip,wmlindent,wmllint,wmllint_gui,wmlmove,wmlscope,wmlunits,wmlvalidator,wmlxgettext} \
140         data/tools/unit_tree/{TeamColorizer,overview.py} \
141         data/tools/wesnoth/{blacklist.py,wescamp.py,wmldata.py,wmlparser.py,wmlparser2.py}
142
143 %{__sed} -i '1s,/usr/bin/python$,%{__python},' data/tools/terrain2wiki.py
144
145 %build
146 install -d build
147 cd build
148 %cmake \
149         .. \
150         -DENABLE_STRICT_COMPILATION="off" \
151         -DBINDIR="%{_bindir}" \
152         -DMANDIR="%{_mandir}" \
153         -DLOCALEDIR="%{_localedir}" \
154         %{!?with_server:-DENABLE_SERVER="off"} \
155         %{?with_server:-DENABLE_CAMPAIGN_SERVER="on"} \
156         %{!?with_tools:-DENABLE_EDITOR="off"} \
157         %{?with_tools:-DENABLE_TOOLS="on"} \
158         %{!?with_fribidi:-DENABLE_FRIBIDI="off"}
159
160 %{__make}
161
162 %install
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d} \
165         $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{_docdir}/%{name}-%{version}}
166
167 %{__make} -C build install \
168         DESTDIR=$RPM_BUILD_ROOT
169
170 %if %{with server}
171 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
172 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
173 %endif
174
175 # unify
176 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{ca_ES@valencia,ca@valencia}
177 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
178 %{__mv} $RPM_BUILD_ROOT%{_localedir}/{fur_IT,fur}
179 %{__mv} $RPM_BUILD_ROOT%{_mandir}/{ca_ES@valencia,ca@valencia}
180
181 # unsupported(?)
182 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ang@latin
183 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/racv
184 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavian
185 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavianlatin
186
187 # the same as manuals from %{_mandir}/man?
188 %{__rm} -r $RPM_BUILD_ROOT%{_mandir}/en_GB
189
190 %find_lang %{name} --all-name
191
192 %clean
193 rm -rf $RPM_BUILD_ROOT
194
195 %pre server
196 %groupadd -P %{name}-server -g 178  wesnothd
197 %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
198
199 %post server
200 /sbin/chkconfig --add wesnothd
201 %service wesnothd restart
202
203 %preun server
204 if [ "$1" = "0" ]; then
205         %service wesnothd stop
206         /sbin/chkconfig --del wesnothd
207         %userremove wesnothd
208         %groupremove wesnothd
209 fi
210
211 %files -f %{name}.lang
212 %defattr(644,root,root,755)
213 %doc README changelog
214 %doc %{_docdir}/%{name}
215 %attr(755,root,root) %{_bindir}/wesnoth
216 %{_mandir}/man6/wesnoth.6*
217 %lang(cs) %{_mandir}/cs/man6/wesnoth.6*
218 %lang(de) %{_mandir}/de/man6/wesnoth.6*
219 %lang(et) %{_mandir}/et/man6/wesnoth.6*
220 %lang(es) %{_mandir}/es/man6/wesnoth.6*
221 %lang(fi) %{_mandir}/fi/man6/wesnoth.6*
222 %lang(fr) %{_mandir}/fr/man6/wesnoth.6*
223 %lang(gl) %{_mandir}/gl/man6/wesnoth.6*
224 %lang(hu) %{_mandir}/hu/man6/wesnoth.6*
225 %lang(id) %{_mandir}/id/man6/wesnoth.6*
226 %lang(it) %{_mandir}/it/man6/wesnoth.6*
227 %lang(lt) %{_mandir}/lt/man6/wesnoth.6*
228 %lang(pl) %{_mandir}/pl/man6/wesnoth.6*
229 %lang(pt) %{_mandir}/pt/man6/wesnoth.6*
230 %lang(ru) %{_mandir}/ru/man6/wesnoth.6*
231 %lang(sk) %{_mandir}/sk/man6/wesnoth.6*
232 %lang(sr) %{_mandir}/sr/man6/wesnoth.6*
233 %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnoth.6*
234 %lang(uk) %{_mandir}/uk/man6/wesnoth.6*
235 %lang(vi) %{_mandir}/vi/man6/wesnoth.6*
236 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
237 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
238 %{_desktopdir}/wesnoth.desktop
239 %{_desktopdir}/wesnoth_editor.desktop
240 %{_pixmapsdir}/wesnoth-icon.png
241 %{_pixmapsdir}/wesnoth_editor-icon.png
242
243 %if %{with server}
244 %files server
245 %defattr(644,root,root,755)
246 %attr(755,root,root) %{_bindir}/campaignd
247 %attr(755,root,root) %{_bindir}/wesnothd
248 %attr(754,root,root) /etc/rc.d/init.d/wesnothd
249 %{_mandir}/man6/wesnothd.6*
250 %lang(cs) %{_mandir}/cs/man6/wesnothd.6*
251 %lang(de) %{_mandir}/de/man6/wesnothd.6*
252 %lang(es) %{_mandir}/es/man6/wesnothd.6*
253 %lang(et) %{_mandir}/et/man6/wesnothd.6*
254 %lang(fi) %{_mandir}/fi/man6/wesnothd.6*
255 %lang(fr) %{_mandir}/fr/man6/wesnothd.6*
256 %lang(gl) %{_mandir}/gl/man6/wesnothd.6*
257 %lang(hu) %{_mandir}/hu/man6/wesnothd.6*
258 %lang(id) %{_mandir}/id/man6/wesnothd.6*
259 %lang(it) %{_mandir}/it/man6/wesnothd.6*
260 %lang(ja) %{_mandir}/ja/man6/wesnothd.6*
261 %lang(lt) %{_mandir}/lt/man6/wesnothd.6*
262 %lang(pl) %{_mandir}/pl/man6/wesnothd.6*
263 %lang(pt) %{_mandir}/pt/man6/wesnothd.6*
264 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
265 %lang(ru) %{_mandir}/ru/man6/wesnothd.6*
266 %lang(sk) %{_mandir}/sk/man6/wesnothd.6*
267 %lang(sr) %{_mandir}/sr/man6/wesnothd.6*
268 %lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6*
269 %lang(tr) %{_mandir}/tr/man6/wesnothd.6*
270 %lang(uk) %{_mandir}/uk/man6/wesnothd.6*
271 %lang(vi) %{_mandir}/vi/man6/wesnothd.6*
272 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
273 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
274 %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
275 %{systemdtmpfilesdir}/%{name}.conf
276 %endif
277
278 %if %{with tools}
279 %files tools
280 %defattr(644,root,root,755)
281 %attr(755,root,root) %{_bindir}/cutter
282 %attr(755,root,root) %{_bindir}/exploder
283 %attr(755,root,root) %{_bindir}/schema_generator
284 %attr(755,root,root) %{_bindir}/schema_validator
285 %endif
286
287 %files data
288 %defattr(644,root,root,755)
289 %{_datadir}/%{name}
This page took 0.309632 seconds and 3 git commands to generate.