source: projects/specs/branches/6/w/wesnoth/wesnoth-vl.spec @ 3896

Revision 3896, 15.7 KB checked in by iwaim, 13 years ago (diff)

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