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