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

Revision 1134, 15.5 KB checked in by iwaim, 14 years ago (diff)

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