]> git.pld-linux.org Git - packages/wesnoth.git/blob - wesnoth.spec
3bb0a37d5f17987be9f6cc56593e1f88ac751275
[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:        1
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 URL:            http://www.wesnoth.org/
25 BuildRequires:  SDL-devel >= 1.2.7
26 BuildRequires:  SDL_image-devel >= 1.2
27 BuildRequires:  SDL_mixer-devel >= 1.2
28 BuildRequires:  SDL_net-devel >= 1.2
29 BuildRequires:  SDL_ttf-devel >= 2.0.8
30 BuildRequires:  autoconf >= 2.59
31 BuildRequires:  automake >= 1:1.9
32 BuildRequires:  boost-devel >= 1.33
33 %{?with_fribidi:BuildRequires:  fribidi-devel}
34 BuildRequires:  gettext-devel
35 BuildRequires:  libpng-devel
36 BuildRequires:  libstdc++-devel
37 BuildRequires:  libtool >= 2:1.5
38 BuildRequires:  libvorbis-devel
39 BuildRequires:  pkg-config
40 BuildRequires:  python-devel
41 BuildRequires:  rpm-pythonprov
42 BuildRequires:  rpmbuild(macros) >= 1.268
43 BuildRequires:  sed >= 4.0
44 BuildRequires:  zipios++-devel
45 # sr@Latn vs. sr@latin
46 Conflicts:      glibc-misc < 6:2.7
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 # sr@Latn vs. sr@latin
83 Conflicts:      glibc-misc < 6:2.7
84
85 %description server
86 Server for playing networked games of Wesnoth.
87
88 %description server -l hu.UTF-8
89 Szerver a Wesnoth hálózati játékához.
90
91 %description server -l pl.UTF-8
92 Serwer do prowadzenia sieciowych gier Wesnoth.
93
94 %package tools
95 Summary:        Tools for Wesnoth
96 Summary(hu.UTF.8):      Eszközök a Wesnoth-hoz
97 Summary(pl.UTF-8):      Narzędzia dla Wesnoth
98 Group:          X11/Applications/Games/Strategy
99 Requires:       %{name} = %{epoch}:%{version}-%{release}
100
101 %description tools
102 Map editor and translations tools.
103
104 %description tools -l hu.UTF-8
105 Pályaszerkesztők és fordítási eszközök.
106
107 %description tools -l pl.UTF-8
108 Edytor map i narzędzia do tłumaczeń.
109
110 %prep
111 %setup -q
112 %patch0 -p1
113 %patch1 -p1
114 %patch2 -p1
115 %patch3 -p1
116 %{__sed} -i 's,$PYTHON_PREFIX"/lib/,"%{_libdir}/,g' configure.ac
117
118 %build
119 %{__gettextize}
120 %{__aclocal} -I m4
121 %{__autoconf}
122 %{__autoheader}
123 %{__automake}
124 %configure \
125         PYTHON_VERSION=%{py_ver} \
126         %{?with_server:--enable-server} \
127         %{?with_server:--enable-campaign-server} \
128         --enable-python-install \
129         %{?with_tools:--enable-editor} \
130         %{?with_tools:--enable-tools} \
131         --with%{!?with_fribidi:out}-fribidi \
132         --docdir=%{_docdir}/%{name}-%{version} \
133         --with-icondir=%{_pixmapsdir} \
134         --with-zipios
135 %{__make}
136
137 %install
138 rm -rf $RPM_BUILD_ROOT
139 install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,%{_docdir}/%{name}-%{version}}
140
141 %{__make} install \
142         DESTDIR=$RPM_BUILD_ROOT
143
144 # install additional docs
145 install changelog README  $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
146 gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README}
147
148 %if %{with server}
149 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
150 %endif
151
152 mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{nb_NO,nb}
153
154 # unsupported(?)
155 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
156 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/fur_IT
157 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
158 rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/racv
159 rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
160 rm -rf $RPM_BUILD_ROOT%{_mandir}/sr@latin
161 rm -rf $RPM_BUILD_ROOT%{_mandir}/et
162
163 # the same as manuals from %{_mandir}/man?
164 rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
165
166 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
167 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
168 %py_postclean
169
170 %find_lang %{name} --all-name
171
172 %clean
173 rm -rf $RPM_BUILD_ROOT
174
175 %pre server
176 %groupadd -P %{name}-server -g 178  wesnothd
177 %useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
178
179 %post server
180 /sbin/chkconfig --add wesnothd
181 %service wesnothd restart
182
183 %preun server
184 if [ "$1" = "0" ]; then
185         %service wesnothd stop
186         /sbin/chkconfig --del wesnothd
187         %userremove wesnothd
188         %groupremove wesnothd
189 fi
190
191 %files -f %{name}.lang
192 %defattr(644,root,root,755)
193 %doc %{_docdir}/%{name}-%{version}
194 %attr(755,root,root) %{_bindir}/wesnoth
195 %{_mandir}/man6/wesnoth.6*
196 %lang(cs) %{_mandir}/cs/man6/wesnoth.6*
197 #%%lang(da) %{_mandir}/da/man6/wesnoth.6*
198 %lang(de) %{_mandir}/de/man6/wesnoth.6*
199 %lang(es) %{_mandir}/es/man6/wesnoth.6*
200 #%%lang(et) %{_mandir}/et/man6/wesnoth.6*
201 %lang(fi) %{_mandir}/fi/man6/wesnoth.6*
202 %lang(fr) %{_mandir}/fr/man6/wesnoth.6*
203 %lang(gl) %{_mandir}/gl/man6/wesnoth.6*
204 %lang(hu) %{_mandir}/hu/man6/wesnoth.6*
205 %lang(it) %{_mandir}/it/man6/wesnoth.6*
206 #%%lang(ja) %{_mandir}/ja/man6/wesnoth.6*
207 %lang(lt) %{_mandir}/lt/man6/wesnoth.6*
208 #%%lang(nl) %{_mandir}/nl/man6/wesnoth.6*
209 %lang(pl) %{_mandir}/pl/man6/wesnoth.6*
210 #%%lang(ru) %{_mandir}/ru/man6/wesnoth.6*
211 %lang(sk) %{_mandir}/sk/man6/wesnoth.6*
212 %lang(sr) %{_mandir}/sr/man6/wesnoth.6*
213 #%%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnoth.6*
214 %lang(sv) %{_mandir}/sv/man6/wesnoth.6*
215 %lang(tr) %{_mandir}/tr/man6/wesnoth.6*
216 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
217 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
218 %{_datadir}/%{name}
219 %{_desktopdir}/*.desktop
220 %{_pixmapsdir}/*-icon.png
221
222 %if %{with server}
223 %files server
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_bindir}/campaignd
226 %attr(755,root,root) %{_bindir}/wesnothd
227 %attr(754,root,root) /etc/rc.d/init.d/wesnothd
228 %{_mandir}/man6/wesnothd.6*
229 %lang(cs) %{_mandir}/cs/man6/wesnothd.6*
230 #%%lang(da) %{_mandir}/da/man6/wesnothd.6*
231 %lang(de) %{_mandir}/de/man6/wesnothd.6*
232 %lang(es) %{_mandir}/es/man6/wesnothd.6*
233 # %lang(et) %{_mandir}/et/man6/wesnothd.6*
234 %lang(fi) %{_mandir}/fi/man6/wesnothd.6*
235 %lang(fr) %{_mandir}/fr/man6/wesnothd.6*
236 #%%lang(gl) %{_mandir}/gl/man6/wesnothd.6*
237 %lang(hu) %{_mandir}/hu/man6/wesnothd.6*
238 %lang(it) %{_mandir}/it/man6/wesnothd.6*
239 #%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
240 %lang(lt) %{_mandir}/lt/man6/wesnothd.6*
241 #%%lang(nl) %{_mandir}/nl/man6/wesnothd.6*
242 %lang(pl) %{_mandir}/pl/man6/wesnothd.6*
243 #%%lang(sk) %{_mandir}/sk/man6/wesnothd.6*
244 %lang(sr) %{_mandir}/sr/man6/wesnothd.6*
245 #%%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6*
246 %lang(sv) %{_mandir}/sv/man6/wesnothd.6*
247 %lang(tr) %{_mandir}/tr/man6/wesnothd.6*
248 %lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
249 %lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
250 %attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
251 %endif
252
253 %if %{with tools}
254 %files tools
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{_bindir}/cutter
257 %attr(755,root,root) %{_bindir}/exploder
258 %attr(755,root,root) %{_bindir}/wesnoth_addon_manager
259 %attr(755,root,root) %{_bindir}/wmlindent
260 %attr(755,root,root) %{_bindir}/wmllint
261 %attr(755,root,root) %{_bindir}/wmlscope
262 %dir %{py_sitedir}/%{name}
263 %{py_sitedir}/%{name}/*.py[co]
264 %endif
This page took 0.07141 seconds and 3 git commands to generate.