]> git.pld-linux.org Git - packages/wesnoth.git/blame_incremental - wesnoth.spec
update required cmake version
[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
8Summary: Strategy game with a fantasy theme
9Summary(hu.UTF-8): Fantasy környezetben játszódó stratégiai játék
10Summary(pl.UTF-8): Gra strategiczna z motywem fantasy
11Name: wesnoth
12Version: 1.16.8
13Release: 2
14Epoch: 1
15License: GPL v2+
16Group: X11/Applications/Games/Strategy
17Source0: http://downloads.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2
18# Source0-md5: d2c4e932651045e35c51d79b75579b0d
19Source1: %{name}d.init
20Source2: %{name}.tmpfiles
21Source3: %{name}.sysconfig
22Source4: %{name}d.service
23Patch0: gcc13.patch
24URL: http://www.wesnoth.org/
25BuildRequires: SDL2-devel >= 2.0.8
26BuildRequires: SDL2_image-devel >= 2.0.2
27BuildRequires: SDL2_mixer-devel >= 2.0.0
28BuildRequires: boost-devel >= 1.50.0
29BuildRequires: bzip2-devel
30BuildRequires: cairo-devel >= 1.10.0
31BuildRequires: cmake >= 3.7
32BuildRequires: dbus-devel
33BuildRequires: fontconfig-devel >= 2.4.1
34BuildRequires: gettext-tools
35BuildRequires: libicu-devel
36BuildRequires: libpng-devel
37BuildRequires: libstdc++-devel >= 6:4.7
38BuildRequires: libvorbis-devel
39BuildRequires: openssl-devel >= 1.0
40BuildRequires: pango-devel >= 1:1.22.0
41BuildRequires: pkgconfig
42BuildRequires: readline-devel
43BuildRequires: rpm-build >= 4.6
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
59Obsoletes: wesnoth-tools < 1:1.14
60BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62%description
63Battle for Wesnoth is a fantasy strategy game. Battle for control of
64villages, using variety of units which have advantages and
65disadvantages in different types of terrains and against different
66types of attacks. Units gain experience and advance levels, and are
67carried over from one scenario to the next campaign.
68
69%description -l hu.UTF-8
70Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó
71stratégiai játék. Harc a falvak megszerzéséért, különböző egységek
72felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a
73különféle terepeken és a különböző támadási stílusok ellen. Az
74egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a
75következő pályára.
76
77%description -l pl.UTF-8
78Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
79wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
80jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
81ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
82przenoszone z jednej scenerii do następnej kampanii.
83
84%package server
85Summary: Network server for Wesnoth
86Summary(hu.UTF-8): Hálózati szerver Wesnoth-hoz
87Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
88Group: X11/Applications/Games/Strategy
89Requires(post,preun): /sbin/chkconfig
90Requires(postun): /usr/sbin/groupdel
91Requires(postun): /usr/sbin/userdel
92Requires(pre): /usr/sbin/groupadd
93Requires(pre): /usr/sbin/useradd
94Requires: rc-scripts >= 0.4.0.17
95Provides: group(wesnothd)
96Provides: user(wesnothd)
97
98%description server
99Server for playing networked games of Wesnoth.
100
101%description server -l hu.UTF-8
102Szerver a Wesnoth hálózati játékához.
103
104%description server -l pl.UTF-8
105Serwer do prowadzenia sieciowych gier Wesnoth.
106
107%package data
108Summary: Strategy game with a fantasy theme - data files
109Summary(pl.UTF-8): Gra strategiczna z motywem fantasy - pliki danych
110Group: Applications/Games
111BuildArch: noarch
112
113%description data
114This package contains the data files for Wesnoth.
115
116%description data -l pl.UTF-8
117Ten pakiet zawiera pliki danych dla gry Wesnoth.
118
119%prep
120%setup -q
121%patch0 -p1
122
123# don't install locales in %{_datadir}/%{name}
124%{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt
125
126%{__sed} -i '1s,/usr/bin/env python3$,%{__python3},' \
127 data/tools/{GUI.pyw,about_cfg_to_wiki,addon_manager/__init__.py,addon_manager/html.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/version.py,wesnoth/wescamp.py,wesnoth/wmliterator3.py,wesnoth/wmlparser3.py,wesnoth/wmltools3.py,trackviewer.pyw,wesnoth_addon_manager,wmlflip,wmlindent,wmllint,wmllint-1.4,wmlscope,wmlunits,wmlxgettext,tmx_trackplacer,wesnoth/wmldata.py,wesnoth/trackplacer3/datatypes.py,wesnoth/wmlparser.py,expand-terrain-macros.py}
128
129%build
130install -d build
131cd build
132# override *FLAGS to remove -DNDEBUG (wesnoth depends on asserts)
133CFLAGS="%{rpmcflags}"
134CXXFLAGS="%{rpmcxxflags}"
135%cmake .. \
136 -DENABLE_STRICT_COMPILATION=OFF \
137 -DBINDIR="%{_bindir}" \
138 -DMANDIR="%{_mandir}" \
139 -DLOCALEDIR="%{_localedir}" \
140 %{!?with_server:-DENABLE_SERVER=OFF} \
141 %{?with_server:-DENABLE_CAMPAIGN_SERVER=ON}
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%{_mandir}/{ca_ES@valencia,ca@valencia}
167
168# unsupported(?)
169%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{ang@latin,grc,racv}
170%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavian
171%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavianlatin
172
173# the same as manuals from %{_mandir}/man?
174%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/en_GB
175
176# remove HighContrast icon
177%{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/HighContrast/scalable/apps/wesnoth-icon.svg
178
179%find_lang %{name} --all-name
180
181%clean
182rm -rf $RPM_BUILD_ROOT
183
184%post
185%update_desktop_database
186%update_icon_cache hicolor
187
188%postun
189%update_desktop_database
190%update_icon_cache hicolor
191
192%pre server
193%groupadd -P %{name}-server -g 178 wesnothd
194%useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
195
196%post server
197/sbin/chkconfig --add wesnothd
198%service wesnothd restart
199%systemd_post wesnothd.service
200
201%preun server
202if [ "$1" = "0" ]; then
203 %service wesnothd stop
204 /sbin/chkconfig --del wesnothd
205fi
206%systemd_preun wesnothd.service
207
208%postun server
209if [ "$1" = "0" ]; then
210 %userremove wesnothd
211 %groupremove wesnothd
212fi
213%systemd_reload
214
215%files -f %{name}.lang
216%defattr(644,root,root,755)
217%doc README.md changelog.md
218%doc %{_docdir}/%{name}
219%attr(755,root,root) %{_bindir}/wesnoth
220%{_mandir}/man6/wesnoth.6*
221%lang(ca) %{_mandir}/ca/man6/wesnoth.6*
222%lang(cs) %{_mandir}/cs/man6/wesnoth.6*
223%lang(de) %{_mandir}/de/man6/wesnoth.6*
224%lang(es) %{_mandir}/es/man6/wesnoth.6*
225%lang(fr) %{_mandir}/fr/man6/wesnoth.6*
226%lang(hu) %{_mandir}/hu/man6/wesnoth.6*
227%lang(it) %{_mandir}/it/man6/wesnoth.6*
228%lang(ja) %{_mandir}/ja/man6/wesnoth.6*
229%lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth.6*
230%lang(ru) %{_mandir}/ru/man6/wesnoth.6*
231%lang(tr) %{_mandir}/tr/man6/wesnoth.6*
232%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
233%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
234%{_desktopdir}/org.wesnoth.Wesnoth.desktop
235%{_iconsdir}/hicolor/*x*/apps/wesnoth-icon.png
236%{_datadir}/metainfo/org.wesnoth.Wesnoth.appdata.xml
237
238%if %{with server}
239%files server
240%defattr(644,root,root,755)
241%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
242%attr(755,root,root) %{_bindir}/campaignd
243%attr(755,root,root) %{_bindir}/wesnothd
244%attr(754,root,root) /etc/rc.d/init.d/wesnothd
245%attr(644,root,root) %{systemdunitdir}/wesnothd.service
246%{_mandir}/man6/wesnothd.6*
247%lang(ca) %{_mandir}/ca/man6/wesnothd.6*
248%lang(cs) %{_mandir}/cs/man6/wesnothd.6*
249%lang(de) %{_mandir}/de/man6/wesnothd.6*
250%lang(es) %{_mandir}/es/man6/wesnothd.6*
251%lang(fr) %{_mandir}/fr/man6/wesnothd.6*
252%lang(gl) %{_mandir}/gl/man6/wesnothd.6*
253%lang(hu) %{_mandir}/hu/man6/wesnothd.6*
254%lang(it) %{_mandir}/it/man6/wesnothd.6*
255%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
256%lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
257%lang(ru) %{_mandir}/ru/man6/wesnothd.6*
258%lang(tr) %{_mandir}/tr/man6/wesnothd.6*
259%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
260%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
261%attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
262%{systemdtmpfilesdir}/%{name}.conf
263%endif
264
265%files data
266%defattr(644,root,root,755)
267%{_datadir}/%{name}
This page took 0.032191 seconds and 4 git commands to generate.