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