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