]> git.pld-linux.org Git - packages/wesnoth.git/blame - wesnoth.spec
- corrected lang tag in Summary
[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
944acd9d 12Version: 1.8.5
b20e0743 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
944acd9d 18# Source0-md5: a800285d1406690755dd0ea22b98b6df
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/
b20e0743 24BuildRequires: SDL-devel >= 1.2.14-4
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
a5e29dd0 45Requires: SDL >= 1.2.14-4
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
745d3686
ER
83Provides: group(wesnothd)
84Provides: user(wesnothd)
717cee4c 85# sr@Latn vs. sr@latin
86Conflicts: glibc-misc < 6:2.7
dad9a32e 87
88%description server
89Server for playing networked games of Wesnoth.
90
d78dbe99
ZU
91%description server -l hu.UTF-8
92Szerver a Wesnoth hálózati játékához.
93
7840b0fd 94%description server -l pl.UTF-8
dad9a32e 95Serwer do prowadzenia sieciowych gier Wesnoth.
dad9a32e 96
dad9a32e 97%package tools
98Summary: Tools for Wesnoth
f3a41b0d 99Summary(hu.UTF-8): Eszközök a Wesnoth-hoz
157e8e1f 100Summary(pl.UTF-8): Narzędzia dla Wesnoth
dad9a32e 101Group: X11/Applications/Games/Strategy
888b6155 102Requires: %{name} = %{epoch}:%{version}-%{release}
dad9a32e 103
104%description tools
105Map editor and translations tools.
106
d78dbe99
ZU
107%description tools -l hu.UTF-8
108Pályaszerkesztők és fordítási eszközök.
109
7840b0fd
JR
110%description tools -l pl.UTF-8
111Edytor map i narzędzia do tłumaczeń.
dad9a32e 112
113%prep
b5dcf87b 114%setup -q
6734084f 115%patch0 -p1
1c7a318b 116%patch1 -p1
28c0d4e5 117%patch2 -p1
d7602b85 118
119# don't install locales in %{_datadir}/%{name}
120%{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt
976def71 121
122# link using libpng instead of libpng12
123%{__sed} -i 's,png12,png,' src/CMakeLists.txt
dad9a32e 124
125%build
d7602b85 126install -d build
127cd build
128%cmake .. \
129 -DCMAKE_BUILD_TYPE=%{!?debug:Release}%{?debug:Debug} \
130 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
131 -DENABLE_STRICT_COMPILATION="off" \
132 -DBINDIR="%{_bindir}" \
133 -DMANDIR="%{_mandir}" \
134 -DLOCALEDIR="%{_datadir}/locale" \
135 %{!?with_server:-DENABLE_SERVER="off"} \
136 %{?with_server:-DENABLE_CAMPAIGN_SERVER="on"} \
137 %{!?with_tools:-DENABLE_EDITOR="off"} \
138 %{?with_tools:-DENABLE_TOOLS="on"} \
139 %{!?with_fribidi:-DENABLE_FRIBIDI="off"} \
140%if "%{_lib}" == "lib64"
141 -DLIB_SUFFIX=64
142%endif
143
dad9a32e 144%{__make}
145
146%install
147rm -rf $RPM_BUILD_ROOT
d31a0af5 148install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,%{_docdir}/%{name}-%{version}}
dad9a32e 149
d7602b85 150%{__make} -C build install \
dad9a32e 151 DESTDIR=$RPM_BUILD_ROOT
152
8a64199f 153# install additional docs
154install changelog README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
155gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README}
156
d22c6766 157%if %{with server}
3647514b 158install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
d22c6766 159%endif
dad9a32e 160
39784dd5 161mv -f $RPM_BUILD_ROOT%{_datadir}/locale/nb{_NO,}
162mv -f $RPM_BUILD_ROOT%{_datadir}/locale/fur{_IT,}
c12ea96c
MB
163
164# unsupported(?)
7d4eb852 165rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
c12ea96c 166rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
a60f6f21 167rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/racv
d7602b85 168rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/en@shaw
169rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/sr@ijekavian
f1cb8481 170rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/sr@ijekavianlatin
7d4eb852 171rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
c12ea96c
MB
172
173# the same as manuals from %{_mandir}/man?
174rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
175
5105ea28 176%find_lang %{name} --all-name
177
dad9a32e 178%clean
179rm -rf $RPM_BUILD_ROOT
180
40b36f90
JK
181%pre server
182%groupadd -P %{name}-server -g 178 wesnothd
183%useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
184
3fdd0ea2 185%post server
186/sbin/chkconfig --add wesnothd
c12ea96c 187%service wesnothd restart
3fdd0ea2 188
189%preun server
190if [ "$1" = "0" ]; then
c12ea96c 191 %service wesnothd stop
24e1b6fa 192 /sbin/chkconfig --del wesnothd
40b36f90
JK
193 %userremove wesnothd
194 %groupremove wesnothd
3fdd0ea2 195fi
196
5105ea28 197%files -f %{name}.lang
dad9a32e 198%defattr(644,root,root,755)
8a64199f 199%doc %{_docdir}/%{name}-%{version}
dad9a32e 200%attr(755,root,root) %{_bindir}/wesnoth
0c6dc98e 201%{_mandir}/man6/wesnoth.6*
d31a0af5 202%lang(cs) %{_mandir}/cs/man6/wesnoth.6*
e579b435 203%lang(de) %{_mandir}/de/man6/wesnoth.6*
204%lang(es) %{_mandir}/es/man6/wesnoth.6*
d3cada04 205%lang(et) %{_mandir}/et/man6/wesnoth.6*
d18a93b2 206%lang(fi) %{_mandir}/fi/man6/wesnoth.6*
bdc2942c 207%lang(fr) %{_mandir}/fr/man6/wesnoth.6*
7d4eb852 208%lang(gl) %{_mandir}/gl/man6/wesnoth.6*
e579b435 209%lang(hu) %{_mandir}/hu/man6/wesnoth.6*
944acd9d 210%lang(id) %{_mandir}/id/man6/wesnoth.6*
126856ae 211%lang(it) %{_mandir}/it/man6/wesnoth.6*
d7602b85 212%lang(ja) %{_mandir}/ja/man6/wesnoth.6*
7d4eb852 213%lang(lt) %{_mandir}/lt/man6/wesnoth.6*
e579b435 214%lang(pl) %{_mandir}/pl/man6/wesnoth.6*
d7602b85 215%lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth.6*
5105ea28 216%lang(sk) %{_mandir}/sk/man6/wesnoth.6*
b5dcf87b 217%lang(sr) %{_mandir}/sr/man6/wesnoth.6*
d3cada04 218%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnoth.6*
7d4eb852 219%lang(tr) %{_mandir}/tr/man6/wesnoth.6*
e579b435 220%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
60249c9c 221%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
0c6dc98e 222%{_datadir}/%{name}
3647514b 223%{_desktopdir}/*.desktop
224%{_pixmapsdir}/*-icon.png
dad9a32e 225
226%if %{with server}
227%files server
228%defattr(644,root,root,755)
d22c6766 229%attr(755,root,root) %{_bindir}/campaignd
dad9a32e 230%attr(755,root,root) %{_bindir}/wesnothd
3fdd0ea2 231%attr(754,root,root) /etc/rc.d/init.d/wesnothd
0c6dc98e 232%{_mandir}/man6/wesnothd.6*
e579b435 233%lang(cs) %{_mandir}/cs/man6/wesnothd.6*
e579b435 234%lang(de) %{_mandir}/de/man6/wesnothd.6*
235%lang(es) %{_mandir}/es/man6/wesnothd.6*
d3cada04 236%lang(et) %{_mandir}/et/man6/wesnothd.6*
d18a93b2 237%lang(fi) %{_mandir}/fi/man6/wesnothd.6*
bdc2942c 238%lang(fr) %{_mandir}/fr/man6/wesnothd.6*
d16f534c 239%lang(gl) %{_mandir}/gl/man6/wesnothd.6*
e579b435 240%lang(hu) %{_mandir}/hu/man6/wesnothd.6*
944acd9d 241%lang(id) %{_mandir}/id/man6/wesnothd.6*
e579b435 242%lang(it) %{_mandir}/it/man6/wesnothd.6*
d7602b85 243%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
d22c6766 244%lang(lt) %{_mandir}/lt/man6/wesnothd.6*
e579b435 245%lang(pl) %{_mandir}/pl/man6/wesnothd.6*
d7602b85 246%lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
247%lang(sk) %{_mandir}/sk/man6/wesnothd.6*
7d4eb852 248%lang(sr) %{_mandir}/sr/man6/wesnothd.6*
d3cada04 249%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6*
7d4eb852 250%lang(tr) %{_mandir}/tr/man6/wesnothd.6*
e579b435 251%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
8ad2aa17 252%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
40b36f90 253%attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
dad9a32e 254%endif
255
256%if %{with tools}
257%files tools
258%defattr(644,root,root,755)
027c8016 259%attr(755,root,root) %{_bindir}/cutter
260%attr(755,root,root) %{_bindir}/exploder
dad9a32e 261%endif
This page took 0.175166 seconds and 4 git commands to generate.