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