]> git.pld-linux.org Git - packages/wesnoth.git/blame - wesnoth.spec
- added man pages: gl, lt, sr, tr
[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)
7d4eb852 4# - dont know what should I do with sr@latin man pages
dad9a32e 5#
6# Conditional build
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
157e8e1f 12Summary(pl.UTF-8): Strategiczna gra z motywem fantasy
dad9a32e 13Name: wesnoth
0e4a3052 14Version: 1.4.2
15Release: 1
d31a0af5 16Epoch: 1
482a922c 17License: GPL v2+
dad9a32e 18Group: X11/Applications/Games/Strategy
01b16924 19Source0: http://www.wesnoth.org/files/%{name}-%{version}.tar.bz2
0e4a3052 20# Source0-md5: b494b7600f4058796e8c91a46c4dbbf1
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
8418f9f0 31BuildRequires: SDL_ttf-devel >= 2.0
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
56da1b20 40BuildRequires: python-devel
56da1b20 41BuildRequires: rpm-pythonprov
759b9d08 42BuildRequires: rpmbuild(macros) >= 1.268
516c4760 43BuildRequires: zipios++-devel
dad9a32e 44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46%description
47Battle for Wesnoth is a fantasy strategy game. Battle for control of
48villages, using variety of units which have advantages and
49disadvantages in different types of terrains and against different
50types of attacks. Units gain experience and advance levels, and are
51carried over from one scenario to the next campaign.
52
7840b0fd 53%description -l pl.UTF-8
e579b435 54Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
55wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
56jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
57ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
58przenoszone z jednej scenerii do następnej kampanii.
dad9a32e 59
dad9a32e 60%package server
61Summary: Network server for Wesnoth
157e8e1f 62Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
dad9a32e 63Group: X11/Applications/Games/Strategy
392ee82f 64Requires(post,preun): /sbin/chkconfig
40b36f90
JK
65Requires(postun): /usr/sbin/groupdel
66Requires(postun): /usr/sbin/userdel
67Requires(pre): /usr/sbin/groupadd
68Requires(pre): /usr/sbin/useradd
759b9d08 69Requires: rc-scripts >= 0.4.0.17
dad9a32e 70
71%description server
72Server for playing networked games of Wesnoth.
73
7840b0fd 74%description server -l pl.UTF-8
dad9a32e 75Serwer do prowadzenia sieciowych gier Wesnoth.
dad9a32e 76
dad9a32e 77%package tools
78Summary: Tools for Wesnoth
157e8e1f 79Summary(pl.UTF-8): Narzędzia dla Wesnoth
dad9a32e 80Group: X11/Applications/Games/Strategy
888b6155 81Requires: %{name} = %{epoch}:%{version}-%{release}
dad9a32e 82
83%description tools
84Map editor and translations tools.
85
7840b0fd
JR
86%description tools -l pl.UTF-8
87Edytor map i narzędzia do tłumaczeń.
dad9a32e 88
89%prep
126856ae 90%setup -q
6734084f 91%patch0 -p1
1c7a318b 92%patch1 -p1
dad9a32e 93
94%build
629473ee 95%{__gettextize}
e579b435 96%{__aclocal} -I m4
629473ee 97%{__autoconf}
98%{__autoheader}
99%{__automake}
dad9a32e 100%configure \
101 %{?with_server:--enable-server} \
102 %{?with_tools:--enable-editor} \
c12ea96c 103 %{?with_tools:--enable-tools} \
e579b435 104 --with%{!?with_fribidi:out}-fribidi \
8a64199f 105 --docdir=%{_docdir}/%{name}-%{version} \
106 --with-icondir=%{_pixmapsdir} \
c12ea96c 107 --with-zipios
dad9a32e 108%{__make}
109
110%install
111rm -rf $RPM_BUILD_ROOT
d31a0af5 112install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,%{_docdir}/%{name}-%{version}}
dad9a32e 113
114%{__make} install \
115 DESTDIR=$RPM_BUILD_ROOT
116
8a64199f 117# install additional docs
118install changelog README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
119gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README}
120
dad9a32e 121install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
8a64199f 122install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
123install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
dad9a32e 124
c12ea96c 125mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{gl_ES,gl}
759b9d08 126mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{nb_NO,nb}
7d4eb852 127mv -f $RPM_BUILD_ROOT%{_mandir}/{gl_ES,gl}
c12ea96c
MB
128
129# unsupported(?)
7d4eb852 130rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
c12ea96c 131rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
7d4eb852 132rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
c12ea96c
MB
133
134# the same as manuals from %{_mandir}/man?
135rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
136
5105ea28 137%find_lang %{name} --all-name
138
dad9a32e 139%clean
140rm -rf $RPM_BUILD_ROOT
141
40b36f90
JK
142%pre server
143%groupadd -P %{name}-server -g 178 wesnothd
144%useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
145
3fdd0ea2 146%post server
147/sbin/chkconfig --add wesnothd
c12ea96c 148%service wesnothd restart
3fdd0ea2 149
150%preun server
151if [ "$1" = "0" ]; then
c12ea96c 152 %service wesnothd stop
24e1b6fa 153 /sbin/chkconfig --del wesnothd
40b36f90
JK
154 %userremove wesnothd
155 %groupremove wesnothd
3fdd0ea2 156fi
157
5105ea28 158%files -f %{name}.lang
dad9a32e 159%defattr(644,root,root,755)
8a64199f 160%doc %{_docdir}/%{name}-%{version}
dad9a32e 161%attr(755,root,root) %{_bindir}/wesnoth
0c6dc98e 162%{_mandir}/man6/wesnoth.6*
d31a0af5 163%lang(cs) %{_mandir}/cs/man6/wesnoth.6*
e579b435 164%lang(da) %{_mandir}/da/man6/wesnoth.6*
165%lang(de) %{_mandir}/de/man6/wesnoth.6*
166%lang(es) %{_mandir}/es/man6/wesnoth.6*
5105ea28 167%lang(fr) %{_mandir}/fr/man6/wesnoth.6*
7d4eb852 168%lang(gl) %{_mandir}/gl/man6/wesnoth.6*
e579b435 169%lang(hu) %{_mandir}/hu/man6/wesnoth.6*
126856ae 170%lang(it) %{_mandir}/it/man6/wesnoth.6*
5105ea28 171%lang(ja) %{_mandir}/ja/man6/wesnoth.6*
7d4eb852 172%lang(lt) %{_mandir}/lt/man6/wesnoth.6*
a6412a7b 173%lang(nl) %{_mandir}/nl/man6/wesnoth.6*
e579b435 174%lang(pl) %{_mandir}/pl/man6/wesnoth.6*
5105ea28 175%lang(sk) %{_mandir}/sk/man6/wesnoth.6*
7d4eb852 176%lang(sr) %{_mandir}/sr/man6/wesnoth.6*
6734084f 177%lang(sv) %{_mandir}/sv/man6/wesnoth.6*
7d4eb852 178%lang(tr) %{_mandir}/tr/man6/wesnoth.6*
e579b435 179%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
0c6dc98e 180%{_datadir}/%{name}
dad9a32e 181%{_desktopdir}/%{name}.desktop
e579b435 182%{_pixmapsdir}/%{name}-icon.png
dad9a32e 183
184%if %{with server}
185%files server
186%defattr(644,root,root,755)
187%attr(755,root,root) %{_bindir}/wesnothd
3fdd0ea2 188%attr(754,root,root) /etc/rc.d/init.d/wesnothd
0c6dc98e 189%{_mandir}/man6/wesnothd.6*
e579b435 190%lang(cs) %{_mandir}/cs/man6/wesnothd.6*
191%lang(da) %{_mandir}/da/man6/wesnothd.6*
192%lang(de) %{_mandir}/de/man6/wesnothd.6*
193%lang(es) %{_mandir}/es/man6/wesnothd.6*
194%lang(fr) %{_mandir}/fr/man6/wesnothd.6*
7d4eb852 195%lang(gl) %{_mandir}/gl/man6/wesnothd.6*
e579b435 196%lang(hu) %{_mandir}/hu/man6/wesnothd.6*
197%lang(it) %{_mandir}/it/man6/wesnothd.6*
198%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
7d4eb852 199%lang(lt) %{_mandir}/lt/man6/wesnothd.6*
e579b435 200%lang(nl) %{_mandir}/nl/man6/wesnothd.6*
201%lang(pl) %{_mandir}/pl/man6/wesnothd.6*
202%lang(sk) %{_mandir}/sk/man6/wesnothd.6*
7d4eb852 203%lang(sr) %{_mandir}/sr/man6/wesnothd.6*
e579b435 204%lang(sv) %{_mandir}/sv/man6/wesnothd.6*
7d4eb852 205%lang(tr) %{_mandir}/tr/man6/wesnothd.6*
e579b435 206%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
40b36f90 207%attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
dad9a32e 208%endif
209
210%if %{with tools}
211%files tools
212%defattr(644,root,root,755)
027c8016 213%attr(755,root,root) %{_bindir}/cutter
214%attr(755,root,root) %{_bindir}/exploder
dad9a32e 215%attr(755,root,root) %{_bindir}/wesnoth_editor
e579b435 216%attr(755,root,root) %{_bindir}/wmlindent
217%attr(755,root,root) %{_bindir}/wmllint
218%attr(755,root,root) %{_bindir}/wmlscope
4ff8d7ea 219%{_mandir}/man6/wesnoth_editor.6*
5105ea28 220%lang(cs) %{_mandir}/cs/man6/wesnoth_editor.6*
e579b435 221%lang(da) %{_mandir}/da/man6/wesnoth_editor.6*
1acfd818 222%lang(de) %{_mandir}/de/man6/wesnoth_editor.6*
e579b435 223%lang(es) %{_mandir}/es/man6/wesnoth_editor.6*
5105ea28 224%lang(fr) %{_mandir}/fr/man6/wesnoth_editor.6*
7d4eb852 225%lang(gl) %{_mandir}/gl/man6/wesnoth_editor.6*
e579b435 226%lang(hu) %{_mandir}/hu/man6/wesnoth_editor.6*
5105ea28 227%lang(it) %{_mandir}/it/man6/wesnoth_editor.6*
228%lang(ja) %{_mandir}/ja/man6/wesnoth_editor.6*
7d4eb852 229%lang(lt) %{_mandir}/lt/man6/wesnoth_editor.6*
a6412a7b 230%lang(nl) %{_mandir}/nl/man6/wesnoth_editor.6*
e579b435 231%lang(pl) %{_mandir}/pl/man6/wesnoth_editor.6*
5105ea28 232%lang(sk) %{_mandir}/sk/man6/wesnoth_editor.6*
7d4eb852 233%lang(sr) %{_mandir}/sr/man6/wesnoth_editor.6*
6734084f 234%lang(sv) %{_mandir}/sv/man6/wesnoth_editor.6*
7d4eb852 235%lang(tr) %{_mandir}/tr/man6/wesnoth_editor.6*
e579b435 236%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth_editor.6*
8a64199f 237%{_desktopdir}/%{name}_editor.desktop
e579b435 238%{_pixmapsdir}/%{name}_editor-icon.png
dad9a32e 239%endif
This page took 0.115122 seconds and 4 git commands to generate.