]> git.pld-linux.org Git - packages/wesnoth.git/blame - wesnoth.spec
- s/png12/png
[packages/wesnoth.git] / wesnoth.spec
CommitLineData
4f6ef9bb 1# TODO
d7602b85 2# - use desktop file included with project (consider which one are better)
f8498762 3# - unpackaged language files
d7602b85 4# - fix lacales (seems broken)
eb35425c 5# Conditional build
dad9a32e 6%bcond_without server # without server
b18d78c0 7%bcond_without tools # without tools
e579b435 8%bcond_without fribidi # without Bidirectional language support
dad9a32e 9#
10Summary: Strategy game with a fantasy theme
d78dbe99 11Summary(hu.UTF-8): Fantasy környezetben játszódó stratégiai játék
157e8e1f 12Summary(pl.UTF-8): Strategiczna gra z motywem fantasy
dad9a32e 13Name: wesnoth
d7602b85 14Version: 1.8
15Release: 0.1
d31a0af5 16Epoch: 1
482a922c 17License: GPL v2+
dad9a32e 18Group: X11/Applications/Games/Strategy
d7602b85 19Source0: http://downloads.sourceforge.net/wesnoth/%{name}-%{version}.tar.bz2
20# Source0-md5: 07e4b97512e307c54dcfd86659a61e41
3647514b 21Source1: %{name}d.init
d7602b85 22Patch0: %{name}-libpng.patch
23Patch1: %{name}-desktop.patch
4d5620e7 24URL: http://www.wesnoth.org/
ae1834b0 25BuildRequires: SDL-devel >= 1.2.7
dad9a32e 26BuildRequires: SDL_image-devel >= 1.2
27BuildRequires: SDL_mixer-devel >= 1.2
dad9a32e 28BuildRequires: SDL_net-devel >= 1.2
d22c6766 29BuildRequires: SDL_ttf-devel >= 2.0.8
d7602b85 30BuildRequires: asciidoc
e579b435 31BuildRequires: boost-devel >= 1.33
d7602b85 32BuildRequires: cmake >= 2.4
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
759b9d08 41BuildRequires: rpmbuild(macros) >= 1.268
d22c6766 42BuildRequires: sed >= 4.0
d7602b85 43BuildRequires: zlib-devel
717cee4c 44# sr@Latn vs. sr@latin
45Conflicts: glibc-misc < 6:2.7
dad9a32e 46BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48%description
49Battle for Wesnoth is a fantasy strategy game. Battle for control of
50villages, using variety of units which have advantages and
51disadvantages in different types of terrains and against different
52types of attacks. Units gain experience and advance levels, and are
53carried over from one scenario to the next campaign.
54
d78dbe99 55%description -l hu.UTF-8
a60f6f21 56Battle for Wesnoth (Harc Wesnothért) egy fantasy környezetben játszódó
57stratégiai játék. Harc a falvak megszerzéséért, különböző egységek
58felhasználásával, amelyeknek különböző előnyeik és hátrányaik vannak a
59különféle terepeken és a különböző támadási stílusok ellen. Az
60egységek tapasztalatot gyűjtenek, és fejlődnek, amelyek átvihetők a
61következő pályára.
d78dbe99 62
7840b0fd 63%description -l pl.UTF-8
a60f6f21 64Bitwa o Wesnoth jest strategiczną grą fantasy. Batalia o kontrolę nad
65wsiami przy pomocy różnego rodzaju oddziałów, które mają przewagę lub
66jej brak w odmiennym ukształtowaniu terenu i przeciwko różnym sposobom
67ataku. Oddziały zdobywają doświadczenie i poziomy zaawansowania i są
68przenoszone z jednej scenerii do następnej kampanii.
dad9a32e 69
dad9a32e 70%package server
71Summary: Network server for Wesnoth
717cee4c 72Summary(hu.UTF-8): Hálózati szerver Wesnoth-hoz
157e8e1f 73Summary(pl.UTF-8): Sieciowy serwer dla Wesnoth
dad9a32e 74Group: X11/Applications/Games/Strategy
392ee82f 75Requires(post,preun): /sbin/chkconfig
40b36f90
JK
76Requires(postun): /usr/sbin/groupdel
77Requires(postun): /usr/sbin/userdel
78Requires(pre): /usr/sbin/groupadd
79Requires(pre): /usr/sbin/useradd
759b9d08 80Requires: rc-scripts >= 0.4.0.17
717cee4c 81# sr@Latn vs. sr@latin
82Conflicts: glibc-misc < 6:2.7
dad9a32e 83
84%description server
85Server for playing networked games of Wesnoth.
86
d78dbe99
ZU
87%description server -l hu.UTF-8
88Szerver a Wesnoth hálózati játékához.
89
7840b0fd 90%description server -l pl.UTF-8
dad9a32e 91Serwer do prowadzenia sieciowych gier Wesnoth.
dad9a32e 92
dad9a32e 93%package tools
94Summary: Tools for Wesnoth
d78dbe99 95Summary(hu.UTF.8): Eszközök a Wesnoth-hoz
157e8e1f 96Summary(pl.UTF-8): Narzędzia dla Wesnoth
dad9a32e 97Group: X11/Applications/Games/Strategy
888b6155 98Requires: %{name} = %{epoch}:%{version}-%{release}
dad9a32e 99
100%description tools
101Map editor and translations tools.
102
d78dbe99
ZU
103%description tools -l hu.UTF-8
104Pályaszerkesztők és fordítási eszközök.
105
7840b0fd
JR
106%description tools -l pl.UTF-8
107Edytor map i narzędzia do tłumaczeń.
dad9a32e 108
109%prep
b5dcf87b 110%setup -q
6734084f 111%patch0 -p1
1c7a318b 112%patch1 -p1
d7602b85 113
114# don't install locales in %{_datadir}/%{name}
115%{__sed} -i 's,${DATADIR}/${LOCALEDIR},${LOCALEDIR},' CMakeLists.txt
976def71 116
117# link using libpng instead of libpng12
118%{__sed} -i 's,png12,png,' src/CMakeLists.txt
dad9a32e 119
120%build
d7602b85 121install -d build
122cd build
123%cmake .. \
124 -DCMAKE_BUILD_TYPE=%{!?debug:Release}%{?debug:Debug} \
125 -DCMAKE_INSTALL_PREFIX=%{_prefix} \
126 -DENABLE_STRICT_COMPILATION="off" \
127 -DBINDIR="%{_bindir}" \
128 -DMANDIR="%{_mandir}" \
129 -DLOCALEDIR="%{_datadir}/locale" \
130 %{!?with_server:-DENABLE_SERVER="off"} \
131 %{?with_server:-DENABLE_CAMPAIGN_SERVER="on"} \
132 %{!?with_tools:-DENABLE_EDITOR="off"} \
133 %{?with_tools:-DENABLE_TOOLS="on"} \
134 %{!?with_fribidi:-DENABLE_FRIBIDI="off"} \
135%if "%{_lib}" == "lib64"
136 -DLIB_SUFFIX=64
137%endif
138
dad9a32e 139%{__make}
140
141%install
142rm -rf $RPM_BUILD_ROOT
d31a0af5 143install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/var/run/wesnothd,/etc/rc.d/init.d,%{_docdir}/%{name}-%{version}}
dad9a32e 144
d7602b85 145%{__make} -C build install \
dad9a32e 146 DESTDIR=$RPM_BUILD_ROOT
147
8a64199f 148# install additional docs
149install changelog README $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
150gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/{changelog,README}
151
d22c6766 152%if %{with server}
3647514b 153install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/wesnothd
d22c6766 154%endif
dad9a32e 155
39784dd5 156mv -f $RPM_BUILD_ROOT%{_datadir}/locale/nb{_NO,}
157mv -f $RPM_BUILD_ROOT%{_datadir}/locale/fur{_IT,}
c12ea96c
MB
158
159# unsupported(?)
7d4eb852 160rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/ca_ES@valencia
c12ea96c 161rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/la
a60f6f21 162rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/racv
d7602b85 163rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/en@shaw
164rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/sr@ijekavian
7d4eb852 165rm -rf $RPM_BUILD_ROOT%{_mandir}/ca_ES@valencia
c12ea96c
MB
166
167# the same as manuals from %{_mandir}/man?
168rm -rf $RPM_BUILD_ROOT%{_mandir}/en_GB
169
5105ea28 170%find_lang %{name} --all-name
171
dad9a32e 172%clean
173rm -rf $RPM_BUILD_ROOT
174
40b36f90
JK
175%pre server
176%groupadd -P %{name}-server -g 178 wesnothd
177%useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
178
3fdd0ea2 179%post server
180/sbin/chkconfig --add wesnothd
c12ea96c 181%service wesnothd restart
3fdd0ea2 182
183%preun server
184if [ "$1" = "0" ]; then
c12ea96c 185 %service wesnothd stop
24e1b6fa 186 /sbin/chkconfig --del wesnothd
40b36f90
JK
187 %userremove wesnothd
188 %groupremove wesnothd
3fdd0ea2 189fi
190
5105ea28 191%files -f %{name}.lang
dad9a32e 192%defattr(644,root,root,755)
8a64199f 193%doc %{_docdir}/%{name}-%{version}
dad9a32e 194%attr(755,root,root) %{_bindir}/wesnoth
0c6dc98e 195%{_mandir}/man6/wesnoth.6*
d31a0af5 196%lang(cs) %{_mandir}/cs/man6/wesnoth.6*
e579b435 197%lang(de) %{_mandir}/de/man6/wesnoth.6*
198%lang(es) %{_mandir}/es/man6/wesnoth.6*
d3cada04 199%lang(et) %{_mandir}/et/man6/wesnoth.6*
d18a93b2 200%lang(fi) %{_mandir}/fi/man6/wesnoth.6*
bdc2942c 201%lang(fr) %{_mandir}/fr/man6/wesnoth.6*
7d4eb852 202%lang(gl) %{_mandir}/gl/man6/wesnoth.6*
e579b435 203%lang(hu) %{_mandir}/hu/man6/wesnoth.6*
126856ae 204%lang(it) %{_mandir}/it/man6/wesnoth.6*
d7602b85 205%lang(ja) %{_mandir}/ja/man6/wesnoth.6*
7d4eb852 206%lang(lt) %{_mandir}/lt/man6/wesnoth.6*
e579b435 207%lang(pl) %{_mandir}/pl/man6/wesnoth.6*
d7602b85 208%lang(pt_BR) %{_mandir}/pt_BR/man6/wesnoth.6*
5105ea28 209%lang(sk) %{_mandir}/sk/man6/wesnoth.6*
b5dcf87b 210%lang(sr) %{_mandir}/sr/man6/wesnoth.6*
d3cada04 211%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnoth.6*
7d4eb852 212%lang(tr) %{_mandir}/tr/man6/wesnoth.6*
e579b435 213%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnoth.6*
60249c9c 214%lang(zh_TW) %{_mandir}/zh_TW/man6/wesnoth.6*
0c6dc98e 215%{_datadir}/%{name}
3647514b 216%{_desktopdir}/*.desktop
217%{_pixmapsdir}/*-icon.png
dad9a32e 218
219%if %{with server}
220%files server
221%defattr(644,root,root,755)
d22c6766 222%attr(755,root,root) %{_bindir}/campaignd
dad9a32e 223%attr(755,root,root) %{_bindir}/wesnothd
3fdd0ea2 224%attr(754,root,root) /etc/rc.d/init.d/wesnothd
0c6dc98e 225%{_mandir}/man6/wesnothd.6*
e579b435 226%lang(cs) %{_mandir}/cs/man6/wesnothd.6*
e579b435 227%lang(de) %{_mandir}/de/man6/wesnothd.6*
228%lang(es) %{_mandir}/es/man6/wesnothd.6*
d3cada04 229%lang(et) %{_mandir}/et/man6/wesnothd.6*
d18a93b2 230%lang(fi) %{_mandir}/fi/man6/wesnothd.6*
bdc2942c 231%lang(fr) %{_mandir}/fr/man6/wesnothd.6*
e579b435 232%lang(hu) %{_mandir}/hu/man6/wesnothd.6*
233%lang(it) %{_mandir}/it/man6/wesnothd.6*
d7602b85 234%lang(ja) %{_mandir}/ja/man6/wesnothd.6*
d22c6766 235%lang(lt) %{_mandir}/lt/man6/wesnothd.6*
e579b435 236%lang(pl) %{_mandir}/pl/man6/wesnothd.6*
d7602b85 237%lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
238%lang(sk) %{_mandir}/sk/man6/wesnothd.6*
7d4eb852 239%lang(sr) %{_mandir}/sr/man6/wesnothd.6*
d3cada04 240%lang(sr@latin) %{_mandir}/sr@latin/man6/wesnothd.6*
7d4eb852 241%lang(tr) %{_mandir}/tr/man6/wesnothd.6*
e579b435 242%lang(zh_CN) %{_mandir}/zh_CN/man6/wesnothd.6*
40b36f90 243%attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
dad9a32e 244%endif
245
246%if %{with tools}
247%files tools
248%defattr(644,root,root,755)
027c8016 249%attr(755,root,root) %{_bindir}/cutter
250%attr(755,root,root) %{_bindir}/exploder
dad9a32e 251%endif
This page took 0.111669 seconds and 4 git commands to generate.