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