]> git.pld-linux.org Git - packages/wesnoth.git/blame - wesnoth.spec
boost rebuild
[packages/wesnoth.git] / wesnoth.spec
CommitLineData
4f6ef9bb 1# TODO
2bf53405 2# - system lua?
f8498762 3# - unpackaged language files
d94078df 4#
eb35425c 5# Conditional build
dad9a32e 6%bcond_without server # without server
eb718a6d 7
dad9a32e 8Summary: Strategy game with a fantasy theme
d78dbe99 9Summary(hu.UTF-8): Fantasy környezetben játszódó stratégiai játék
2bf53405 10Summary(pl.UTF-8): Gra strategiczna z motywem fantasy
dad9a32e 11Name: wesnoth
176647f1 12Version: 1.16.8
d2a86cd8 13Release: 3
d31a0af5 14Epoch: 1
482a922c 15License: GPL v2+
dad9a32e 16Group: X11/Applications/Games/Strategy
d7602b85 17Source0: http://downloads.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2
176647f1 18# Source0-md5: d2c4e932651045e35c51d79b75579b0d
3647514b 19Source1: %{name}d.init
0e4bc507 20Source2: %{name}.tmpfiles
47449d91
KM
21Source3: %{name}.sysconfig
22Source4: %{name}d.service
e1af5098 23Patch0: gcc13.patch
4d5620e7 24URL: http://www.wesnoth.org/
c0edf37c
KM
25BuildRequires: SDL2-devel >= 2.0.8
26BuildRequires: SDL2_image-devel >= 2.0.2
47449d91 27BuildRequires: SDL2_mixer-devel >= 2.0.0
47449d91
KM
28BuildRequires: boost-devel >= 1.50.0
29BuildRequires: bzip2-devel
30BuildRequires: cairo-devel >= 1.10.0
5a7be3db 31BuildRequires: cmake >= 3.7
309b98f8 32BuildRequires: dbus-devel
2bf53405 33BuildRequires: fontconfig-devel >= 2.4.1
b7f10e01 34BuildRequires: gettext-tools
47449d91 35BuildRequires: libicu-devel
759b9d08 36BuildRequires: libpng-devel
938b933e 37BuildRequires: libstdc++-devel >= 6:4.7
47449d91 38BuildRequires: libvorbis-devel
938b933e 39BuildRequires: openssl-devel >= 1.0
47449d91 40BuildRequires: pango-devel >= 1:1.22.0
c94bb8a1 41BuildRequires: pkgconfig
938b933e
JB
42BuildRequires: readline-devel
43BuildRequires: rpm-build >= 4.6
f1cb8481 44BuildRequires: rpm-pythonprov
2bf53405 45BuildRequires: rpmbuild(macros) >= 1.605
d22c6766 46BuildRequires: sed >= 4.0
47449d91 47BuildRequires: systemd-devel
2bf53405
JB
48BuildRequires: xorg-lib-libICE-devel
49BuildRequires: xorg-lib-libSM-devel
50BuildRequires: xorg-lib-libX11-devel
51BuildRequires: xorg-lib-libXext-devel
d7602b85 52BuildRequires: zlib-devel
47449d91
KM
53Requires(post,postun): desktop-file-utils
54Requires(post,postun): gtk-update-icon-cache
eb718a6d 55Requires: %{name}-data = %{epoch}:%{version}
47449d91 56Requires: SDL2 >= 2.0.4
2bf53405 57Requires: fontconfig >= 2.4.1
47449d91 58Requires: pango >= 1:1.22.8
9cf45cc2 59Obsoletes: wesnoth-tools < 1:1.14
dad9a32e 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
d78dbe99 69%description -l hu.UTF-8
a60f6f21 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.
d78dbe99 76
7840b0fd 77%description -l pl.UTF-8
a60f6f21 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.
dad9a32e 83
dad9a32e 84%package server
85Summary: Network server for Wesnoth
717cee4c 86Summary(hu.UTF-8): Hálózati szerver Wesnoth-hoz
157e8e1f 87Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
dad9a32e 88Group: X11/Applications/Games/Strategy
392ee82f 89Requires(post,preun): /sbin/chkconfig
40b36f90
JK
90Requires(postun): /usr/sbin/groupdel
91Requires(postun): /usr/sbin/userdel
92Requires(pre): /usr/sbin/groupadd
93Requires(pre): /usr/sbin/useradd
759b9d08 94Requires: rc-scripts >= 0.4.0.17
745d3686
ER
95Provides: group(wesnothd)
96Provides: user(wesnothd)
dad9a32e 97
98%description server
99Server for playing networked games of Wesnoth.
100
d78dbe99
ZU
101%description server -l hu.UTF-8
102Szerver a Wesnoth hálózati játékához.
103
7840b0fd 104%description server -l pl.UTF-8
dad9a32e 105Serwer do prowadzenia sieciowych gier Wesnoth.
dad9a32e 106
eb718a6d 107%package data
2bf53405
JB
108Summary: Strategy game with a fantasy theme - data files
109Summary(pl.UTF-8): Gra strategiczna z motywem fantasy - pliki danych
eb718a6d 110Group: Applications/Games
eb718a6d 111BuildArch: noarch
eb718a6d
ER
112
113%description data
114This package contains the data files for Wesnoth.
115
2bf53405
JB
116%description data -l pl.UTF-8
117Ten pakiet zawiera pliki danych dla gry Wesnoth.
118
dad9a32e 119%prep
b5dcf87b 120%setup -q
e1af5098 121%patch0 -p1
d7602b85 122
123# don't install locales in %{_datadir}/%{name}
d94078df 124%{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt
dad9a32e 125
47449d91 126%{__sed} -i '1s,/usr/bin/env python3$,%{__python3},' \
5485e550 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}
2bf53405 128
dad9a32e 129%build
d7602b85 130install -d build
131cd build
e2caf64a
JB
132# override *FLAGS to remove -DNDEBUG (wesnoth depends on asserts)
133CFLAGS="%{rpmcflags}"
134CXXFLAGS="%{rpmcxxflags}"
135%cmake .. \
136 -DENABLE_STRICT_COMPILATION=OFF \
d7602b85 137 -DBINDIR="%{_bindir}" \
138 -DMANDIR="%{_mandir}" \
eb718a6d 139 -DLOCALEDIR="%{_localedir}" \
e2caf64a 140 %{!?with_server:-DENABLE_SERVER=OFF} \
c0edf37c 141 %{?with_server:-DENABLE_CAMPAIGN_SERVER=ON}
d7602b85 142
dad9a32e 143%{__make}
144
145%install
146rm -rf $RPM_BUILD_ROOT
47449d91
KM
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}} \
758a0e57 149 $RPM_BUILD_ROOT%{systemdunitdir}
dad9a32e 150
d7602b85 151%{__make} -C build install \
dad9a32e 152 DESTDIR=$RPM_BUILD_ROOT
153
d22c6766 154%if %{with server}
eb718a6d
ER
155cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
156cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
47449d91 157cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/wesnoth
758a0e57 158cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/wesnothd.service
d22c6766 159%endif
dad9a32e 160
47449d91
KM
161%{__mv} $RPM_BUILD_ROOT%{_docdir}/html $RPM_BUILD_ROOT%{_docdir}/%{name}
162
2bf53405
JB
163# unify
164%{__mv} $RPM_BUILD_ROOT%{_localedir}/{ca_ES@valencia,ca@valencia}
165%{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
2bf53405 166%{__mv} $RPM_BUILD_ROOT%{_mandir}/{ca_ES@valencia,ca@valencia}
c12ea96c 167
d94078df 168# unsupported(?)
c0edf37c 169%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{ang@latin,grc,racv}
62daf2b6 170%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavian
171%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavianlatin
c12ea96c
MB
172
173# the same as manuals from %{_mandir}/man?
729e3de3 174%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/en_GB
c12ea96c 175
c0edf37c
KM
176# remove HighContrast icon
177%{__rm} -r $RPM_BUILD_ROOT%{_iconsdir}/HighContrast/scalable/apps/wesnoth-icon.svg
178
5105ea28 179%find_lang %{name} --all-name
180
dad9a32e 181%clean
182rm -rf $RPM_BUILD_ROOT
183
47449d91
KM
184%post
185%update_desktop_database
186%update_icon_cache hicolor
187
188%postun
189%update_desktop_database
190%update_icon_cache hicolor
191
40b36f90
JK
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
3fdd0ea2 196%post server
197/sbin/chkconfig --add wesnothd
c12ea96c 198%service wesnothd restart
47449d91 199%systemd_post wesnothd.service
3fdd0ea2 200
201%preun server
202if [ "$1" = "0" ]; then
c12ea96c 203 %service wesnothd stop
f721f6e1 204 /sbin/chkconfig --del wesnothd
47449d91
KM
205fi
206%systemd_preun wesnothd.service
207
208%postun server
209if [ "$1" = "0" ]; then
40b36f90
JK
210 %userremove wesnothd
211 %groupremove wesnothd
3fdd0ea2 212fi
47449d91 213%systemd_reload
3fdd0ea2 214
5105ea28 215%files -f %{name}.lang
dad9a32e 216%defattr(644,root,root,755)
5dd60c45 217%doc README.md changelog.md
2bf53405 218%doc %{_docdir}/%{name}
dad9a32e 219%attr(755,root,root) %{_bindir}/wesnoth
0c6dc98e 220%{_mandir}/man6/wesnoth.6*
78fe2aaa 221%lang(ca) %{_mandir}/ca/man6/wesnoth.6*
ddf0e6ee 222%lang(cs) %{_mandir}/cs/man6/wesnoth.6*
e579b435 223%lang(de) %{_mandir}/de/man6/wesnoth.6*
83629e31 224%lang(es) %{_mandir}/es/man6/wesnoth.6*
bdc2942c 225%lang(fr) %{_mandir}/fr/man6/wesnoth.6*
e579b435 226%lang(hu) %{_mandir}/hu/man6/wesnoth.6*
83629e31 227%lang(it) %{_mandir}/it/man6/wesnoth.6*
47449d91 228%lang(ja) %{_mandir}/ja/man6/wesnoth.6*
47449d91 229%lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth.6*
83629e31 230%lang(ru) %{_mandir}/ru/man6/wesnoth.6*
47449d91 231%lang(tr) %{_mandir}/tr/man6/wesnoth.6*
83629e31 232%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
233%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
c0edf37c 234%{_desktopdir}/org.wesnoth.Wesnoth.desktop
47449d91 235%{_iconsdir}/hicolor/*x*/apps/wesnoth-icon.png
c0edf37c 236%{_datadir}/metainfo/org.wesnoth.Wesnoth.appdata.xml
dad9a32e 237
238%if %{with server}
239%files server
240%defattr(644,root,root,755)
47449d91 241%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
d22c6766 242%attr(755,root,root) %{_bindir}/campaignd
dad9a32e 243%attr(755,root,root) %{_bindir}/wesnothd
3fdd0ea2 244%attr(754,root,root) /etc/rc.d/init.d/wesnothd
758a0e57 245%attr(644,root,root) %{systemdunitdir}/wesnothd.service
0c6dc98e 246%{_mandir}/man6/wesnothd.6*
78fe2aaa 247%lang(ca) %{_mandir}/ca/man6/wesnothd.6*
e579b435 248%lang(cs) %{_mandir}/cs/man6/wesnothd.6*
e579b435 249%lang(de) %{_mandir}/de/man6/wesnothd.6*
250%lang(es) %{_mandir}/es/man6/wesnothd.6*
bdc2942c 251%lang(fr) %{_mandir}/fr/man6/wesnothd.6*
d16f534c 252%lang(gl) %{_mandir}/gl/man6/wesnothd.6*
e579b435 253%lang(hu) %{_mandir}/hu/man6/wesnothd.6*
254%lang(it) %{_mandir}/it/man6/wesnothd.6*
d7602b85 255%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
d7602b85 256%lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
83629e31 257%lang(ru) %{_mandir}/ru/man6/wesnothd.6*
83629e31 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*
40b36f90 261%attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
eb718a6d 262%{systemdtmpfilesdir}/%{name}.conf
dad9a32e 263%endif
264
eb718a6d
ER
265%files data
266%defattr(644,root,root,755)
267%{_datadir}/%{name}
This page took 0.520978 seconds and 4 git commands to generate.