source: projects/specs/trunk/w/wesnoth/wesnoth-vl.spec @ 521

Revision 521, 13.1 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

Line 
1%define with_editor 0
2%define with_tools 0
3%define with_campaignd 0
4%define with_wesnothd 0
5
6Summary: Fantasy Turn-Based Strategy Game
7Summary(ja):  ターンベースのファンタジー戦略シミュレーションゲーム
8Name: wesnoth
9Version: 1.6.5
10Release: 2%{?_dist_release}
11Source0: %{name}-%{version}.tar.bz2
12Source1: wesnothd.init
13Source2: %{name}.sysconfig
14
15%{?nosrc:NoSource: 0}
16
17License: GPLv2+
18Group: Applications/Games
19URL: http://www.wesnoth.org/
20
21Distribution: Vine Linux
22Vendor:       Project Vine
23Packager:     munepi
24
25Requires: xorg-x11-libs SDL SDL_image SDL_mixer SDL_net SDL_ttf
26Requires: freetype2 libpng zlib pango fontconfig
27Requires: libboost-iostreams libboost-regex
28%if %{?_dist_release} == "vl5" || %{?_dist_release} == "vl6"
29Requires: TrueType-vlgothic
30%endif
31%if %{?_dist_release} == "vl4"
32Requires: TrueType-sazanami
33%endif
34BuildRequires: desktop-file-utils
35BuildRequires: ImageMagick
36BuildRequires: xorg-x11-devel SDL-devel SDL_image-devel SDL_mixer-devel
37BuildRequires: SDL_net-devel SDL_ttf-devel
38BuildRequires: freetype2-devel libpng-devel zlib-devel pango-devel
39BuildRequires: fontconfig-devel
40BuildRequires: libboost-devel libboost-iostreams libboost-regex
41#BuildRequires: fribidi-devel
42#BuildRequires: python-devel
43BuildRoot: %{_tmppath}/%{name}-%{version}-root
44
45%description
46Battle for Wesnoth is a fantasy turn-based strategy game. Battle for
47control of villages, using variety of units which have advantages and
48disadvantages in different types of terrains and against different
49types of attacks. Units gain experience and advance levels, and are
50carried over from one scenario to the next campaign.
51
52%description -l ja
53Battle for Wesnoth はターンベースの戦略シミュレーションゲームです.
54異なる地形や攻撃のタイプに対して,長所と短所をもつ多種のユニットを使用
55しながら,村々の支配のために戦います.ユニットは経験を得てレベルアップ
56して,シナリオから次のキャンペーンまで連れて行かれます.
57
58%if %{with_editor}
59%package editor
60Group: Applications/Games
61Summary: The Battle of Wesnoth map editor.
62Summary(ja): The Battle of Wesnoth マップエディタ
63Requires: wesnoth = %{version}-%{release}
64
65%description editor
66Battle for Wesnoth is a fantasy turn-based strategy game.
67This package contains the map editor for it.
68
69%description editor -l ja
70Battle for Wesnoth はターンベースの戦略シミュレーションゲームです.
71このパッケージには,そのマップエディタが入っています.
72%endif
73
74%if %{with_tools}
75%package tools
76Group: Applications/Games
77Summary: The Battle of Wesnoth tools.
78Summary(ja): The Battle of Wesnoth ツール
79Requires: wesnoth = %{version}-%{release}
80
81%description tools
82Battle for Wesnoth is a fantasy turn-based strategy game.
83This package includes tools for translators and artists working on
84Battle for Wesnoth.
85
86%description tools -l ja
87Battle for Wesnoth はターンベースの戦略シミュレーションゲームです.
88このパッケージには,Battle for Wesnoth で作業されている
89翻訳者やアーティストへのツールが含まれています.
90%endif
91
92%if %{with_campaignd}
93%package campaign-server
94Summary: The Battle of Wesnoth campaign server.
95Summary(ja): The Battle of Wesnoth キャンペーンサーバ
96Requires: wesnoth = %{version}-%{release}
97
98%description campaign-server
99Battle for Wesnoth is a fantasy turn-based strategy game.
100The campaign server acts as a simple download server, much like ftp, to
101provide a collection of Wesnoth campaigns to players.
102
103%description campaign-server -l ja
104Battle for Wesnoth はターンベースの戦略シミュレーションゲームです.
105このキャンペーンサーバーは,プレーヤーたちに Wesnoth キャンペーンの
106コレクションを提供するために,FTP のような簡易なダウンロードサーバとして
107動作します.
108%endif
109
110%if %{with_wesnothd}
111%package server
112Group: Applications/Games
113Summary: The Battle of Wesnoth game server.
114Summary(ja): The Battle of Wesnoth ゲームサーバ
115Requires: wesnoth = %{version}-%{release}
116Requires(post): /sbin/chkconfig
117Requires(preun): /sbin/chkconfig
118Requires(pre): /usr/sbin/useradd
119
120%description server
121Battle for Wesnoth is a fantasy turn-based strategy game.
122This package contains the wesnothd server needed to play networked games.
123
124%description server -l ja
125Battle for Wesnoth はターンベースの戦略シミュレーションゲームです.
126このパッケージには,ネットワークゲームのプレイに必要とされるwesnothdサー
127バが入っています.
128%endif
129
130
131%prep
132%__rm -rf ${RPM_BUILD_ROOT}
133
134%setup -q
135
136%build
137export CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"
138%configure \
139    --disable-dependency-tracking \
140%if %{with_editor}
141    --enable-editor \
142%endif
143%if %{with_tools}
144    --enable-tools \
145%endif
146%if %{with_campaignd}
147    --enable-campaign-server \
148%endif
149%if %{with_wesnothd}
150    --enable-server=yes \
151    --with-fifodir=/var/run/wesnothd \
152    --with-server-gid=root \
153    --with-server-uid=root \
154%else
155    --enable-server=no \
156%endif
157    --with-localedir=%{_datadir}/locale \
158        ;
159   
160%{__make}
161
162
163%install
164%{__rm} -rf ${RPM_BUILD_ROOT}
165%{__make} DESTDIR=${RPM_BUILD_ROOT} install
166
167### link sazanami-gothic.ttf
168pushd ${RPM_BUILD_ROOT}%{_datadir}/%{name}/fonts/
169## for 1.2.7 or higher (contains sazanami-gothic.ttf)
170#%{__rm} -f sazanami-gothic.ttf
171## for 1.6a or higher (NOT contains sazanami-gothic.ttf)
172%{__rm} -f wqy-zenhei.ttc
173
174%if %{?_dist_release} == "vl5" || %{?_dist_release} == "vl6"
175#ln -s /usr/share/fonts/TrueType-sazanami-gothic/sazanami-gothic.ttf .
176ln -s /usr/share/fonts/TrueType-vlgothic/VL-PGothic-Regular.ttf sazanami-gothic.ttf
177%endif
178%if %{?_dist_release} == "vl4"
179ln -s /usr/X11R6/lib/X11/fonts/TrueType/sazanami-gothic.ttf .
180%endif
181popd
182
183### for Gnome menu
184%__mkdir_p $RPM_BUILD_ROOT/%{_datadir}/pixmaps
185%__sed -i -e 's/^Version=.*$//' \
186       -e 's/^Icon=wesnoth-icon\.png/Icon=wesnoth-icon/' \
187    icons/%{name}.desktop
188desktop-file-install \
189    --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
190    --mode="0644" --vendor vine \
191    icons/%{name}.desktop
192#%__install -m 644 icons/%{name}-icon.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps
193for size in 16x16 20x20 22x22 24x24 32x32 36x36 64x64 48x48 64x64 72x72 96x96 128x128 192x192 ; do
194    %__mkdir_p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${size}/apps
195    convert icons/%{name}-icon.png -size ${size} \
196        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${size}/apps/%{name}-icon.png
197done
198%if %{with_editor}
199desktop-file-install \
200    --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
201    --mode="0644" --vendor vine \
202    icons/%{name}_editor.desktop
203%__install -m 644 icons/%{name}_editor-icon.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps
204%endif
205
206### rename for tools
207%if %{with_tools}
208pushd ${RPM_BUILD_ROOT}%{_bindir}/
209mv cutter %{name}_cutter
210mv exploder %{name}_exploder
211popd
212%endif
213
214### for wesnothd server
215%if %{with_wesnothd}
216mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
217mv ${RPM_BUILD_ROOT}%{_bindir}/wesnothd ${RPM_BUILD_ROOT}%{_sbindir}
218mkdir -p ${RPM_BUILD_ROOT}/var/run/wesnothd
219touch ${RPM_BUILD_ROOT}/var/run/wesnothd/socket
220install -Dpm 755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_initrddir}/wesnothd
221install -Dpm 644 %{SOURCE2} ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/wesnoth
222%endif
223
224
225### remove unpackage files
226%if !%{with_editor}
227%{__rm} -f ${RPM_BUILD_ROOT}%{_datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-editor.mo
228%endif
229
230find $RPM_BUILD_ROOT -name ".cvs*" | xargs rm -f
231find $RPM_BUILD_ROOT -name "CVS" | xargs rm -rf
232
233%{__rm} -rf $RPM_BUILD_ROOT/usr/share/doc/wesnoth/
234%{__rm} -f $RPM_BUILD_ROOT/usr/share/icons/wesnoth-icon.png \
235    $RPM_BUILD_ROOT/usr/share/pixmaps/wesnoth-icon.png \
236    $RPM_BUILD_ROOT/usr/share/icons/wesnoth_editor-icon.png
237%{__rm} -f $RPM_BUILD_ROOT/usr/share/applications/wesnoth*.desktop
238%if !%{with_wesnothd}
239%{__rm} -f $RPM_BUILD_ROOT/%{_mandir}/man6/wesnothd.*
240%{__rm} -f $RPM_BUILD_ROOT/%{_mandir}/*/man6/wesnothd.*
241%endif
242
243%find_lang %{name} --all-name
244
245%clean
246%{__rm} -rf ${RPM_BUILD_ROOT}
247
248
249%post
250touch --no-create %{_datadir}/icons/hicolor || :
251if [ -x %{_bindir}/gtk-update-icon-cache ]; then
252   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
253fi
254%{_bindir}/update-desktop-database %{_datadir}/applications || :
255
256%postun
257%{_bindir}/update-desktop-database %{_datadir}/applications || :
258touch --no-create %{_datadir}/icons/hicolor || :
259if [ -x %{_bindir}/gtk-update-icon-cache ]; then
260  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
261fi
262
263%if %{with_wesnothd}
264%pre server
265/usr/sbin/useradd -c "Wesnoth server" -s /sbin/nologin \
266        -r -d /var/run/wesnothd wesnothd 2> /dev/null || :
267
268%post server
269/sbin/chkconfig --add wesnothd
270if [ $1 -gt 1 ]; then
271    %{_initrddir}/wesnothd try-restart >/dev/null || :
272fi
273
274%preun server
275if [ $1 -eq 0 ]; then
276    %{_initrddir}/wesnothd stop >/dev/null 2>&1 || :
277    /sbin/chkconfig --del wesnothd
278fi
279%endif
280
281
282%files -f %{name}.lang
283%defattr(-,root,root)
284%doc COPYING INSTALL README changelog copyright doc/manual/
285%{_bindir}/%{name}
286%{_mandir}/man6/wesnoth.*
287%{_mandir}/*/man6/wesnoth.*
288%{_datadir}/%{name}
289%{_datadir}/applications/vine-wesnoth.desktop
290#%{_datadir}/pixmaps/wesnoth-icon.png
291%{_datadir}/icons/hicolor/*/apps/*.png
292
293%if %{with_editor}
294%files editor
295%defattr(-,root,root)
296%{_bindir}/wesnoth_editor
297%{_mandir}/man6/wesnoth_editor.*
298%{_mandir}/*/man6/wesnoth_editor.*
299%{_datadir}/wesnoth/translations/*/LC_MESSAGES/wesnoth-editor.mo
300%{_datadir}/applications/vine-wesnoth_editor.desktop
301%endif
302
303%if %{with_tools}
304%files tools
305%defattr(-,root,root)
306#%{_bindir}/cutter
307#%{_bindir}/exploder
308%{_bindir}/wesnoth_cutter
309%{_bindir}/wesnoth_exploder
310%endif
311
312%if %{with_campaignd}
313%files campaign-server
314%defattr(-,root,root)
315%{_bindir}/campaignd
316%endif
317
318%if %{with_wesnothd}
319%files server
320%defattr(-,root,root)
321%config %{_initrddir}/wesnothd
322%config(noreplace) %{_sysconfdir}/sysconfig/wesnoth
323#%{_bindir}/wesnothd
324%{_sbindir}/wesnothd
325%{_mandir}/man6/wesnothd.*
326%{_mandir}/*/man6/wesnothd.*
327%attr(0700,wesnothd,wesnothd) %dir /var/run/wesnothd/
328%ghost /var/run/wesnothd/socket
329%endif
330
331
332%changelog
333* Mon Feb 08 2010 Shu KONNO <owa@bg.wakwak.com> 1.6.5-2
334- rebuilt with new toolchain and libboost-1.42.0
335
336* Fri Sep 11 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.6.5-1
337- new upstream release
338- added BuildRequires:
339  - desktop-file-utils
340  - ImageMagick
341
342* Wed Jul 22 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.6.4-1
343- new upstream release
344
345* Wed Jul  8 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.6.3-2
346- fix enable-server bits
347  - specify --enable-server=no when with_wesnothd is NOT set)
348  - fix install section
349
350* Fri Jul 03 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.3-1
351- new upstream release
352
353* Sun May 17 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.2-1
354- new upstream release
355
356* Fri May 08 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.1-1
357- new upstream release
358
359* Mon Mar 23 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6a-1
360- new upstream release
361- added BuildRequires: libboost-regex
362- added Requires:
363  - libboost-regex
364  - TrueType-vlgothic for vl5
365- dropped BuildRequires: TrueType-sazanami
366- dropped wesnoth-1.2.8-gcc43.patch
367- added configure options:
368  - --disable-dependency-tracking
369  - --with-localedir=%%{_datadir}/locale
370- removed wqy-zenhei.ttc
371  because wqy-zenhei.ttc affected sazanami-gothic.ttf badly
372- added update-desktop-database process in %%post and %%postun
373
374* Sat Jan 10 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.7-1
375- new upstream release
376
377* Sun Nov 16 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.6-1
378- new upstream release
379
380* Sun Nov 02 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.5-1
381- new upstream release
382- fixed License to GPLv2+
383- added BuildRequires: libboost-devel
384- added Requires: libboost-iostreams
385- dropped wesnoth.desktop, wesnoth.png, wesnoth-editor.desktop
386
387- apply wesnoth-1.2.8-gcc43.patch (from Fedora package)
388
389* Tue Oct 14 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.7-1vl5
390- applied new versioning policy, spec in utf-8
391
392* Wed Jan 02 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.7-0vl2
393- rebuilt for VineSeed
394
395* Mon Oct 23 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.7-0vl1
396- new upstream
397 - define with_editor 0, with_tools 0, with_campaignd 0, with_wesnothd 0
398 - drop wesnoth-server package
399 - arrange wesnothd server package files
400   [HELP] please test wesnoth-server, which change with_wesnothd to TRUE
401
402# * Tue Sep 4 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl3
403# - provide wesnoth-tools package
404# - drop wesnoth-server package
405# - arrange wesnothd server package files
406#   [HELP] please test wesnoth-server and wesnoth-campaign-server,
407#   which change with_wesnothd and with_campaignd to TRUE
408
409* Mon Sep 3 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl2
410- rebuild for VineSeed
411
412* Mon Sep 3 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl1
413- initial build for Vine Linux 4.1
414
415* Sun Apr 15 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.3-0vlmp1
416- new upstream for Vine Linux 4.1
417
418* Fri Jun 10 2005 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 0.9.2-0vlmp1
419- initial build for Vine Linux 3.2
420
421
422
423# end of file
Note: See TracBrowser for help on using the repository browser.