]> git.pld-linux.org Git - packages/wesnoth.git/blame - wesnoth.spec
- cleaning
[packages/wesnoth.git] / wesnoth.spec
CommitLineData
4f6ef9bb 1# TODO
f8498762 2# - unpackaged language files
eb35425c 3# Conditional build
dad9a32e 4%bcond_without server # without server
b18d78c0 5%bcond_without tools # without tools
e579b435 6%bcond_without fribidi # without Bidirectional language support
dad9a32e 7#
8Summary: Strategy game with a fantasy theme
d78dbe99 9Summary(hu.UTF-8): Fantasy környezetben játszódó stratégiai játék
157e8e1f 10Summary(pl.UTF-8): Strategiczna gra z motywem fantasy
dad9a32e 11Name: wesnoth
3647514b 12Version: 1.6.5
97ecc8a3 13Release: 3
d31a0af5 14Epoch: 1
482a922c 15License: GPL v2+
dad9a32e 16Group: X11/Applications/Games/Strategy
b5dcf87b 17Source0: http://dl.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2
3647514b 18# Source0-md5: 493826bbd9ba355930765a7e8fe3749a
19Source1: %{name}d.init
717cee4c 20Patch0: %{name}-Makefile.patch
21Patch1: %{name}-locale_dir.patch
22Patch2: %{name}-werror.patch
3647514b 23Patch3: %{name}-desktop.patch
97ecc8a3 24Patch4: %{name}-libpng.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
d22c6766 30BuildRequires: SDL_ttf-devel >= 2.0.8
126856ae 31BuildRequires: autoconf >= 2.59
9d16f83e 32BuildRequires: automake >= 1:1.9
e579b435 33BuildRequires: boost-devel >= 1.33
34%{?with_fribidi:BuildRequires: fribidi-devel}
9d16f83e 35BuildRequires: gettext-devel
759b9d08 36BuildRequires: libpng-devel
6ac5e90b 37BuildRequires: libstdc++-devel
9d16f83e 38BuildRequires: libtool >= 2:1.5
d22c6766 39BuildRequires: libvorbis-devel
350cecb6 40BuildRequires: pango-devel
f0bcf063 41BuildRequires: pkgconfig
56da1b20 42BuildRequires: python-devel
56da1b20 43BuildRequires: rpm-pythonprov
759b9d08 44BuildRequires: rpmbuild(macros) >= 1.268
d22c6766 45BuildRequires: sed >= 4.0
717cee4c 46# sr@Latn vs. sr@latin
47Conflicts: glibc-misc < 6:2.7
dad9a32e 48BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50%description
51Battle for Wesnoth is a fantasy strategy game. Battle for control of
52villages, using variety of units which have advantages and
53disadvantages in different types of terrains and against different
54types of attacks. Units gain experience and advance levels, and are
55carried over from one scenario to the next campaign.
56
d78dbe99 57%description -l hu.UTF-8
a60f6f21 58Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó
59stratégiai játék. Harc a falvak megszerzéséért, különböző egységek
60felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a
61különféle terepeken és a különböző támadási stílusok ellen. Az
62egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a
63következő pályára.
d78dbe99 64
7840b0fd 65%description -l pl.UTF-8
a60f6f21 66Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
67wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
68jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
69ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
70przenoszone z jednej scenerii do następnej kampanii.
dad9a32e 71
dad9a32e 72%package server
73Summary: Network server for Wesnoth
717cee4c 74Summary(hu.UTF-8): Hálózati szerver Wesnoth-hoz
157e8e1f 75Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
dad9a32e 76Group: X11/Applications/Games/Strategy
392ee82f 77Requires(post,preun): /sbin/chkconfig
40b36f90
JK
78Requires(postun): /usr/sbin/groupdel
79Requires(postun): /usr/sbin/userdel
80Requires(pre): /usr/sbin/groupadd
81Requires(pre): /usr/sbin/useradd
759b9d08 82Requires: rc-scripts >= 0.4.0.17
717cee4c 83# sr@Latn vs. sr@latin
84Conflicts: glibc-misc < 6:2.7
dad9a32e 85
86%description server
87Server for playing networked games of Wesnoth.
88
d78dbe99
ZU
89%description server -l hu.UTF-8
90Szerver a Wesnoth hálózati játékához.
91
7840b0fd 92%description server -l pl.UTF-8
dad9a32e 93Serwer do prowadzenia sieciowych gier Wesnoth.
dad9a32e 94
dad9a32e 95%package tools
96Summary: Tools for Wesnoth
d78dbe99 97Summary(hu.UTF.8): Eszközök a Wesnoth-hoz
157e8e1f 98Summary(pl.UTF-8): Narzędzia dla Wesnoth
dad9a32e 99Group: X11/Applications/Games/Strategy
888b6155 100Requires: %{name} = %{epoch}:%{version}-%{release}
dad9a32e 101
102%description tools
103Map editor and translations tools.
104
d78dbe99
ZU
105%description tools -l hu.UTF-8
106Pályaszerkesztők és fordítási eszközök.
107
7840b0fd
JR
108%description tools -l pl.UTF-8
109Edytor map i narzędzia do tłumaczeń.
dad9a32e 110
111%prep
b5dcf87b 112%setup -q
6734084f 113%patch0 -p1
1c7a318b 114%patch1 -p1
717cee4c 115%patch2 -p1
3647514b 116%patch3 -p1
97ecc8a3 117%patch4 -p1
ae9d8c9a 118%{__sed} -i 's,$PYTHON_PREFIX"/lib/,"%{_libdir}/,g' configure.ac
dad9a32e 119
120%build
629473ee 121%{__gettextize}
e579b435 122%{__aclocal} -I m4
629473ee 123%{__autoconf}
124%{__autoheader}
125%{__automake}
dad9a32e 126%configure \
ae9d8c9a 127 PYTHON_VERSION=%{py_ver} \
dad9a32e 128 %{?with_server:--enable-server} \
d22c6766 129 %{?with_server:--enable-campaign-server} \
130 --enable-python-install \
dad9a32e 131 %{?with_tools:--enable-editor} \
c12ea96c 132 %{?with_tools:--enable-tools} \
e579b435 133 --with%{!?with_fribidi:out}-fribidi \
8a64199f 134 --docdir=%{_docdir}/%{name}-%{version} \
135 --with-icondir=%{_pixmapsdir} \
c12ea96c 136 --with-zipios
dad9a32e 137%{__make}
138
139%install
140rm -rf $RPM_BUILD_ROOT
d31a0af5 141install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,%{_docdir}/%{name}-%{version}}
dad9a32e 142
143%{__make} install \
144 DESTDIR=$RPM_BUILD_ROOT
145
8a64199f 146# install additional docs
147install changelog README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
148gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README}
149
d22c6766 150%if %{with server}
3647514b 151install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
d22c6766 152%endif
dad9a32e 153
39784dd5 154mv -f $RPM_BUILD_ROOT%{_datadir}/locale/nb{_NO,}
155mv -f $RPM_BUILD_ROOT%{_datadir}/locale/fur{_IT,}
c12ea96c
MB
156
157# unsupported(?)
7d4eb852 158rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
c12ea96c 159rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
a60f6f21 160rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/racv
7d4eb852 161rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
c12ea96c
MB
162
163# the same as manuals from %{_mandir}/man?
164rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
165
ae9d8c9a 166%py_comp $RPM_BUILD_ROOT%{py_sitedir}
167%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
168%py_postclean
d22c6766 169
5105ea28 170%find_lang %{name} --all-name
171
dad9a32e 172%clean
173rm -rf $RPM_BUILD_ROOT
174
40b36f90
JK
175%pre server
176%groupadd -P %{name}-server -g 178 wesnothd
177%useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
178
3fdd0ea2 179%post server
180/sbin/chkconfig --add wesnothd
c12ea96c 181%service wesnothd restart
3fdd0ea2 182
183%preun server
184if [ "$1" = "0" ]; then
c12ea96c 185 %service wesnothd stop
24e1b6fa 186 /sbin/chkconfig --del wesnothd
40b36f90
JK
187 %userremove wesnothd
188 %groupremove wesnothd
3fdd0ea2 189fi
190
5105ea28 191%files -f %{name}.lang
dad9a32e 192%defattr(644,root,root,755)
8a64199f 193%doc %{_docdir}/%{name}-%{version}
dad9a32e 194%attr(755,root,root) %{_bindir}/wesnoth
0c6dc98e 195%{_mandir}/man6/wesnoth.6*
d31a0af5 196%lang(cs) %{_mandir}/cs/man6/wesnoth.6*
d22c6766 197#%%lang(da) %{_mandir}/da/man6/wesnoth.6*
e579b435 198%lang(de) %{_mandir}/de/man6/wesnoth.6*
199%lang(es) %{_mandir}/es/man6/wesnoth.6*
d3cada04 200%lang(et) %{_mandir}/et/man6/wesnoth.6*
d18a93b2 201%lang(fi) %{_mandir}/fi/man6/wesnoth.6*
bdc2942c 202%lang(fr) %{_mandir}/fr/man6/wesnoth.6*
7d4eb852 203%lang(gl) %{_mandir}/gl/man6/wesnoth.6*
e579b435 204%lang(hu) %{_mandir}/hu/man6/wesnoth.6*
126856ae 205%lang(it) %{_mandir}/it/man6/wesnoth.6*
d22c6766 206#%%lang(ja) %{_mandir}/ja/man6/wesnoth.6*
7d4eb852 207%lang(lt) %{_mandir}/lt/man6/wesnoth.6*
d22c6766 208#%%lang(nl) %{_mandir}/nl/man6/wesnoth.6*
e579b435 209%lang(pl) %{_mandir}/pl/man6/wesnoth.6*
bdc2942c 210#%%lang(ru) %{_mandir}/ru/man6/wesnoth.6*
5105ea28 211%lang(sk) %{_mandir}/sk/man6/wesnoth.6*
b5dcf87b 212%lang(sr) %{_mandir}/sr/man6/wesnoth.6*
d3cada04 213%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnoth.6*
717cee4c 214%lang(sv) %{_mandir}/sv/man6/wesnoth.6*
7d4eb852 215%lang(tr) %{_mandir}/tr/man6/wesnoth.6*
e579b435 216%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
60249c9c 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*
b5dcf87b 230#%%lang(da) %{_mandir}/da/man6/wesnothd.6*
e579b435 231%lang(de) %{_mandir}/de/man6/wesnothd.6*
232%lang(es) %{_mandir}/es/man6/wesnothd.6*
d3cada04 233%lang(et) %{_mandir}/et/man6/wesnothd.6*
d18a93b2 234%lang(fi) %{_mandir}/fi/man6/wesnothd.6*
bdc2942c 235%lang(fr) %{_mandir}/fr/man6/wesnothd.6*
b5dcf87b 236#%%lang(gl) %{_mandir}/gl/man6/wesnothd.6*
e579b435 237%lang(hu) %{_mandir}/hu/man6/wesnothd.6*
238%lang(it) %{_mandir}/it/man6/wesnothd.6*
b5dcf87b 239#%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
d22c6766 240%lang(lt) %{_mandir}/lt/man6/wesnothd.6*
b5dcf87b 241#%%lang(nl) %{_mandir}/nl/man6/wesnothd.6*
e579b435 242%lang(pl) %{_mandir}/pl/man6/wesnothd.6*
b5dcf87b 243#%%lang(sk) %{_mandir}/sk/man6/wesnothd.6*
7d4eb852 244%lang(sr) %{_mandir}/sr/man6/wesnothd.6*
d3cada04 245%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6*
717cee4c 246%lang(sv) %{_mandir}/sv/man6/wesnothd.6*
7d4eb852 247%lang(tr) %{_mandir}/tr/man6/wesnothd.6*
e579b435 248%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
717cee4c 249%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
40b36f90 250%attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
dad9a32e 251%endif
252
253%if %{with tools}
254%files tools
255%defattr(644,root,root,755)
027c8016 256%attr(755,root,root) %{_bindir}/cutter
257%attr(755,root,root) %{_bindir}/exploder
d22c6766 258%attr(755,root,root) %{_bindir}/wesnoth_addon_manager
e579b435 259%attr(755,root,root) %{_bindir}/wmlindent
260%attr(755,root,root) %{_bindir}/wmllint
261%attr(755,root,root) %{_bindir}/wmlscope
ae9d8c9a 262%dir %{py_sitedir}/%{name}
263%{py_sitedir}/%{name}/*.py[co]
dad9a32e 264%endif
This page took 0.073546 seconds and 4 git commands to generate.