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