]> git.pld-linux.org Git - packages/wesnoth.git/blame - wesnoth.spec
- release 2 (by relup.sh)
[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
dad9a32e 8#
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
db0e817e 13Version: 1.10.3
ef3b524b 14Release: 2
d31a0af5 15Epoch: 1
482a922c 16License: GPL v2+
dad9a32e 17Group: X11/Applications/Games/Strategy
d7602b85 18Source0: http://downloads.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2
db0e817e 19# Source0-md5: b25354c71d58f82c2c60cc12c6f09c36
3647514b 20Source1: %{name}d.init
0e4bc507 21Source2: %{name}.tmpfiles
d94078df 22Patch0: %{name}-desktop.patch
23Patch1: %{name}-locale_dir.patch
bedb3e49 24Patch2: boost-1.50.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
d7602b85 31BuildRequires: asciidoc
e579b435 32BuildRequires: boost-devel >= 1.33
d7602b85 33BuildRequires: cmake >= 2.4
309b98f8 34BuildRequires: dbus-devel
e579b435 35%{?with_fribidi:BuildRequires: fribidi-devel}
9d16f83e 36BuildRequires: gettext-devel
759b9d08 37BuildRequires: libpng-devel
6ac5e90b 38BuildRequires: libstdc++-devel
d22c6766 39BuildRequires: libvorbis-devel
d7602b85 40BuildRequires: lua51-devel
350cecb6 41BuildRequires: pango-devel
c94bb8a1 42BuildRequires: pkgconfig
f1cb8481 43BuildRequires: rpm-pythonprov
d94078df 44BuildRequires: rpmbuild(macros) >= 1.600
d22c6766 45BuildRequires: sed >= 4.0
d7602b85 46BuildRequires: zlib-devel
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
115%prep
b5dcf87b 116%setup -q
6734084f 117%patch0 -p1
1c7a318b 118%patch1 -p1
bedb3e49 119%patch2 -p1
d7602b85 120
121# don't install locales in %{_datadir}/%{name}
d94078df 122%{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt
dad9a32e 123
124%build
d7602b85 125install -d build
126cd build
d94078df 127%cmake \
128 .. \
d7602b85 129 -DENABLE_STRICT_COMPILATION="off" \
130 -DBINDIR="%{_bindir}" \
131 -DMANDIR="%{_mandir}" \
d94078df 132 -DLOCALEDIR="%{_datadir}/locale" \
d7602b85 133 %{!?with_server:-DENABLE_SERVER="off"} \
134 %{?with_server:-DENABLE_CAMPAIGN_SERVER="on"} \
135 %{!?with_tools:-DENABLE_EDITOR="off"} \
136 %{?with_tools:-DENABLE_TOOLS="on"} \
d94078df 137 %{!?with_fribidi:-DENABLE_FRIBIDI="off"}
d7602b85 138
dad9a32e 139%{__make}
140
141%install
142rm -rf $RPM_BUILD_ROOT
0e4bc507
JR
143install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d} \
144 $RPM_BUILD_ROOT{/usr/lib/tmpfiles.d,%{_docdir}/%{name}-%{version}}
dad9a32e 145
d7602b85 146%{__make} -C build install \
dad9a32e 147 DESTDIR=$RPM_BUILD_ROOT
148
8a64199f 149# install additional docs
150install changelog README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
151gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README}
152
d22c6766 153%if %{with server}
3647514b 154install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
0e4bc507 155install %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
d22c6766 156%endif
dad9a32e 157
39784dd5 158mv -f $RPM_BUILD_ROOT%{_datadir}/locale/nb{_NO,}
159mv -f $RPM_BUILD_ROOT%{_datadir}/locale/fur{_IT,}
c12ea96c 160
d94078df 161# unsupported(?)
62daf2b6 162%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/ang@latin
d94078df 163%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
164%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/la
729e3de3 165%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/racv
d94078df 166%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/en@shaw
729e3de3
JB
167%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/sr@ijekavian
168%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/sr@ijekavianlatin
d94078df 169%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
62daf2b6 170%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavian
171%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavianlatin
c12ea96c
MB
172
173# the same as manuals from %{_mandir}/man?
729e3de3 174%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/en_GB
c12ea96c 175
5105ea28 176%find_lang %{name} --all-name
177
dad9a32e 178%clean
179rm -rf $RPM_BUILD_ROOT
180
40b36f90
JK
181%pre server
182%groupadd -P %{name}-server -g 178 wesnothd
183%useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
184
3fdd0ea2 185%post server
186/sbin/chkconfig --add wesnothd
c12ea96c 187%service wesnothd restart
3fdd0ea2 188
189%preun server
190if [ "$1" = "0" ]; then
c12ea96c 191 %service wesnothd stop
24e1b6fa 192 /sbin/chkconfig --del wesnothd
40b36f90
JK
193 %userremove wesnothd
194 %groupremove wesnothd
3fdd0ea2 195fi
196
5105ea28 197%files -f %{name}.lang
dad9a32e 198%defattr(644,root,root,755)
8a64199f 199%doc %{_docdir}/%{name}-%{version}
dad9a32e 200%attr(755,root,root) %{_bindir}/wesnoth
0c6dc98e 201%{_mandir}/man6/wesnoth.6*
d31a0af5 202%lang(cs) %{_mandir}/cs/man6/wesnoth.6*
e579b435 203%lang(de) %{_mandir}/de/man6/wesnoth.6*
d3cada04 204%lang(et) %{_mandir}/et/man6/wesnoth.6*
83629e31 205%lang(es) %{_mandir}/es/man6/wesnoth.6*
206%lang(fi) %{_mandir}/fi/man6/wesnoth.6*
bdc2942c 207%lang(fr) %{_mandir}/fr/man6/wesnoth.6*
7d4eb852 208%lang(gl) %{_mandir}/gl/man6/wesnoth.6*
e579b435 209%lang(hu) %{_mandir}/hu/man6/wesnoth.6*
944acd9d 210%lang(id) %{_mandir}/id/man6/wesnoth.6*
83629e31 211%lang(it) %{_mandir}/it/man6/wesnoth.6*
7d4eb852 212%lang(lt) %{_mandir}/lt/man6/wesnoth.6*
e579b435 213%lang(pl) %{_mandir}/pl/man6/wesnoth.6*
83629e31 214%lang(ru) %{_mandir}/ru/man6/wesnoth.6*
5105ea28 215%lang(sk) %{_mandir}/sk/man6/wesnoth.6*
83629e31 216%lang(sr) %{_mandir}/sr/man6/wesnoth.6*
217%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnoth.6*
218%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
219%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
0c6dc98e 220%{_datadir}/%{name}
3647514b 221%{_desktopdir}/*.desktop
222%{_pixmapsdir}/*-icon.png
dad9a32e 223
224%if %{with server}
225%files server
226%defattr(644,root,root,755)
d22c6766 227%attr(755,root,root) %{_bindir}/campaignd
dad9a32e 228%attr(755,root,root) %{_bindir}/wesnothd
3fdd0ea2 229%attr(754,root,root) /etc/rc.d/init.d/wesnothd
0c6dc98e 230%{_mandir}/man6/wesnothd.6*
e579b435 231%lang(cs) %{_mandir}/cs/man6/wesnothd.6*
e579b435 232%lang(de) %{_mandir}/de/man6/wesnothd.6*
233%lang(es) %{_mandir}/es/man6/wesnothd.6*
d3cada04 234%lang(et) %{_mandir}/et/man6/wesnothd.6*
d18a93b2 235%lang(fi) %{_mandir}/fi/man6/wesnothd.6*
bdc2942c 236%lang(fr) %{_mandir}/fr/man6/wesnothd.6*
d16f534c 237%lang(gl) %{_mandir}/gl/man6/wesnothd.6*
e579b435 238%lang(hu) %{_mandir}/hu/man6/wesnothd.6*
944acd9d 239%lang(id) %{_mandir}/id/man6/wesnothd.6*
e579b435 240%lang(it) %{_mandir}/it/man6/wesnothd.6*
d7602b85 241%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
d22c6766 242%lang(lt) %{_mandir}/lt/man6/wesnothd.6*
e579b435 243%lang(pl) %{_mandir}/pl/man6/wesnothd.6*
d7602b85 244%lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
83629e31 245%lang(ru) %{_mandir}/ru/man6/wesnothd.6*
d7602b85 246%lang(sk) %{_mandir}/sk/man6/wesnothd.6*
83629e31 247%lang(sr) %{_mandir}/sr/man6/wesnothd.6*
248%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6*
249%lang(tr) %{_mandir}/tr/man6/wesnothd.6*
250%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
251%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
40b36f90 252%attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
0e4bc507 253/usr/lib/tmpfiles.d/%{name}.conf
dad9a32e 254%endif
255
256%if %{with tools}
257%files tools
258%defattr(644,root,root,755)
027c8016 259%attr(755,root,root) %{_bindir}/cutter
260%attr(755,root,root) %{_bindir}/exploder
dad9a32e 261%endif
This page took 0.099085 seconds and 4 git commands to generate.