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