]> git.pld-linux.org Git - packages/wesnoth.git/blame - wesnoth.spec
- rebuild with boost 1.71
[packages/wesnoth.git] / wesnoth.spec
CommitLineData
4f6ef9bb 1# TODO
f8498762 2# - unpackaged language files
d94078df 3#
eb35425c 4# Conditional build
dad9a32e 5%bcond_without server # without server
b18d78c0 6%bcond_without tools # without tools
e579b435 7%bcond_without fribidi # without Bidirectional language support
eb718a6d 8
dad9a32e 9Summary: Strategy game with a fantasy theme
d78dbe99 10Summary(hu.UTF-8): Fantasy környezetben játszódó stratégiai játék
157e8e1f 11Summary(pl.UTF-8): Strategiczna gra z motywem fantasy
dad9a32e 12Name: wesnoth
af8dced3 13Version: 1.10.4
250363df 14Release: 16
d31a0af5 15Epoch: 1
482a922c 16License: GPL v2+
dad9a32e 17Group: X11/Applications/Games/Strategy
d7602b85 18Source0: http://downloads.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2
af8dced3 19# Source0-md5: 1a673f12e4521fc66e60ec584fa7c98f
3647514b 20Source1: %{name}d.init
0e4bc507 21Source2: %{name}.tmpfiles
d94078df 22Patch0: %{name}-desktop.patch
23Patch1: %{name}-locale_dir.patch
4d5620e7 24URL: http://www.wesnoth.org/
b20e0743 25BuildRequires: SDL-devel >= 1.2.14-4
dad9a32e 26BuildRequires: SDL_image-devel >= 1.2
27BuildRequires: SDL_mixer-devel >= 1.2
dad9a32e 28BuildRequires: SDL_net-devel >= 1.2
d22c6766 29BuildRequires: SDL_ttf-devel >= 2.0.8
d7602b85 30BuildRequires: asciidoc
e579b435 31BuildRequires: boost-devel >= 1.33
d7602b85 32BuildRequires: cmake >= 2.4
309b98f8 33BuildRequires: dbus-devel
e579b435 34%{?with_fribidi:BuildRequires: fribidi-devel}
b7f10e01 35BuildRequires: gettext-tools
759b9d08 36BuildRequires: libpng-devel
6ac5e90b 37BuildRequires: libstdc++-devel
d22c6766 38BuildRequires: libvorbis-devel
d7602b85 39BuildRequires: lua51-devel
350cecb6 40BuildRequires: pango-devel
c94bb8a1 41BuildRequires: pkgconfig
f1cb8481 42BuildRequires: rpm-pythonprov
d94078df 43BuildRequires: rpmbuild(macros) >= 1.600
d22c6766 44BuildRequires: sed >= 4.0
d7602b85 45BuildRequires: zlib-devel
eb718a6d 46Requires: %{name}-data = %{epoch}:%{version}
a5e29dd0 47Requires: SDL >= 1.2.14-4
717cee4c 48# sr@Latn vs. sr@latin
49Conflicts: glibc-misc < 6:2.7
dad9a32e 50BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52%description
53Battle for Wesnoth is a fantasy strategy game. Battle for control of
54villages, using variety of units which have advantages and
55disadvantages in different types of terrains and against different
56types of attacks. Units gain experience and advance levels, and are
57carried over from one scenario to the next campaign.
58
d78dbe99 59%description -l hu.UTF-8
a60f6f21 60Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó
61stratégiai játék. Harc a falvak megszerzéséért, különböző egységek
62felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a
63különféle terepeken és a különböző támadási stílusok ellen. Az
64egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a
65következő pályára.
d78dbe99 66
7840b0fd 67%description -l pl.UTF-8
a60f6f21 68Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
69wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
70jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
71ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
72przenoszone z jednej scenerii do następnej kampanii.
dad9a32e 73
dad9a32e 74%package server
75Summary: Network server for Wesnoth
717cee4c 76Summary(hu.UTF-8): Hálózati szerver Wesnoth-hoz
157e8e1f 77Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
dad9a32e 78Group: X11/Applications/Games/Strategy
392ee82f 79Requires(post,preun): /sbin/chkconfig
40b36f90
JK
80Requires(postun): /usr/sbin/groupdel
81Requires(postun): /usr/sbin/userdel
82Requires(pre): /usr/sbin/groupadd
83Requires(pre): /usr/sbin/useradd
759b9d08 84Requires: rc-scripts >= 0.4.0.17
745d3686
ER
85Provides: group(wesnothd)
86Provides: user(wesnothd)
717cee4c 87# sr@Latn vs. sr@latin
88Conflicts: glibc-misc < 6:2.7
dad9a32e 89
90%description server
91Server for playing networked games of Wesnoth.
92
d78dbe99
ZU
93%description server -l hu.UTF-8
94Szerver a Wesnoth hálózati játékához.
95
7840b0fd 96%description server -l pl.UTF-8
dad9a32e 97Serwer do prowadzenia sieciowych gier Wesnoth.
dad9a32e 98
dad9a32e 99%package tools
100Summary: Tools for Wesnoth
d94078df 101Summary(hu.UTF.8): Eszközök a Wesnoth-hoz
157e8e1f 102Summary(pl.UTF-8): Narzędzia dla Wesnoth
dad9a32e 103Group: X11/Applications/Games/Strategy
888b6155 104Requires: %{name} = %{epoch}:%{version}-%{release}
dad9a32e 105
106%description tools
107Map editor and translations tools.
108
d78dbe99
ZU
109%description tools -l hu.UTF-8
110Pályaszerkesztők és fordítási eszközök.
111
7840b0fd
JR
112%description tools -l pl.UTF-8
113Edytor map i narzędzia do tłumaczeń.
dad9a32e 114
eb718a6d
ER
115%package data
116Summary: Strategy game with a fantasy theme
117Group: Applications/Games
118%if "%{_rpmversion}" >= "5"
119BuildArch: noarch
120%endif
121
122%description data
123This package contains the data files for Wesnoth.
124
dad9a32e 125%prep
b5dcf87b 126%setup -q
6734084f 127%patch0 -p1
1c7a318b 128%patch1 -p1
d7602b85 129
130# don't install locales in %{_datadir}/%{name}
d94078df 131%{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt
dad9a32e 132
133%build
d7602b85 134install -d build
135cd build
d94078df 136%cmake \
137 .. \
d7602b85 138 -DENABLE_STRICT_COMPILATION="off" \
139 -DBINDIR="%{_bindir}" \
140 -DMANDIR="%{_mandir}" \
eb718a6d 141 -DLOCALEDIR="%{_localedir}" \
d7602b85 142 %{!?with_server:-DENABLE_SERVER="off"} \
143 %{?with_server:-DENABLE_CAMPAIGN_SERVER="on"} \
144 %{!?with_tools:-DENABLE_EDITOR="off"} \
145 %{?with_tools:-DENABLE_TOOLS="on"} \
d94078df 146 %{!?with_fribidi:-DENABLE_FRIBIDI="off"}
d7602b85 147
dad9a32e 148%{__make}
149
150%install
151rm -rf $RPM_BUILD_ROOT
0e4bc507 152install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d} \
eb718a6d 153 $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{_docdir}/%{name}-%{version}}
dad9a32e 154
d7602b85 155%{__make} -C build install \
dad9a32e 156 DESTDIR=$RPM_BUILD_ROOT
157
8a64199f 158# install additional docs
eb718a6d 159cp -p changelog README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
8a64199f 160gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README}
161
d22c6766 162%if %{with server}
eb718a6d
ER
163cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
164cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
d22c6766 165%endif
dad9a32e 166
eb718a6d
ER
167mv -f $RPM_BUILD_ROOT%{_localedir}/nb{_NO,}
168mv -f $RPM_BUILD_ROOT%{_localedir}/fur{_IT,}
c12ea96c 169
d94078df 170# unsupported(?)
eb718a6d
ER
171%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ang@latin
172%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ca_ES@valencia
173%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/la
174%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/racv
175%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/en@shaw
176%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/sr@ijekavian
177%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/sr@ijekavianlatin
d94078df 178%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
62daf2b6 179%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavian
180%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavianlatin
c12ea96c
MB
181
182# the same as manuals from %{_mandir}/man?
729e3de3 183%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/en_GB
c12ea96c 184
5105ea28 185%find_lang %{name} --all-name
186
dad9a32e 187%clean
188rm -rf $RPM_BUILD_ROOT
189
40b36f90
JK
190%pre server
191%groupadd -P %{name}-server -g 178 wesnothd
192%useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
193
3fdd0ea2 194%post server
195/sbin/chkconfig --add wesnothd
c12ea96c 196%service wesnothd restart
3fdd0ea2 197
198%preun server
199if [ "$1" = "0" ]; then
c12ea96c 200 %service wesnothd stop
24e1b6fa 201 /sbin/chkconfig --del wesnothd
40b36f90
JK
202 %userremove wesnothd
203 %groupremove wesnothd
3fdd0ea2 204fi
205
5105ea28 206%files -f %{name}.lang
dad9a32e 207%defattr(644,root,root,755)
8a64199f 208%doc %{_docdir}/%{name}-%{version}
dad9a32e 209%attr(755,root,root) %{_bindir}/wesnoth
0c6dc98e 210%{_mandir}/man6/wesnoth.6*
d31a0af5 211%lang(cs) %{_mandir}/cs/man6/wesnoth.6*
e579b435 212%lang(de) %{_mandir}/de/man6/wesnoth.6*
d3cada04 213%lang(et) %{_mandir}/et/man6/wesnoth.6*
83629e31 214%lang(es) %{_mandir}/es/man6/wesnoth.6*
215%lang(fi) %{_mandir}/fi/man6/wesnoth.6*
bdc2942c 216%lang(fr) %{_mandir}/fr/man6/wesnoth.6*
7d4eb852 217%lang(gl) %{_mandir}/gl/man6/wesnoth.6*
e579b435 218%lang(hu) %{_mandir}/hu/man6/wesnoth.6*
944acd9d 219%lang(id) %{_mandir}/id/man6/wesnoth.6*
83629e31 220%lang(it) %{_mandir}/it/man6/wesnoth.6*
7d4eb852 221%lang(lt) %{_mandir}/lt/man6/wesnoth.6*
e579b435 222%lang(pl) %{_mandir}/pl/man6/wesnoth.6*
83629e31 223%lang(ru) %{_mandir}/ru/man6/wesnoth.6*
5105ea28 224%lang(sk) %{_mandir}/sk/man6/wesnoth.6*
83629e31 225%lang(sr) %{_mandir}/sr/man6/wesnoth.6*
226%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnoth.6*
227%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
228%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
3647514b 229%{_desktopdir}/*.desktop
230%{_pixmapsdir}/*-icon.png
dad9a32e 231
232%if %{with server}
233%files server
234%defattr(644,root,root,755)
d22c6766 235%attr(755,root,root) %{_bindir}/campaignd
dad9a32e 236%attr(755,root,root) %{_bindir}/wesnothd
3fdd0ea2 237%attr(754,root,root) /etc/rc.d/init.d/wesnothd
0c6dc98e 238%{_mandir}/man6/wesnothd.6*
e579b435 239%lang(cs) %{_mandir}/cs/man6/wesnothd.6*
e579b435 240%lang(de) %{_mandir}/de/man6/wesnothd.6*
241%lang(es) %{_mandir}/es/man6/wesnothd.6*
d3cada04 242%lang(et) %{_mandir}/et/man6/wesnothd.6*
d18a93b2 243%lang(fi) %{_mandir}/fi/man6/wesnothd.6*
bdc2942c 244%lang(fr) %{_mandir}/fr/man6/wesnothd.6*
d16f534c 245%lang(gl) %{_mandir}/gl/man6/wesnothd.6*
e579b435 246%lang(hu) %{_mandir}/hu/man6/wesnothd.6*
944acd9d 247%lang(id) %{_mandir}/id/man6/wesnothd.6*
e579b435 248%lang(it) %{_mandir}/it/man6/wesnothd.6*
d7602b85 249%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
d22c6766 250%lang(lt) %{_mandir}/lt/man6/wesnothd.6*
e579b435 251%lang(pl) %{_mandir}/pl/man6/wesnothd.6*
d7602b85 252%lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
83629e31 253%lang(ru) %{_mandir}/ru/man6/wesnothd.6*
d7602b85 254%lang(sk) %{_mandir}/sk/man6/wesnothd.6*
83629e31 255%lang(sr) %{_mandir}/sr/man6/wesnothd.6*
256%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6*
257%lang(tr) %{_mandir}/tr/man6/wesnothd.6*
258%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
259%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
40b36f90 260%attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
eb718a6d 261%{systemdtmpfilesdir}/%{name}.conf
dad9a32e 262%endif
263
264%if %{with tools}
265%files tools
266%defattr(644,root,root,755)
027c8016 267%attr(755,root,root) %{_bindir}/cutter
268%attr(755,root,root) %{_bindir}/exploder
dad9a32e 269%endif
eb718a6d
ER
270
271%files data
272%defattr(644,root,root,755)
273%{_datadir}/%{name}
This page took 0.108435 seconds and 4 git commands to generate.