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