]> git.pld-linux.org Git - packages/wesnoth.git/blame - wesnoth.spec
- adapterized
[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# Conditional build
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
d78dbe99
ZU
14Version: 1.4.5
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
d78dbe99 20# Source0-md5: 09b7b76d4a4eedf502f38df9d551d827
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
d78dbe99 53%description -l hu.UTF-8
256da74a
ZU
54Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó
55stratégiai játék. Harc a falvak megszerzéséért, különböző egységek
56felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a
57különféle terepeken és a különböző támadási stílusok ellen. Az
58egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a
59következő pályára.
d78dbe99 60
7840b0fd 61%description -l pl.UTF-8
e579b435 62Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
63wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
64jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
65ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
66przenoszone z jednej scenerii do następnej kampanii.
dad9a32e 67
dad9a32e 68%package server
69Summary: Network server for Wesnoth
157e8e1f 70Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
dad9a32e 71Group: X11/Applications/Games/Strategy
392ee82f 72Requires(post,preun): /sbin/chkconfig
40b36f90
JK
73Requires(postun): /usr/sbin/groupdel
74Requires(postun): /usr/sbin/userdel
75Requires(pre): /usr/sbin/groupadd
76Requires(pre): /usr/sbin/useradd
759b9d08 77Requires: rc-scripts >= 0.4.0.17
dad9a32e 78
79%description server
80Server for playing networked games of Wesnoth.
81
d78dbe99
ZU
82%description server -l hu.UTF-8
83Szerver a Wesnoth hálózati játékához.
84
7840b0fd 85%description server -l pl.UTF-8
dad9a32e 86Serwer do prowadzenia sieciowych gier Wesnoth.
dad9a32e 87
dad9a32e 88%package tools
89Summary: Tools for Wesnoth
d78dbe99 90Summary(hu.UTF.8): Eszközök a Wesnoth-hoz
157e8e1f 91Summary(pl.UTF-8): Narzędzia dla Wesnoth
dad9a32e 92Group: X11/Applications/Games/Strategy
888b6155 93Requires: %{name} = %{epoch}:%{version}-%{release}
dad9a32e 94
95%description tools
96Map editor and translations tools.
97
d78dbe99
ZU
98%description tools -l hu.UTF-8
99Pályaszerkesztők és fordítási eszközök.
100
7840b0fd
JR
101%description tools -l pl.UTF-8
102Edytor map i narzędzia do tłumaczeń.
dad9a32e 103
104%prep
126856ae 105%setup -q
6734084f 106%patch0 -p1
1c7a318b 107%patch1 -p1
dad9a32e 108
109%build
629473ee 110%{__gettextize}
e579b435 111%{__aclocal} -I m4
629473ee 112%{__autoconf}
113%{__autoheader}
114%{__automake}
dad9a32e 115%configure \
116 %{?with_server:--enable-server} \
117 %{?with_tools:--enable-editor} \
c12ea96c 118 %{?with_tools:--enable-tools} \
e579b435 119 --with%{!?with_fribidi:out}-fribidi \
8a64199f 120 --docdir=%{_docdir}/%{name}-%{version} \
121 --with-icondir=%{_pixmapsdir} \
c12ea96c 122 --with-zipios
dad9a32e 123%{__make}
124
125%install
126rm -rf $RPM_BUILD_ROOT
d31a0af5 127install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,%{_docdir}/%{name}-%{version}}
dad9a32e 128
129%{__make} install \
130 DESTDIR=$RPM_BUILD_ROOT
131
8a64199f 132# install additional docs
133install changelog README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
134gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README}
135
dad9a32e 136install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
8a64199f 137install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
138install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
dad9a32e 139
759b9d08 140mv -f $RPM_BUILD_ROOT%{_datadir}/locale/{nb_NO,nb}
c12ea96c
MB
141
142# unsupported(?)
7d4eb852 143rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
c12ea96c 144rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
7d4eb852 145rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
c12ea96c
MB
146
147# the same as manuals from %{_mandir}/man?
148rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
149
5105ea28 150%find_lang %{name} --all-name
151
dad9a32e 152%clean
153rm -rf $RPM_BUILD_ROOT
154
40b36f90
JK
155%pre server
156%groupadd -P %{name}-server -g 178 wesnothd
157%useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
158
3fdd0ea2 159%post server
160/sbin/chkconfig --add wesnothd
c12ea96c 161%service wesnothd restart
3fdd0ea2 162
163%preun server
164if [ "$1" = "0" ]; then
c12ea96c 165 %service wesnothd stop
24e1b6fa 166 /sbin/chkconfig --del wesnothd
40b36f90
JK
167 %userremove wesnothd
168 %groupremove wesnothd
3fdd0ea2 169fi
170
5105ea28 171%files -f %{name}.lang
dad9a32e 172%defattr(644,root,root,755)
8a64199f 173%doc %{_docdir}/%{name}-%{version}
dad9a32e 174%attr(755,root,root) %{_bindir}/wesnoth
0c6dc98e 175%{_mandir}/man6/wesnoth.6*
d31a0af5 176%lang(cs) %{_mandir}/cs/man6/wesnoth.6*
e579b435 177%lang(da) %{_mandir}/da/man6/wesnoth.6*
178%lang(de) %{_mandir}/de/man6/wesnoth.6*
179%lang(es) %{_mandir}/es/man6/wesnoth.6*
5105ea28 180%lang(fr) %{_mandir}/fr/man6/wesnoth.6*
7d4eb852 181%lang(gl) %{_mandir}/gl/man6/wesnoth.6*
e579b435 182%lang(hu) %{_mandir}/hu/man6/wesnoth.6*
126856ae 183%lang(it) %{_mandir}/it/man6/wesnoth.6*
5105ea28 184%lang(ja) %{_mandir}/ja/man6/wesnoth.6*
7d4eb852 185%lang(lt) %{_mandir}/lt/man6/wesnoth.6*
a6412a7b 186%lang(nl) %{_mandir}/nl/man6/wesnoth.6*
e579b435 187%lang(pl) %{_mandir}/pl/man6/wesnoth.6*
5105ea28 188%lang(sk) %{_mandir}/sk/man6/wesnoth.6*
7d4eb852 189%lang(sr) %{_mandir}/sr/man6/wesnoth.6*
6734084f 190%lang(sv) %{_mandir}/sv/man6/wesnoth.6*
7d4eb852 191%lang(tr) %{_mandir}/tr/man6/wesnoth.6*
e579b435 192%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
0c6dc98e 193%{_datadir}/%{name}
dad9a32e 194%{_desktopdir}/%{name}.desktop
e579b435 195%{_pixmapsdir}/%{name}-icon.png
dad9a32e 196
197%if %{with server}
198%files server
199%defattr(644,root,root,755)
200%attr(755,root,root) %{_bindir}/wesnothd
3fdd0ea2 201%attr(754,root,root) /etc/rc.d/init.d/wesnothd
0c6dc98e 202%{_mandir}/man6/wesnothd.6*
e579b435 203%lang(cs) %{_mandir}/cs/man6/wesnothd.6*
204%lang(da) %{_mandir}/da/man6/wesnothd.6*
205%lang(de) %{_mandir}/de/man6/wesnothd.6*
206%lang(es) %{_mandir}/es/man6/wesnothd.6*
207%lang(fr) %{_mandir}/fr/man6/wesnothd.6*
7d4eb852 208%lang(gl) %{_mandir}/gl/man6/wesnothd.6*
e579b435 209%lang(hu) %{_mandir}/hu/man6/wesnothd.6*
210%lang(it) %{_mandir}/it/man6/wesnothd.6*
211%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
7d4eb852 212%lang(lt) %{_mandir}/lt/man6/wesnothd.6*
e579b435 213%lang(nl) %{_mandir}/nl/man6/wesnothd.6*
214%lang(pl) %{_mandir}/pl/man6/wesnothd.6*
215%lang(sk) %{_mandir}/sk/man6/wesnothd.6*
7d4eb852 216%lang(sr) %{_mandir}/sr/man6/wesnothd.6*
e579b435 217%lang(sv) %{_mandir}/sv/man6/wesnothd.6*
7d4eb852 218%lang(tr) %{_mandir}/tr/man6/wesnothd.6*
e579b435 219%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
40b36f90 220%attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
dad9a32e 221%endif
222
223%if %{with tools}
224%files tools
225%defattr(644,root,root,755)
027c8016 226%attr(755,root,root) %{_bindir}/cutter
227%attr(755,root,root) %{_bindir}/exploder
dad9a32e 228%attr(755,root,root) %{_bindir}/wesnoth_editor
e579b435 229%attr(755,root,root) %{_bindir}/wmlindent
230%attr(755,root,root) %{_bindir}/wmllint
231%attr(755,root,root) %{_bindir}/wmlscope
4ff8d7ea 232%{_mandir}/man6/wesnoth_editor.6*
5105ea28 233%lang(cs) %{_mandir}/cs/man6/wesnoth_editor.6*
e579b435 234%lang(da) %{_mandir}/da/man6/wesnoth_editor.6*
1acfd818 235%lang(de) %{_mandir}/de/man6/wesnoth_editor.6*
e579b435 236%lang(es) %{_mandir}/es/man6/wesnoth_editor.6*
5105ea28 237%lang(fr) %{_mandir}/fr/man6/wesnoth_editor.6*
7d4eb852 238%lang(gl) %{_mandir}/gl/man6/wesnoth_editor.6*
e579b435 239%lang(hu) %{_mandir}/hu/man6/wesnoth_editor.6*
5105ea28 240%lang(it) %{_mandir}/it/man6/wesnoth_editor.6*
241%lang(ja) %{_mandir}/ja/man6/wesnoth_editor.6*
7d4eb852 242%lang(lt) %{_mandir}/lt/man6/wesnoth_editor.6*
a6412a7b 243%lang(nl) %{_mandir}/nl/man6/wesnoth_editor.6*
e579b435 244%lang(pl) %{_mandir}/pl/man6/wesnoth_editor.6*
5105ea28 245%lang(sk) %{_mandir}/sk/man6/wesnoth_editor.6*
7d4eb852 246%lang(sr) %{_mandir}/sr/man6/wesnoth_editor.6*
6734084f 247%lang(sv) %{_mandir}/sv/man6/wesnoth_editor.6*
7d4eb852 248%lang(tr) %{_mandir}/tr/man6/wesnoth_editor.6*
e579b435 249%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth_editor.6*
8a64199f 250%{_desktopdir}/%{name}_editor.desktop
e579b435 251%{_pixmapsdir}/%{name}_editor-icon.png
dad9a32e 252%endif
This page took 0.764144 seconds and 4 git commands to generate.