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

Revision 4908, 15.4 KB checked in by iwaim, 13 years ago (diff)

wesnoth 1.8.6-2

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