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