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

Revision 8034, 15.9 KB checked in by Takemikaduchi, 10 years ago (diff)

new upstream release or rebuild with libboost-1.54.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.10.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 0
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# http://sourceforge.jp/projects/wesnoth-ja/releases/?package_id=11460
32Source12: wesnoth-1.8.5_ja-catalogs-%{po_date}.zip
33
34%{?nosrc:NoSource: 0}
35
36License: GPLv2+
37Group: Applications/Games
38URL: http://www.wesnoth.org/
39
40Distribution: Vine Linux
41Vendor:       Project Vine
42Packager:     munepi, iwaim
43
44Requires: SDL SDL_image SDL_mixer SDL_net SDL_ttf
45Requires: freetype2 libpng zlib pango fontconfig
46Requires: libboost-iostreams libboost-regex
47Requires: TrueType-vlgothic
48BuildRequires: cmake >= 2.6.0
49BuildRequires: desktop-file-utils
50BuildRequires: ImageMagick
51BuildRequires: xorg-x11-devel SDL-devel SDL_image-devel SDL_mixer-devel
52BuildRequires: SDL_net-devel SDL_ttf-devel
53BuildRequires: freetype2-devel libpng-devel zlib-devel pango-devel
54BuildRequires: fontconfig-devel
55BuildRequires: libboost-devel >= 1.36
56BuildRequires: libboost-iostreams libboost-regex
57BuildRequires: libboost-serialization
58BuildRequires: libboost-program-options
59BuildRequires: libboost-system
60BuildRequires: libboost-thread
61BuildRequires: lua-devel
62#BuildRequires: fribidi-devel
63#BuildRequires: python-devel
64%if %{with_unofficial_po}
65BuildRequires: unzip
66%endif
67BuildRoot: %{_tmppath}/%{name}-%{version}-root
68
69Conflicts: wesnoth165
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%define japo_dir wesnoth-1.8.5ja-catalogs-%{po_date}
168%__unzip %{SOURCE12}
169
170pushd %{japo_dir}
171target=(
172        httt
173)
174for n in "${target[@]}"
175do
176%{__cp} -f wesnoth-%{version}_$n-%{po_date}_ja.po ../po/wesnoth-$n/ja.po
177done
178popd
179%endif
180
181%build
182export CFLAGS="%{optflags}" CXXFLAGS="%{optflags}"
183
184%__mkdir build
185pushd build
186%{cmake} \
187    -DLOCALEDIR=%{_localedir} \
188    -DENABLE_FRIBIDI:BOOL=OFF \
189    -DENABLE_GAME:BOOL=ON \
190    -DENABLE_DESKTOP_ENTRY:BOOL=ON \
191    -DENABLE_NOTIFICATIONS:BOOL=ON \
192%if %{with_editor}
193    --enable-editor \ # FIXME
194%endif
195%if %{with_tools}
196    -DENABLE_TOOLS:BOOL=ON
197%endif
198%if %{with_campaignd}
199    -DENABLE_CAMPAIGN_SERVER:BOOL=ON \
200%endif
201%if %{with_wesnothd}
202    -DENABLE_SERVER:BOOL=ON \
203    -DFIFO_DIR=/var/run/wesnothd \
204    -DSERVER_GID=root \
205    -DSERVER_UID=root \
206%else
207    -DENABLE_SERVER:BOOL=OFF \
208%endif
209    ..
210   
211%{__make}
212popd
213
214%install
215%{__rm} -rf ${RPM_BUILD_ROOT}
216pushd build
217%{__make} DESTDIR=${RPM_BUILD_ROOT} install
218
219### link sazanami-gothic.ttf
220pushd ${RPM_BUILD_ROOT}%{_datadir}/%{name}/fonts/
221## for 1.2.7 or higher (contains sazanami-gothic.ttf)
222#%{__rm} -f sazanami-gothic.ttf
223## for 1.6a or higher (NOT contains sazanami-gothic.ttf)
224%{__rm} -f wqy-zenhei.ttc
225
226ln -s /usr/share/fonts/TrueType-vlgothic/VL-PGothic-Regular.ttf sazanami-gothic.ttf
227ln -s /usr/share/fonts/TrueType-vlgothic/VL-Gothic-Regular.ttf wqy-zenhei.ttc
228popd
229
230### for Gnome menu
231%__mkdir_p $RPM_BUILD_ROOT/%{_datadir}/pixmaps
232
233desktop-file-install \
234    --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
235    --mode="0644" --vendor vine \
236    ../icons/%{name}.desktop
237#%__install -m 644 icons/%{name}-icon.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps
238for size in 16x16 20x20 22x22 24x24 32x32 36x36 64x64 48x48 64x64 72x72 96x96 128x128 192x192 ; do
239    %__mkdir_p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${size}/apps
240    convert ../icons/%{name}-icon.png -size ${size} \
241        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${size}/apps/%{name}-icon.png
242done
243%if %{with_editor}
244desktop-file-install \
245    --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
246    --mode="0644" --vendor vine \
247    ../icons/%{name}_editor.desktop
248%__install -m 644 icons/%{name}_editor-icon.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps
249%endif
250
251### rename for tools
252%if %{with_tools}
253pushd ${RPM_BUILD_ROOT}%{_bindir}/
254mv cutter %{name}_cutter
255mv exploder %{name}_exploder
256popd
257%endif
258
259### for wesnothd server
260%if %{with_wesnothd}
261mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
262mv ${RPM_BUILD_ROOT}%{_bindir}/wesnothd ${RPM_BUILD_ROOT}%{_sbindir}
263mkdir -p ${RPM_BUILD_ROOT}/var/run/wesnothd
264touch ${RPM_BUILD_ROOT}/var/run/wesnothd/socket
265install -Dpm 755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_initrddir}/wesnothd
266install -Dpm 644 %{SOURCE2} ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/wesnoth
267%endif
268
269
270### remove unpackage files
271%if !%{with_editor}
272%{__rm} -f ${RPM_BUILD_ROOT}%{_localedir}/*/LC_MESSAGES/wesnoth-editor.mo
273%endif
274
275find $RPM_BUILD_ROOT -name ".cvs*" | xargs rm -f
276find $RPM_BUILD_ROOT -name "CVS" | xargs rm -rf
277
278%{__rm} -rf $RPM_BUILD_ROOT/usr/share/doc/wesnoth/
279%{__rm} -f $RPM_BUILD_ROOT/usr/share/icons/wesnoth-icon.png \
280    $RPM_BUILD_ROOT/usr/share/pixmaps/wesnoth-icon.png \
281    $RPM_BUILD_ROOT/usr/share/icons/wesnoth_editor-icon.png
282%{__rm} -f $RPM_BUILD_ROOT/usr/share/applications/wesnoth*.desktop
283%if !%{with_wesnothd}
284%{__rm} -f $RPM_BUILD_ROOT/%{_mandir}/man6/wesnothd.*
285%{__rm} -f $RPM_BUILD_ROOT/%{_mandir}/*/man6/wesnothd.*
286%endif
287
288%find_lang %{name} --all-name
289
290popd
291
292%clean
293%{__rm} -rf ${RPM_BUILD_ROOT}
294
295
296%post
297touch --no-create %{_datadir}/icons/hicolor || :
298if [ -x %{_bindir}/gtk-update-icon-cache ]; then
299   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
300fi
301%{_bindir}/update-desktop-database %{_datadir}/applications || :
302
303%postun
304%{_bindir}/update-desktop-database %{_datadir}/applications || :
305touch --no-create %{_datadir}/icons/hicolor || :
306if [ -x %{_bindir}/gtk-update-icon-cache ]; then
307  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
308fi
309
310%if %{with_wesnothd}
311%pre server
312/usr/sbin/useradd -c "Wesnoth server" -s /sbin/nologin \
313        -r -d /var/run/wesnothd wesnothd 2> /dev/null || :
314
315%post server
316/sbin/chkconfig --add wesnothd
317if [ $1 -gt 1 ]; then
318    %{_initrddir}/wesnothd try-restart >/dev/null || :
319fi
320
321%preun server
322if [ $1 -eq 0 ]; then
323    %{_initrddir}/wesnothd stop >/dev/null 2>&1 || :
324    /sbin/chkconfig --del wesnothd
325fi
326%endif
327
328
329%files -f build/%{name}.lang
330%defattr(-,root,root)
331%doc COPYING INSTALL README changelog copyright doc/manual/
332%{_bindir}/%{name}
333%{_mandir}/man6/wesnoth.*
334%{_mandir}/*/man6/wesnoth.*
335%{_datadir}/%{name}
336%{_datadir}/applications/vine-wesnoth.desktop
337#%{_datadir}/pixmaps/wesnoth-icon.png
338%{_datadir}/icons/hicolor/*/apps/*.png
339
340%if %{with_editor}
341%files editor
342%defattr(-,root,root)
343%{_bindir}/wesnoth_editor
344%{_mandir}/man6/wesnoth_editor.*
345%{_mandir}/*/man6/wesnoth_editor.*
346%{_localedir}/*/LC_MESSAGES/wesnoth-editor.mo
347%{_datadir}/applications/vine-wesnoth_editor.desktop
348%endif
349
350%if %{with_tools}
351%files tools
352%defattr(-,root,root)
353#%{_bindir}/cutter
354#%{_bindir}/exploder
355%{_bindir}/wesnoth_cutter
356%{_bindir}/wesnoth_exploder
357%endif
358
359%if %{with_campaignd}
360%files campaign-server
361%defattr(-,root,root)
362%{_bindir}/campaignd
363%endif
364
365%if %{with_wesnothd}
366%files server
367%defattr(-,root,root)
368%config %{_initrddir}/wesnothd
369%config(noreplace) %{_sysconfdir}/sysconfig/wesnoth
370#%{_bindir}/wesnothd
371%{_sbindir}/wesnothd
372%{_mandir}/man6/wesnothd.*
373%{_mandir}/*/man6/wesnothd.*
374%attr(0700,wesnothd,wesnothd) %dir /var/run/wesnothd/
375%ghost /var/run/wesnothd/socket
376%endif
377
378
379%changelog
380* Mon Dec 09 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.5-2
381- rebuild with libboost-1.54.0
382
383* Fri Jan 11 2013 IWAI, Masaharu <iwai@alib.jp> 1.10.5-1
384- update to 1.10.5
385- update BR libboost version: 1.35 -> 1.36
386- add BuildRequires:
387  - libboost-serialization
388  - libboost-program-options
389  - libboost-system
390  - libboost-thread
391- using cmake
392- drop unnecessary script in install section
393  - fix desktop file script
394
395* Mon Sep  5 2011 IWAI, Masaharu <iwai@alib.jp> 1.8.6-2
396- drop Requires: xorg-x11-libs
397- drop unnecessary routine for Vine Linux 4
398
399* Sun May 15 2011 IWAI, Masaharu <iwai@alib.jp> 1.8.6-1
400- new upstream release
401
402* Tue Jan 18 2011 Shu KONNO <owa@bg.wakwak.com> 1.8.5-2
403- rebuilt with libboost-1.45.0
404
405* Wed Oct 20 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.5-1
406- new upstream release
407- add Japanese po files version 20100926 (Source12)
408- add BuildRequires: unzip for Japanese po files
409
410* Thu Aug 12 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.4-1
411- new upstream release
412- drop Japanese po files version 20100710 (Source12)
413
414* Sat Jul 10 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.3-1
415- new upstream release
416- add Japanese po files version 20100710 (Source12)
417
418* Thu Jun  3 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.2-1
419- new upstream release
420- add required Boost Library version
421
422* Mon May  3 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.1-1
423- new upstream release
424- fix typo for Conflicts tag: wesnoth165
425
426* Fri Apr  2 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.0-2
427- new upstream release
428- running autogen.sh: missing configure script in 1.8 tarball
429
430* Tue Mar 30 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.0-1.svn41885
431- update to 1.8.0+svn41885
432- add Conflicts: wesnoth165
433- without unofficial po files (Source10): unstream merged
434- symbolic link: VL-Gothic-Regular.ttf to wqy-zenhei.ttc
435- add BuildRequires: lua-devel
436- fix changelog: 1.6.5-3
437
438* Mon Mar 29 2010 IWAI, Masaharu <iwai@alib.jp> 1.6.5-3
439- add unofficial Japanese po files
440  - add wesnoth-1.6.5-japanese-po.tar.gz (Source10)
441  - add wesnoth-1.6.5-sotbe-ja.po (Source11)
442  - add Japanese translators patch (Patch10)
443- update Packager: assign iwaim
444
445* Mon Feb 08 2010 Shu KONNO <owa@bg.wakwak.com> 1.6.5-2vl6
446- rebuilt with new toolchain and libboost-1.42.0
447
448* Fri Sep 11 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.6.5-1
449- new upstream release
450- added BuildRequires:
451  - desktop-file-utils
452  - ImageMagick
453
454* Wed Jul 22 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.6.4-1
455- new upstream release
456
457* Wed Jul  8 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.6.3-2
458- fix enable-server bits
459  - specify --enable-server=no when with_wesnothd is NOT set)
460  - fix install section
461
462* Fri Jul 03 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.3-1
463- new upstream release
464
465* Sun May 17 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.2-1
466- new upstream release
467
468* Fri May 08 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.1-1
469- new upstream release
470
471* Mon Mar 23 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6a-1
472- new upstream release
473- added BuildRequires: libboost-regex
474- added Requires:
475  - libboost-regex
476  - TrueType-vlgothic for vl5
477- dropped BuildRequires: TrueType-sazanami
478- dropped wesnoth-1.2.8-gcc43.patch
479- added configure options:
480  - --disable-dependency-tracking
481  - --with-localedir=%%{_datadir}/locale
482- removed wqy-zenhei.ttc
483  because wqy-zenhei.ttc affected sazanami-gothic.ttf badly
484- added update-desktop-database process in %%post and %%postun
485
486* Sat Jan 10 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.7-1
487- new upstream release
488
489* Sun Nov 16 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.6-1
490- new upstream release
491
492* Sun Nov 02 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.5-1
493- new upstream release
494- fixed License to GPLv2+
495- added BuildRequires: libboost-devel
496- added Requires: libboost-iostreams
497- dropped wesnoth.desktop, wesnoth.png, wesnoth-editor.desktop
498
499- apply wesnoth-1.2.8-gcc43.patch (from Fedora package)
500
501* Tue Oct 14 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.7-1vl5
502- applied new versioning policy, spec in utf-8
503
504* Wed Jan 02 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.7-0vl2
505- rebuilt for VineSeed
506
507* Tue Oct 23 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.7-0vl1
508- new upstream
509 - define with_editor 0, with_tools 0, with_campaignd 0, with_wesnothd 0
510 - drop wesnoth-server package
511 - arrange wesnothd server package files
512   [HELP] please test wesnoth-server, which change with_wesnothd to TRUE
513
514# * Tue Sep 4 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl3
515# - provide wesnoth-tools package
516# - drop wesnoth-server package
517# - arrange wesnothd server package files
518#   [HELP] please test wesnoth-server and wesnoth-campaign-server,
519#   which change with_wesnothd and with_campaignd to TRUE
520
521* Mon Sep 3 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl2
522- rebuild for VineSeed
523
524* Mon Sep 3 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl1
525- initial build for Vine Linux 4.1
526
527* Sun Apr 15 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.3-0vlmp1
528- new upstream for Vine Linux 4.1
529
530* Fri Jun 10 2005 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 0.9.2-0vlmp1
531- initial build for Vine Linux 3.2
532
533
534
535# end of file
Note: See TracBrowser for help on using the repository browser.