]> git.pld-linux.org Git - packages/wesnoth.git/blame - wesnoth.spec
- BR: rpm-pythonprov
[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
d7602b85 12Version: 1.8
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
18# Source0-md5: 07e4b97512e307c54dcfd86659a61e41
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
e579b435 32%{?with_fribidi:BuildRequires: fribidi-devel}
9d16f83e 33BuildRequires: gettext-devel
759b9d08 34BuildRequires: libpng-devel
6ac5e90b 35BuildRequires: libstdc++-devel
d22c6766 36BuildRequires: libvorbis-devel
d7602b85 37BuildRequires: lua51-devel
350cecb6 38BuildRequires: pango-devel
c94bb8a1 39BuildRequires: pkgconfig
f1cb8481 40BuildRequires: rpm-pythonprov
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
28c0d4e5 113%patch2 -p1
d7602b85 114
115# don't install locales in %{_datadir}/%{name}
116%{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt
976def71 117
118# link using libpng instead of libpng12
119%{__sed} -i 's,png12,png,' src/CMakeLists.txt
dad9a32e 120
121%build
d7602b85 122install -d build
123cd build
124%cmake .. \
125 -DCMAKE_BUILD_TYPE=%{!?debug:Release}%{?debug:Debug} \
126 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
127 -DENABLE_STRICT_COMPILATION="off" \
128 -DBINDIR="%{_bindir}" \
129 -DMANDIR="%{_mandir}" \
130 -DLOCALEDIR="%{_datadir}/locale" \
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"} \
135 %{!?with_fribidi:-DENABLE_FRIBIDI="off"} \
136%if "%{_lib}" == "lib64"
137 -DLIB_SUFFIX=64
138%endif
139
dad9a32e 140%{__make}
141
142%install
143rm -rf $RPM_BUILD_ROOT
d31a0af5 144install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.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
d22c6766 155%endif
dad9a32e 156
39784dd5 157mv -f $RPM_BUILD_ROOT%{_datadir}/locale/nb{_NO,}
158mv -f $RPM_BUILD_ROOT%{_datadir}/locale/fur{_IT,}
c12ea96c
MB
159
160# unsupported(?)
7d4eb852 161rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
c12ea96c 162rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
a60f6f21 163rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/racv
d7602b85 164rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/en@shaw
165rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/sr@ijekavian
f1cb8481 166rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/sr@ijekavianlatin
7d4eb852 167rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
c12ea96c
MB
168
169# the same as manuals from %{_mandir}/man?
170rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
171
5105ea28 172%find_lang %{name} --all-name
173
dad9a32e 174%clean
175rm -rf $RPM_BUILD_ROOT
176
40b36f90
JK
177%pre server
178%groupadd -P %{name}-server -g 178 wesnothd
179%useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
180
3fdd0ea2 181%post server
182/sbin/chkconfig --add wesnothd
c12ea96c 183%service wesnothd restart
3fdd0ea2 184
185%preun server
186if [ "$1" = "0" ]; then
c12ea96c 187 %service wesnothd stop
24e1b6fa 188 /sbin/chkconfig --del wesnothd
40b36f90
JK
189 %userremove wesnothd
190 %groupremove wesnothd
3fdd0ea2 191fi
192
5105ea28 193%files -f %{name}.lang
dad9a32e 194%defattr(644,root,root,755)
8a64199f 195%doc %{_docdir}/%{name}-%{version}
dad9a32e 196%attr(755,root,root) %{_bindir}/wesnoth
0c6dc98e 197%{_mandir}/man6/wesnoth.6*
d31a0af5 198%lang(cs) %{_mandir}/cs/man6/wesnoth.6*
e579b435 199%lang(de) %{_mandir}/de/man6/wesnoth.6*
200%lang(es) %{_mandir}/es/man6/wesnoth.6*
d3cada04 201%lang(et) %{_mandir}/et/man6/wesnoth.6*
d18a93b2 202%lang(fi) %{_mandir}/fi/man6/wesnoth.6*
bdc2942c 203%lang(fr) %{_mandir}/fr/man6/wesnoth.6*
7d4eb852 204%lang(gl) %{_mandir}/gl/man6/wesnoth.6*
e579b435 205%lang(hu) %{_mandir}/hu/man6/wesnoth.6*
126856ae 206%lang(it) %{_mandir}/it/man6/wesnoth.6*
d7602b85 207%lang(ja) %{_mandir}/ja/man6/wesnoth.6*
7d4eb852 208%lang(lt) %{_mandir}/lt/man6/wesnoth.6*
e579b435 209%lang(pl) %{_mandir}/pl/man6/wesnoth.6*
d7602b85 210%lang(pt_BR) %{_mandir}/pt_BR/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*
7d4eb852 214%lang(tr) %{_mandir}/tr/man6/wesnoth.6*
e579b435 215%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
60249c9c 216%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
0c6dc98e 217%{_datadir}/%{name}
3647514b 218%{_desktopdir}/*.desktop
219%{_pixmapsdir}/*-icon.png
dad9a32e 220
221%if %{with server}
222%files server
223%defattr(644,root,root,755)
d22c6766 224%attr(755,root,root) %{_bindir}/campaignd
dad9a32e 225%attr(755,root,root) %{_bindir}/wesnothd
3fdd0ea2 226%attr(754,root,root) /etc/rc.d/init.d/wesnothd
0c6dc98e 227%{_mandir}/man6/wesnothd.6*
e579b435 228%lang(cs) %{_mandir}/cs/man6/wesnothd.6*
e579b435 229%lang(de) %{_mandir}/de/man6/wesnothd.6*
230%lang(es) %{_mandir}/es/man6/wesnothd.6*
d3cada04 231%lang(et) %{_mandir}/et/man6/wesnothd.6*
d18a93b2 232%lang(fi) %{_mandir}/fi/man6/wesnothd.6*
bdc2942c 233%lang(fr) %{_mandir}/fr/man6/wesnothd.6*
e579b435 234%lang(hu) %{_mandir}/hu/man6/wesnothd.6*
235%lang(it) %{_mandir}/it/man6/wesnothd.6*
d7602b85 236%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
d22c6766 237%lang(lt) %{_mandir}/lt/man6/wesnothd.6*
e579b435 238%lang(pl) %{_mandir}/pl/man6/wesnothd.6*
d7602b85 239%lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
240%lang(sk) %{_mandir}/sk/man6/wesnothd.6*
7d4eb852 241%lang(sr) %{_mandir}/sr/man6/wesnothd.6*
d3cada04 242%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6*
7d4eb852 243%lang(tr) %{_mandir}/tr/man6/wesnothd.6*
e579b435 244%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
40b36f90 245%attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
dad9a32e 246%endif
247
248%if %{with tools}
249%files tools
250%defattr(644,root,root,755)
027c8016 251%attr(755,root,root) %{_bindir}/cutter
252%attr(755,root,root) %{_bindir}/exploder
dad9a32e 253%endif
This page took 0.173745 seconds and 4 git commands to generate.