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

Revision 958, 15.4 KB checked in by iwaim, 14 years ago (diff)

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