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