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

Revision 2529, 15.6 KB checked in by owa, 13 years ago (diff)

rebuilt with libboost-1.45.0

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