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

Revision 8055, 16.1 KB checked in by iwaim, 10 years ago (diff)

wesnoth 1.10.7-1

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.7
7%define src_ver %{ver}
8%define rel 1
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%{_datadir}/pixmaps/wesnoth_editor-icon.png
349%endif
350
351%if %{with_tools}
352%files tools
353%defattr(-,root,root)
354#%{_bindir}/cutter
355#%{_bindir}/exploder
356%{_bindir}/wesnoth_cutter
357%{_bindir}/wesnoth_exploder
358%endif
359
360%if %{with_campaignd}
361%files campaign-server
362%defattr(-,root,root)
363%{_bindir}/campaignd
364%endif
365
366%if %{with_wesnothd}
367%files server
368%defattr(-,root,root)
369%config %{_initrddir}/wesnothd
370%config(noreplace) %{_sysconfdir}/sysconfig/wesnoth
371#%{_bindir}/wesnothd
372%{_sbindir}/wesnothd
373%{_mandir}/man6/wesnothd.*
374%{_mandir}/*/man6/wesnothd.*
375%attr(0700,wesnothd,wesnothd) %dir /var/run/wesnothd/
376%ghost /var/run/wesnothd/socket
377%endif
378
379
380%changelog
381* Fri Dec 20 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 1.10.7-1
382- update to 1.10.7
383
384* Mon Dec 09 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.5-2
385- rebuild with libboost-1.54.0
386
387* Fri Jan 11 2013 IWAI, Masaharu <iwai@alib.jp> 1.10.5-1
388- update to 1.10.5
389- update BR libboost version: 1.35 -> 1.36
390- add BuildRequires:
391  - libboost-serialization
392  - libboost-program-options
393  - libboost-system
394  - libboost-thread
395- using cmake
396- drop unnecessary script in install section
397  - fix desktop file script
398
399* Mon Sep  5 2011 IWAI, Masaharu <iwai@alib.jp> 1.8.6-2
400- drop Requires: xorg-x11-libs
401- drop unnecessary routine for Vine Linux 4
402
403* Sun May 15 2011 IWAI, Masaharu <iwai@alib.jp> 1.8.6-1
404- new upstream release
405
406* Tue Jan 18 2011 Shu KONNO <owa@bg.wakwak.com> 1.8.5-2
407- rebuilt with libboost-1.45.0
408
409* Wed Oct 20 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.5-1
410- new upstream release
411- add Japanese po files version 20100926 (Source12)
412- add BuildRequires: unzip for Japanese po files
413
414* Thu Aug 12 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.4-1
415- new upstream release
416- drop Japanese po files version 20100710 (Source12)
417
418* Sat Jul 10 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.3-1
419- new upstream release
420- add Japanese po files version 20100710 (Source12)
421
422* Thu Jun  3 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.2-1
423- new upstream release
424- add required Boost Library version
425
426* Mon May  3 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.1-1
427- new upstream release
428- fix typo for Conflicts tag: wesnoth165
429
430* Fri Apr  2 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.0-2
431- new upstream release
432- running autogen.sh: missing configure script in 1.8 tarball
433
434* Tue Mar 30 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.0-1.svn41885
435- update to 1.8.0+svn41885
436- add Conflicts: wesnoth165
437- without unofficial po files (Source10): unstream merged
438- symbolic link: VL-Gothic-Regular.ttf to wqy-zenhei.ttc
439- add BuildRequires: lua-devel
440- fix changelog: 1.6.5-3
441
442* Mon Mar 29 2010 IWAI, Masaharu <iwai@alib.jp> 1.6.5-3
443- add unofficial Japanese po files
444  - add wesnoth-1.6.5-japanese-po.tar.gz (Source10)
445  - add wesnoth-1.6.5-sotbe-ja.po (Source11)
446  - add Japanese translators patch (Patch10)
447- update Packager: assign iwaim
448
449* Mon Feb 08 2010 Shu KONNO <owa@bg.wakwak.com> 1.6.5-2vl6
450- rebuilt with new toolchain and libboost-1.42.0
451
452* Fri Sep 11 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.6.5-1
453- new upstream release
454- added BuildRequires:
455  - desktop-file-utils
456  - ImageMagick
457
458* Wed Jul 22 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.6.4-1
459- new upstream release
460
461* Wed Jul  8 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.6.3-2
462- fix enable-server bits
463  - specify --enable-server=no when with_wesnothd is NOT set)
464  - fix install section
465
466* Fri Jul 03 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.3-1
467- new upstream release
468
469* Sun May 17 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.2-1
470- new upstream release
471
472* Fri May 08 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.1-1
473- new upstream release
474
475* Mon Mar 23 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6a-1
476- new upstream release
477- added BuildRequires: libboost-regex
478- added Requires:
479  - libboost-regex
480  - TrueType-vlgothic for vl5
481- dropped BuildRequires: TrueType-sazanami
482- dropped wesnoth-1.2.8-gcc43.patch
483- added configure options:
484  - --disable-dependency-tracking
485  - --with-localedir=%%{_datadir}/locale
486- removed wqy-zenhei.ttc
487  because wqy-zenhei.ttc affected sazanami-gothic.ttf badly
488- added update-desktop-database process in %%post and %%postun
489
490* Sat Jan 10 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.7-1
491- new upstream release
492
493* Sun Nov 16 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.6-1
494- new upstream release
495
496* Sun Nov 02 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.5-1
497- new upstream release
498- fixed License to GPLv2+
499- added BuildRequires: libboost-devel
500- added Requires: libboost-iostreams
501- dropped wesnoth.desktop, wesnoth.png, wesnoth-editor.desktop
502
503- apply wesnoth-1.2.8-gcc43.patch (from Fedora package)
504
505* Tue Oct 14 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.7-1vl5
506- applied new versioning policy, spec in utf-8
507
508* Wed Jan 02 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.7-0vl2
509- rebuilt for VineSeed
510
511* Tue Oct 23 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.7-0vl1
512- new upstream
513 - define with_editor 0, with_tools 0, with_campaignd 0, with_wesnothd 0
514 - drop wesnoth-server package
515 - arrange wesnothd server package files
516   [HELP] please test wesnoth-server, which change with_wesnothd to TRUE
517
518# * Tue Sep 4 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl3
519# - provide wesnoth-tools package
520# - drop wesnoth-server package
521# - arrange wesnothd server package files
522#   [HELP] please test wesnoth-server and wesnoth-campaign-server,
523#   which change with_wesnothd and with_campaignd to TRUE
524
525* Mon Sep 3 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl2
526- rebuild for VineSeed
527
528* Mon Sep 3 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl1
529- initial build for Vine Linux 4.1
530
531* Sun Apr 15 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.3-0vlmp1
532- new upstream for Vine Linux 4.1
533
534* Fri Jun 10 2005 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 0.9.2-0vlmp1
535- initial build for Vine Linux 3.2
536
537
538
539# end of file
Note: See TracBrowser for help on using the repository browser.