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