]> git.pld-linux.org Git - packages/wesnoth.git/blame - wesnoth.spec
- fixing wesnothd.service location
[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
e579b435 7%bcond_without fribidi # without Bidirectional language support
eb718a6d 8
dad9a32e 9Summary: Strategy game with a fantasy theme
d78dbe99 10Summary(hu.UTF-8): Fantasy környezetben játszódó stratégiai játék
2bf53405 11Summary(pl.UTF-8): Gra strategiczna z motywem fantasy
dad9a32e 12Name: wesnoth
47449d91 13Version: 1.14.15
2bf53405 14Release: 1
d31a0af5 15Epoch: 1
482a922c 16License: GPL v2+
dad9a32e 17Group: X11/Applications/Games/Strategy
d7602b85 18Source0: http://downloads.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2
47449d91 19# Source0-md5: f3149cf74ae55c490739494c45179fa7
3647514b 20Source1: %{name}d.init
0e4bc507 21Source2: %{name}.tmpfiles
47449d91
KM
22Source3: %{name}.sysconfig
23Source4: %{name}d.service
4d5620e7 24URL: http://www.wesnoth.org/
47449d91
KM
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
309b98f8 33BuildRequires: dbus-devel
2bf53405 34BuildRequires: fontconfig-devel >= 2.4.1
e579b435 35%{?with_fribidi:BuildRequires: fribidi-devel}
b7f10e01 36BuildRequires: gettext-tools
47449d91 37BuildRequires: libicu-devel
759b9d08 38BuildRequires: libpng-devel
6ac5e90b 39BuildRequires: libstdc++-devel
47449d91
KM
40BuildRequires: libvorbis-devel
41BuildRequires: openssl-devel
42BuildRequires: pango-devel >= 1:1.22.0
c94bb8a1 43BuildRequires: pkgconfig
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
dad9a32e 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
d78dbe99 68%description -l hu.UTF-8
a60f6f21 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.
d78dbe99 75
7840b0fd 76%description -l pl.UTF-8
a60f6f21 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.
dad9a32e 82
dad9a32e 83%package server
84Summary: Network server for Wesnoth
717cee4c 85Summary(hu.UTF-8): Hálózati szerver Wesnoth-hoz
157e8e1f 86Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
dad9a32e 87Group: X11/Applications/Games/Strategy
392ee82f 88Requires(post,preun): /sbin/chkconfig
40b36f90
JK
89Requires(postun): /usr/sbin/groupdel
90Requires(postun): /usr/sbin/userdel
91Requires(pre): /usr/sbin/groupadd
92Requires(pre): /usr/sbin/useradd
759b9d08 93Requires: rc-scripts >= 0.4.0.17
745d3686
ER
94Provides: group(wesnothd)
95Provides: user(wesnothd)
dad9a32e 96
97%description server
98Server for playing networked games of Wesnoth.
99
d78dbe99
ZU
100%description server -l hu.UTF-8
101Szerver a Wesnoth hálózati játékához.
102
7840b0fd 103%description server -l pl.UTF-8
dad9a32e 104Serwer do prowadzenia sieciowych gier Wesnoth.
dad9a32e 105
eb718a6d 106%package data
2bf53405
JB
107Summary: Strategy game with a fantasy theme - data files
108Summary(pl.UTF-8): Gra strategiczna z motywem fantasy - pliki danych
eb718a6d 109Group: Applications/Games
2bf53405 110%if "%{_rpmversion}" >= "4.6"
eb718a6d
ER
111BuildArch: noarch
112%endif
113
114%description data
115This package contains the data files for Wesnoth.
116
2bf53405
JB
117%description data -l pl.UTF-8
118Ten pakiet zawiera pliki danych dla gry Wesnoth.
119
dad9a32e 120%prep
b5dcf87b 121%setup -q
d7602b85 122
123# don't install locales in %{_datadir}/%{name}
d94078df 124%{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt
dad9a32e 125
47449d91
KM
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,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}
128%{__sed} -i '1s,/usr/bin/env python2$,%{__python},' \
129 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}
2bf53405 130
dad9a32e 131%build
d7602b85 132install -d build
133cd build
d94078df 134%cmake \
135 .. \
47449d91 136 -DCMAKE_BUILD_TYPE="Release" \
d7602b85 137 -DENABLE_STRICT_COMPILATION="off" \
138 -DBINDIR="%{_bindir}" \
139 -DMANDIR="%{_mandir}" \
eb718a6d 140 -DLOCALEDIR="%{_localedir}" \
d7602b85 141 %{!?with_server:-DENABLE_SERVER="off"} \
142 %{?with_server:-DENABLE_CAMPAIGN_SERVER="on"} \
d94078df 143 %{!?with_fribidi:-DENABLE_FRIBIDI="off"}
d7602b85 144
dad9a32e 145%{__make}
146
147%install
148rm -rf $RPM_BUILD_ROOT
47449d91
KM
149install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,/etc/sysconfig} \
150 $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{_docdir}/%{name}-%{version}} \
758a0e57 151 $RPM_BUILD_ROOT%{systemdunitdir}
dad9a32e 152
d7602b85 153%{__make} -C build install \
dad9a32e 154 DESTDIR=$RPM_BUILD_ROOT
155
d22c6766 156%if %{with server}
eb718a6d
ER
157cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
158cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
47449d91 159cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/wesnoth
758a0e57 160cp -p %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/wesnothd.service
d22c6766 161%endif
dad9a32e 162
47449d91
KM
163%{__mv} $RPM_BUILD_ROOT%{_docdir}/html $RPM_BUILD_ROOT%{_docdir}/%{name}
164
2bf53405
JB
165# unify
166%{__mv} $RPM_BUILD_ROOT%{_localedir}/{ca_ES@valencia,ca@valencia}
167%{__mv} $RPM_BUILD_ROOT%{_localedir}/{nb_NO,nb}
168%{__mv} $RPM_BUILD_ROOT%{_localedir}/{fur_IT,fur}
169%{__mv} $RPM_BUILD_ROOT%{_mandir}/{ca_ES@valencia,ca@valencia}
c12ea96c 170
d94078df 171# unsupported(?)
eb718a6d 172%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/ang@latin
eb718a6d 173%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/racv
62daf2b6 174%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavian
175%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/sr@ijekavianlatin
c12ea96c
MB
176
177# the same as manuals from %{_mandir}/man?
729e3de3 178%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/en_GB
c12ea96c 179
5105ea28 180%find_lang %{name} --all-name
181
dad9a32e 182%clean
183rm -rf $RPM_BUILD_ROOT
184
47449d91
KM
185%post
186%update_desktop_database
187%update_icon_cache hicolor
188
189%postun
190%update_desktop_database
191%update_icon_cache hicolor
192
40b36f90
JK
193%pre server
194%groupadd -P %{name}-server -g 178 wesnothd
195%useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
196
3fdd0ea2 197%post server
198/sbin/chkconfig --add wesnothd
c12ea96c 199%service wesnothd restart
47449d91 200%systemd_post wesnothd.service
3fdd0ea2 201
202%preun server
203if [ "$1" = "0" ]; then
c12ea96c 204 %service wesnothd stop
47449d91
KM
205fi
206%systemd_preun wesnothd.service
207
208%postun server
209if [ "$1" = "0" ]; then
24e1b6fa 210 /sbin/chkconfig --del wesnothd
40b36f90
JK
211 %userremove wesnothd
212 %groupremove wesnothd
3fdd0ea2 213fi
47449d91 214%systemd_reload
3fdd0ea2 215
5105ea28 216%files -f %{name}.lang
dad9a32e 217%defattr(644,root,root,755)
47449d91 218#%doc README changelog
2bf53405 219%doc %{_docdir}/%{name}
dad9a32e 220%attr(755,root,root) %{_bindir}/wesnoth
0c6dc98e 221%{_mandir}/man6/wesnoth.6*
e579b435 222%lang(de) %{_mandir}/de/man6/wesnoth.6*
83629e31 223%lang(es) %{_mandir}/es/man6/wesnoth.6*
bdc2942c 224%lang(fr) %{_mandir}/fr/man6/wesnoth.6*
e579b435 225%lang(hu) %{_mandir}/hu/man6/wesnoth.6*
83629e31 226%lang(it) %{_mandir}/it/man6/wesnoth.6*
47449d91 227%lang(ja) %{_mandir}/ja/man6/wesnoth.6*
7d4eb852 228%lang(lt) %{_mandir}/lt/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*
2bf53405 234%{_desktopdir}/wesnoth.desktop
47449d91
KM
235%{_iconsdir}/hicolor/*x*/apps/wesnoth-icon.png
236%{_datadir}/metainfo/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*
e579b435 247%lang(cs) %{_mandir}/cs/man6/wesnothd.6*
e579b435 248%lang(de) %{_mandir}/de/man6/wesnothd.6*
249%lang(es) %{_mandir}/es/man6/wesnothd.6*
d3cada04 250%lang(et) %{_mandir}/et/man6/wesnothd.6*
d18a93b2 251%lang(fi) %{_mandir}/fi/man6/wesnothd.6*
bdc2942c 252%lang(fr) %{_mandir}/fr/man6/wesnothd.6*
d16f534c 253%lang(gl) %{_mandir}/gl/man6/wesnothd.6*
e579b435 254%lang(hu) %{_mandir}/hu/man6/wesnothd.6*
944acd9d 255%lang(id) %{_mandir}/id/man6/wesnothd.6*
e579b435 256%lang(it) %{_mandir}/it/man6/wesnothd.6*
d7602b85 257%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
d22c6766 258%lang(lt) %{_mandir}/lt/man6/wesnothd.6*
e579b435 259%lang(pl) %{_mandir}/pl/man6/wesnothd.6*
2bf53405 260%lang(pt) %{_mandir}/pt/man6/wesnothd.6*
d7602b85 261%lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
83629e31 262%lang(ru) %{_mandir}/ru/man6/wesnothd.6*
d7602b85 263%lang(sk) %{_mandir}/sk/man6/wesnothd.6*
83629e31 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*
2bf53405
JB
267%lang(uk) %{_mandir}/uk/man6/wesnothd.6*
268%lang(vi) %{_mandir}/vi/man6/wesnothd.6*
83629e31 269%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
270%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnothd.6*
40b36f90 271%attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
eb718a6d 272%{systemdtmpfilesdir}/%{name}.conf
dad9a32e 273%endif
274
eb718a6d
ER
275%files data
276%defattr(644,root,root,755)
277%{_datadir}/%{name}
This page took 0.119492 seconds and 4 git commands to generate.