]> git.pld-linux.org Git - packages/wesnoth.git/blame_incremental - wesnoth.spec
- up to 1.14.16
[packages/wesnoth.git] / wesnoth.spec
... / ...
CommitLineData
1# TODO
2# - system lua?
3# - unpackaged language files
4#
5# Conditional build
6%bcond_without server # without server
7%bcond_without fribidi # without Bidirectional language support
8
9Summary: Strategy game with a fantasy theme
10Summary(hu.UTF-8): Fantasy környezetben játszódó stratégiai játék
11Summary(pl.UTF-8): Gra strategiczna z motywem fantasy
12Name: wesnoth
13Version: 1.14.16
14Release: 1
15Epoch: 1
16License: GPL v2+
17Group: X11/Applications/Games/Strategy
18Source0: http://downloads.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2
19# Source0-md5: 769733a55ab5742815e0acf8c51e13e4
20Source1: %{name}d.init
21Source2: %{name}.tmpfiles
22Source3: %{name}.sysconfig
23Source4: %{name}d.service
24URL: http://www.wesnoth.org/
25BuildRequires: SDL2-devel >= 2.0.4
26BuildRequires: SDL2_image-devel >= 2.0.0
27BuildRequires: SDL2_mixer-devel >= 2.0.0
28BuildRequires: SDL2_ttf-devel >= 2.0.12
29BuildRequires: boost-devel >= 1.50.0
30BuildRequires: bzip2-devel
31BuildRequires: cairo-devel >= 1.10.0
32BuildRequires: cmake >= 2.8.5
33BuildRequires: dbus-devel
34BuildRequires: fontconfig-devel >= 2.4.1
35%{?with_fribidi:BuildRequires: fribidi-devel}
36BuildRequires: gettext-tools
37BuildRequires: libicu-devel
38BuildRequires: libpng-devel
39BuildRequires: libstdc++-devel
40BuildRequires: libvorbis-devel
41BuildRequires: openssl-devel
42BuildRequires: pango-devel >= 1:1.22.0
43BuildRequires: pkgconfig
44BuildRequires: rpm-pythonprov
45BuildRequires: rpmbuild(macros) >= 1.605
46BuildRequires: sed >= 4.0
47BuildRequires: systemd-devel
48BuildRequires: xorg-lib-libICE-devel
49BuildRequires: xorg-lib-libSM-devel
50BuildRequires: xorg-lib-libX11-devel
51BuildRequires: xorg-lib-libXext-devel
52BuildRequires: zlib-devel
53Requires(post,postun): desktop-file-utils
54Requires(post,postun): gtk-update-icon-cache
55Requires: %{name}-data = %{epoch}:%{version}
56Requires: SDL2 >= 2.0.4
57Requires: fontconfig >= 2.4.1
58Requires: pango >= 1:1.22.8
59BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60
61%description
62Battle for Wesnoth is a fantasy strategy game. Battle for control of
63villages, using variety of units which have advantages and
64disadvantages in different types of terrains and against different
65types of attacks. Units gain experience and advance levels, and are
66carried over from one scenario to the next campaign.
67
68%description -l hu.UTF-8
69Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó
70stratégiai játék. Harc a falvak megszerzéséért, különböző egységek
71felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a
72különféle terepeken és a különböző támadási stílusok ellen. Az
73egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a
74következő pályára.
75
76%description -l pl.UTF-8
77Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
78wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
79jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
80ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
81przenoszone z jednej scenerii do następnej kampanii.
82
83%package server
84Summary: Network server for Wesnoth
85Summary(hu.UTF-8): Hálózati szerver Wesnoth-hoz
86Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
87Group: X11/Applications/Games/Strategy
88Requires(post,preun): /sbin/chkconfig
89Requires(postun): /usr/sbin/groupdel
90Requires(postun): /usr/sbin/userdel
91Requires(pre): /usr/sbin/groupadd
92Requires(pre): /usr/sbin/useradd
93Requires: rc-scripts >= 0.4.0.17
94Provides: group(wesnothd)
95Provides: user(wesnothd)
96
97%description server
98Server for playing networked games of Wesnoth.
99
100%description server -l hu.UTF-8
101Szerver a Wesnoth hálózati játékához.
102
103%description server -l pl.UTF-8
104Serwer do prowadzenia sieciowych gier Wesnoth.
105
106%package data
107Summary: Strategy game with a fantasy theme - data files
108Summary(pl.UTF-8): Gra strategiczna z motywem fantasy - pliki danych
109Group: Applications/Games
110BuildArch: noarch
111
112%description data
113This package contains the data files for Wesnoth.
114
115%description data -l pl.UTF-8
116Ten pakiet zawiera pliki danych dla gry Wesnoth.
117
118%prep
119%setup -q
120
121# don't install locales in %{_datadir}/%{name}
122%{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt
123
124%{__sed} -i '1s,/usr/bin/env python3$,%{__python3},' \
125 data/tools/{GUI.pyw,about_cfg_to_wiki,addon_manager/__init__.py,addon_manager/html.py,campaign2wiki.py,extractbindings,hexometer.py,imgcheck,steam-changelog,terrain2wiki.py,unit_tree/TeamColorizer,unit_tree/__init__.py,unit_tree/animations.py,unit_tree/helpers.py,unit_tree/html_output.py,unit_tree/overview.py,unit_tree/wiki_output.py,wesnoth/campaignserver_client.py,wesnoth/libgithub.py,wesnoth/wescamp.py,wesnoth/wmliterator3.py,wesnoth/wmlparser3.py,wesnoth/wmltools3.py,wesnoth_addon_manager,wmlindent,wmllint,wmllint-1.4,wmlscope,wmlunits,wmlxgettext}
126%{__sed} -i '1s,/usr/bin/env python2$,%{__python},' \
127 data/tools/{expand-terrain-macros.py,journeylifter,rmtrans/rmtrans.py,scoutDefault.py,trackplacer,wesnoth/wmldata.py,wesnoth/wmlgrammar.py,wesnoth/wmliterator.py,wesnoth/wmlparser.py,wesnoth/wmlparser2.py,wesnoth/wmltools.py,wmlflip,wmlvalidator}
128
129%build
130install -d build
131cd build
132%cmake \
133 .. \
134 -DCMAKE_BUILD_TYPE="Release" \
135 -DENABLE_STRICT_COMPILATION="off" \
136 -DBINDIR="%{_bindir}" \
137 -DMANDIR="%{_mandir}" \
138 -DLOCALEDIR="%{_localedir}" \
139 %{!?with_server:-DENABLE_SERVER="off"} \
140 %{?with_server:-DENABLE_CAMPAIGN_SERVER="on"} \
141 %{!?with_fribidi:-DENABLE_FRIBIDI="off"}
142
143%{__make}
144
145%install
146rm -rf $RPM_BUILD_ROOT
147install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,/etc/sysconfig} \
148 $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{_docdir}/%{name}-%{version}} \
149 $RPM_BUILD_ROOT%{systemdunitdir}
150
151%{__make} -C build install \
152 DESTDIR=$RPM_BUILD_ROOT
153
154%if %{with server}
155cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
156cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
157cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/wesnoth
158cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/wesnothd.service
159%endif
160
161%{__mv} $RPM_BUILD_ROOT%{_docdir}/html $RPM_BUILD_ROOT%{_docdir}/%{name}
162
163# unify
164%{__mv} $RPM_BUILD_ROOT%{_localedir}/{ca_ES@valencia,ca@valencia}
165%{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
166%{__mv} $RPM_BUILD_ROOT%{_localedir}/{fur_IT,fur}
167%{__mv} $RPM_BUILD_ROOT%{_mandir}/{ca_ES@valencia,ca@valencia}
168
169# unsupported(?)
170%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ang@latin
171%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/racv
172%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavian
173%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavianlatin
174
175# the same as manuals from %{_mandir}/man?
176%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/en_GB
177
178%find_lang %{name} --all-name
179
180%clean
181rm -rf $RPM_BUILD_ROOT
182
183%post
184%update_desktop_database
185%update_icon_cache hicolor
186
187%postun
188%update_desktop_database
189%update_icon_cache hicolor
190
191%pre server
192%groupadd -P %{name}-server -g 178 wesnothd
193%useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
194
195%post server
196/sbin/chkconfig --add wesnothd
197%service wesnothd restart
198%systemd_post wesnothd.service
199
200%preun server
201if [ "$1" = "0" ]; then
202 %service wesnothd stop
203 /sbin/chkconfig --del wesnothd
204fi
205%systemd_preun wesnothd.service
206
207%postun server
208if [ "$1" = "0" ]; then
209 %userremove wesnothd
210 %groupremove wesnothd
211fi
212%systemd_reload
213
214%files -f %{name}.lang
215%defattr(644,root,root,755)
216#%doc README changelog
217%doc %{_docdir}/%{name}
218%attr(755,root,root) %{_bindir}/wesnoth
219%{_mandir}/man6/wesnoth.6*
220%lang(ca) %{_mandir}/ca/man6/wesnoth.6*
221%lang(de) %{_mandir}/de/man6/wesnoth.6*
222%lang(es) %{_mandir}/es/man6/wesnoth.6*
223%lang(fr) %{_mandir}/fr/man6/wesnoth.6*
224%lang(hu) %{_mandir}/hu/man6/wesnoth.6*
225%lang(it) %{_mandir}/it/man6/wesnoth.6*
226%lang(ja) %{_mandir}/ja/man6/wesnoth.6*
227%lang(lt) %{_mandir}/lt/man6/wesnoth.6*
228%lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth.6*
229%lang(ru) %{_mandir}/ru/man6/wesnoth.6*
230%lang(tr) %{_mandir}/tr/man6/wesnoth.6*
231%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
232%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
233%{_desktopdir}/wesnoth.desktop
234%{_iconsdir}/hicolor/*x*/apps/wesnoth-icon.png
235%{_datadir}/metainfo/wesnoth.appdata.xml
236
237%if %{with server}
238%files server
239%defattr(644,root,root,755)
240%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
241%attr(755,root,root) %{_bindir}/campaignd
242%attr(755,root,root) %{_bindir}/wesnothd
243%attr(754,root,root) /etc/rc.d/init.d/wesnothd
244%attr(644,root,root) %{systemdunitdir}/wesnothd.service
245%{_mandir}/man6/wesnothd.6*
246%lang(ca) %{_mandir}/ca/man6/wesnothd.6*
247%lang(cs) %{_mandir}/cs/man6/wesnothd.6*
248%lang(de) %{_mandir}/de/man6/wesnothd.6*
249%lang(es) %{_mandir}/es/man6/wesnothd.6*
250%lang(et) %{_mandir}/et/man6/wesnothd.6*
251%lang(fi) %{_mandir}/fi/man6/wesnothd.6*
252%lang(fr) %{_mandir}/fr/man6/wesnothd.6*
253%lang(gl) %{_mandir}/gl/man6/wesnothd.6*
254%lang(hu) %{_mandir}/hu/man6/wesnothd.6*
255%lang(id) %{_mandir}/id/man6/wesnothd.6*
256%lang(it) %{_mandir}/it/man6/wesnothd.6*
257%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
258%lang(lt) %{_mandir}/lt/man6/wesnothd.6*
259%lang(pl) %{_mandir}/pl/man6/wesnothd.6*
260%lang(pt) %{_mandir}/pt/man6/wesnothd.6*
261%lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
262%lang(ru) %{_mandir}/ru/man6/wesnothd.6*
263%lang(sk) %{_mandir}/sk/man6/wesnothd.6*
264%lang(sr) %{_mandir}/sr/man6/wesnothd.6*
265%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6*
266%lang(tr) %{_mandir}/tr/man6/wesnothd.6*
267%lang(uk) %{_mandir}/uk/man6/wesnothd.6*
268%lang(vi) %{_mandir}/vi/man6/wesnothd.6*
269%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
270%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
271%attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
272%{systemdtmpfilesdir}/%{name}.conf
273%endif
274
275%files data
276%defattr(644,root,root,755)
277%{_datadir}/%{name}
This page took 0.110357 seconds and 4 git commands to generate.