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

Revision 735, 15.2 KB checked in by iwaim, 14 years ago (diff)

update: wesnoth-1.8.0-2

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