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