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