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

Revision 9976, 14.6 KB checked in by munepi, 8 years ago (diff)

new upstream release

Line 
1%global with_editor 0
2%global with_tools 0
3%global with_campaignd 0
4%global with_wesnothd 0
5
6#% global svn_rev 41885
7%global with_unofficial_po 0
8%global po_date            20100926
9
10Summary:        Fantasy Turn-Based Strategy Game
11Summary(ja):    ターンベースのファンタジー戦略シミュレーションゲーム
12Name:           wesnoth
13Version:        1.12.5
14Release:        1%{?svn_rev:.svn%svn_rev}%{?_dist_release}
15Source0:        http://www.wesnoth.org/files/%{name}-%{version}%{?svn_rev:-svn%svn_rev}.tar.bz2
16Source1:        wesnothd.init
17# Source1:      wesnothd.service
18Source2:        wesnoth.sysconfig
19Source3:        wesnoth.appdata.xml
20%if %{with_unofficial_po}
21# http://sourceforge.jp/projects/wesnoth-ja/releases/?package_id=11460
22Source12:       wesnoth-1.8.5_ja-catalogs-%{po_date}.zip
23%endif
24
25%{?nosrc:NoSource: 0}
26
27Patch0:         wesnoth-1.2.8-gcc43.patch
28Patch8:         wesnoth-1.12.2-CVE-2015-5069.patch
29Patch9:         wesnoth-1.12.2-CVE-2015-5070.patch
30
31License:        GPLv2+
32Group:          Applications/Games
33URL:            http://www.wesnoth.org/
34
35Distribution:   Vine Linux
36Vendor:         Project Vine
37Packager:       munepi, iwaim
38
39Requires:       SDL SDL_image SDL_mixer SDL_net SDL_ttf
40Requires:       freetype2 libpng zlib pango fontconfig
41Requires:       libboost-iostreams libboost-regex
42Requires:       TrueType-vlgothic TrueType-dejavu-sans TrueType-droid-sans
43BuildRequires:  cmake >= 2.6.0
44BuildRequires:  desktop-file-utils
45BuildRequires:  ImageMagick
46BuildRequires:  xorg-x11-devel SDL-devel SDL_image-devel SDL_mixer-devel
47BuildRequires:  SDL_net-devel SDL_ttf-devel
48BuildRequires:  freetype2-devel libpng-devel zlib-devel pango-devel
49BuildRequires:  fontconfig-devel
50BuildRequires:  libboost-devel >= 1.36
51BuildRequires:  libboost-iostreams libboost-regex
52BuildRequires:  libboost-serialization
53BuildRequires:  libboost-program-options
54BuildRequires:  libboost-system
55BuildRequires:  libboost-thread
56BuildRequires:  libboost-locale libboost-filesystem
57BuildRequires:  libvorbis-devel
58BuildRequires:  lua-devel
59BuildRequires:  dbus-devel
60BuildRequires:  fribidi-devel
61BuildRequires:  python-devel
62BuildRequires:  scons
63%if %{with_unofficial_po}
64BuildRequires:  unzip
65%endif
66BuildRoot:      %{_tmppath}/%{name}-%{version}-root
67
68Conflicts:      wesnoth165
69
70%description
71Battle for Wesnoth is a fantasy turn-based strategy game. Battle for
72control of villages, using variety of units which have advantages and
73disadvantages in different types of terrains and against different
74types of attacks. Units gain experience and advance levels, and are
75carried over from one scenario to the next campaign.
76
77%description -l ja
78Battle for Wesnoth はターンベースの戦略シミュレーションゲームです.
79異なる地形や攻撃のタイプに対して,長所と短所をもつ多種のユニットを使用
80しながら,村々の支配のために戦います.ユニットは経験を得てレベルアップ
81して,シナリオから次のキャンペーンまで連れて行かれます.
82
83
84%package tools
85Group: Applications/Games
86Summary: The Battle of Wesnoth tools.
87Summary(ja): The Battle of Wesnoth ツール
88Requires: wesnoth = %{version}-%{release}
89
90%description tools
91Battle for Wesnoth is a fantasy turn-based strategy game.
92This package includes tools for translators and artists working on
93Battle for Wesnoth.
94
95%description tools -l ja
96Battle for Wesnoth はターンベースの戦略シミュレーションゲームです.
97このパッケージには,Battle for Wesnoth で作業されている
98翻訳者やアーティストへのツールが含まれています.
99
100%package server
101Group: Applications/Games
102Summary: The Battle of Wesnoth game server.
103Summary(ja): The Battle of Wesnoth ゲームサーバ
104Requires: wesnoth = %{version}-%{release}
105Requires(post): /sbin/chkconfig
106Requires(preun): /sbin/chkconfig
107Requires(pre): /usr/sbin/useradd
108
109%description server
110Battle for Wesnoth is a fantasy turn-based strategy game.
111This package contains the wesnothd server needed to play networked games.
112
113%description server -l ja
114Battle for Wesnoth はターンベースの戦略シミュレーションゲームです.
115このパッケージには,ネットワークゲームのプレイに必要とされるwesnothdサー
116バが入っています.
117
118
119%prep
120%__rm -rf ${RPM_BUILD_ROOT}
121%setup -q -n %{name}-%{version}%{?svn_rev:-svn%svn_rev}
122%patch0 -p1 -b .gcc43
123#%patch7 -p0 -b .crash
124%patch8 -p0
125%patch9 -p0
126
127%if %{with_unofficial_po}
128%define japo_dir wesnoth-1.8.5ja-catalogs-%{po_date}
129%__unzip %{SOURCE12}
130
131pushd %{japo_dir}
132target=(
133        httt
134)
135for n in "${target[@]}"
136do
137%{__cp} -f wesnoth-%{version}_$n-%{po_date}_ja.po ../po/wesnoth-$n/ja.po
138done
139popd
140%endif
141
142%build
143scons wesnoth exploder cutter wesnothd campaignd \
144      prefix=%{_prefix} \
145      bindir=%{_bindir} \
146      libdir=%{_libdir} \
147      python_site_packages_dir=%{python_sitelib}/%{name} \
148      extra_flags_release="$RPM_OPT_FLAGS $RPM_LD_FLAGS" \
149      %{?_smp_mflags} || exit 1
150
151      # localedirname=locale \
152
153%install
154%{__rm} -rf ${RPM_BUILD_ROOT}
155scons install install-pytools destdir=$RPM_BUILD_ROOT
156
157### for wesnothd server
158## extra files we provide
159install -Dpm 755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_initrddir}/wesnothd
160install -Dpm 644 %{SOURCE2} ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/wesnoth
161
162## create this so we can %ghost it
163mkdir -p ${RPM_BUILD_ROOT}/var/run/wesnothd
164touch ${RPM_BUILD_ROOT}/var/run/wesnothd/socket
165
166## move server stuff into sbindir
167mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
168mv $RPM_BUILD_ROOT/%{_bindir}/wesnothd $RPM_BUILD_ROOT/%{_sbindir}
169mv $RPM_BUILD_ROOT/%{_bindir}/campaignd $RPM_BUILD_ROOT/%{_sbindir}
170
171
172### Wesnoth ships its own fonts, replace with Vine Linux packaged versions
173## for 1.2.7 or higher (contains sazanami-gothic.ttf)
174## for 1.6a or higher (NOT contains sazanami-gothic.ttf)
175rm -f $RPM_BUILD_ROOT/%{_datadir}/%{name}/fonts/*
176pushd ${RPM_BUILD_ROOT}%{_datadir}/%{name}/fonts/
177%__ln_s /usr/share/fonts/TrueType-dejavu/DejaVuSans.ttf           DejaVuSans.ttf || exit 1
178%__ln_s /usr/share/fonts/TrueType-vlgothic/VL-Gothic-Regular.ttf  sazanami-gothic.ttf || exit 1
179%__ln_s /usr/share/fonts/TrueType-vlgothic/VL-Gothic-Regular.ttf  wqy-zenhei.ttc || exit 1
180%__ln_s /usr/share/fonts/TrueType-droid/DroidSansFallbackFull.ttf . || exit 1
181%__ln_s /usr/share/fonts/TrueType-droid/DroidSansJapanese.ttf     . || exit 1
182popd
183
184### Register as an application to be visible in the software center
185##
186## NOTE: It would be *awesome* if this file was maintained by the upstream
187## project, translated and installed into the right place during `make install`.
188##
189## See http://www.freedesktop.org/software/appstream/docs/ for more details.
190##
191mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata
192cp %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/appdata/%{name}.appdata.xml
193
194
195# ### for Gnome menu
196# %__mkdir_p $RPM_BUILD_ROOT/%{_datadir}/pixmaps
197
198# desktop-file-install \
199#     --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
200#     --mode="0644" --vendor vine \
201#     ../icons/%{name}.desktop
202# #%__install -m 644 icons/%{name}-icon.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps
203for size in 16x16 20x20 22x22 24x24 32x32 36x36 64x64 48x48 64x64 72x72 96x96 128x128 192x192 256x256 512x512; do
204    %__mkdir_p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${size}/apps
205    convert icons/%{name}-icon.png -size ${size} \
206        $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/${size}/apps/%{name}-icon.png
207done
208
209# desktop-file-install \
210#     --dir $RPM_BUILD_ROOT/%{_datadir}/applications \
211#     --mode="0644" --vendor vine \
212#     ../icons/%{name}_editor.desktop
213# %__install -m 644 icons/%{name}_editor-icon.png $RPM_BUILD_ROOT/%{_datadir}/pixmaps
214
215### language stuff
216%find_lang %{name} --all-name --with-man
217
218
219%clean
220%{__rm} -rf ${RPM_BUILD_ROOT}
221
222
223%post
224touch --no-create %{_datadir}/icons/hicolor || :
225if [ -x %{_bindir}/gtk-update-icon-cache ]; then
226   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
227fi
228%{_bindir}/update-desktop-database %{_datadir}/applications || :
229
230%postun
231%{_bindir}/update-desktop-database %{_datadir}/applications || :
232touch --no-create %{_datadir}/icons/hicolor || :
233if [ -x %{_bindir}/gtk-update-icon-cache ]; then
234  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
235fi
236
237
238%pre server
239/usr/sbin/useradd -c "Wesnoth server" -s /sbin/nologin \
240        -r -d /var/run/wesnothd wesnothd 2> /dev/null || :
241
242%post server
243/sbin/chkconfig --add wesnothd
244if [ $1 -gt 1 ]; then
245    %{_initrddir}/wesnothd try-restart >/dev/null || :
246fi
247
248%preun server
249if [ $1 -eq 0 ]; then
250    %{_initrddir}/wesnothd stop >/dev/null 2>&1 || :
251    /sbin/chkconfig --del wesnothd
252fi
253
254
255%files -f %{name}.lang
256%defattr(-,root,root)
257%doc COPYING changelog README.md copyright
258%docdir %{_docdir}/wesnoth
259%{_docdir}/wesnoth
260%{_bindir}/%{name}
261%{_datadir}/%{name}
262%{_datadir}/appdata/%{name}.appdata.xml
263%{_datadir}/applications/wesnoth.desktop
264%{_datadir}/wesnoth/fonts/*
265%{_datadir}/icons/*
266%{python_sitelib}/wesnoth
267%{_mandir}/man6/wesnoth*.6.gz
268%{_mandir}/*/man6/wesnoth*.6.gz
269
270%files tools
271%defattr(-,root,root)
272%{_bindir}/wesnoth_addon_manager
273%{_bindir}/exploder
274%{_bindir}/cutter
275%{_bindir}/wml*
276
277%files server
278%defattr(-,root,root)
279%{_initrddir}/wesnothd
280%config(noreplace) %{_sysconfdir}/sysconfig/wesnoth
281%{_sbindir}/wesnothd
282%{_sbindir}/campaignd
283%attr(0700,wesnothd,wesnothd) %dir /var/run/wesnothd/
284%ghost /var/run/wesnothd/socket
285
286
287%changelog
288* Thu Jan 21 2016 Munehiro Yamamoto <munepi@vinelinux.org> 1.12.5
289- new upstream release
290- Wesnoth ships its own fonts, replace with Vine Linux packaged versions
291  - Requires: TrueType-vlgothic TrueType-dejavu-sans TrueType-droid-sans
292- supported server, tools packages
293
294* Fri Dec 20 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 1.10.7-1
295- update to 1.10.7
296
297* Mon Dec 09 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.5-2
298- rebuild with libboost-1.54.0
299
300* Fri Jan 11 2013 IWAI, Masaharu <iwai@alib.jp> 1.10.5-1
301- update to 1.10.5
302- update BR libboost version: 1.35 -> 1.36
303- add BuildRequires:
304  - libboost-serialization
305  - libboost-program-options
306  - libboost-system
307  - libboost-thread
308- using cmake
309- drop unnecessary script in install section
310  - fix desktop file script
311
312* Mon Sep  5 2011 IWAI, Masaharu <iwai@alib.jp> 1.8.6-2
313- drop Requires: xorg-x11-libs
314- drop unnecessary routine for Vine Linux 4
315
316* Sun May 15 2011 IWAI, Masaharu <iwai@alib.jp> 1.8.6-1
317- new upstream release
318
319* Tue Jan 18 2011 Shu KONNO <owa@bg.wakwak.com> 1.8.5-2
320- rebuilt with libboost-1.45.0
321
322* Wed Oct 20 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.5-1
323- new upstream release
324- add Japanese po files version 20100926 (Source12)
325- add BuildRequires: unzip for Japanese po files
326
327* Thu Aug 12 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.4-1
328- new upstream release
329- drop Japanese po files version 20100710 (Source12)
330
331* Sat Jul 10 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.3-1
332- new upstream release
333- add Japanese po files version 20100710 (Source12)
334
335* Thu Jun  3 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.2-1
336- new upstream release
337- add required Boost Library version
338
339* Mon May  3 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.1-1
340- new upstream release
341- fix typo for Conflicts tag: wesnoth165
342
343* Fri Apr  2 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.0-2
344- new upstream release
345- running autogen.sh: missing configure script in 1.8 tarball
346
347* Tue Mar 30 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.0-1.svn41885
348- update to 1.8.0+svn41885
349- add Conflicts: wesnoth165
350- without unofficial po files (Source10): unstream merged
351- symbolic link: VL-Gothic-Regular.ttf to wqy-zenhei.ttc
352- add BuildRequires: lua-devel
353- fix changelog: 1.6.5-3
354
355* Mon Mar 29 2010 IWAI, Masaharu <iwai@alib.jp> 1.6.5-3
356- add unofficial Japanese po files
357  - add wesnoth-1.6.5-japanese-po.tar.gz (Source10)
358  - add wesnoth-1.6.5-sotbe-ja.po (Source11)
359  - add Japanese translators patch (Patch10)
360- update Packager: assign iwaim
361
362* Mon Feb 08 2010 Shu KONNO <owa@bg.wakwak.com> 1.6.5-2vl6
363- rebuilt with new toolchain and libboost-1.42.0
364
365* Fri Sep 11 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.6.5-1
366- new upstream release
367- added BuildRequires:
368  - desktop-file-utils
369  - ImageMagick
370
371* Wed Jul 22 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.6.4-1
372- new upstream release
373
374* Wed Jul  8 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.6.3-2
375- fix enable-server bits
376  - specify --enable-server=no when with_wesnothd is NOT set)
377  - fix install section
378
379* Fri Jul 03 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.3-1
380- new upstream release
381
382* Sun May 17 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.2-1
383- new upstream release
384
385* Fri May 08 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.1-1
386- new upstream release
387
388* Mon Mar 23 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6a-1
389- new upstream release
390- added BuildRequires: libboost-regex
391- added Requires:
392  - libboost-regex
393  - TrueType-vlgothic for vl5
394- dropped BuildRequires: TrueType-sazanami
395- dropped wesnoth-1.2.8-gcc43.patch
396- added configure options:
397  - --disable-dependency-tracking
398  - --with-localedir=%%{_datadir}/locale
399- removed wqy-zenhei.ttc
400  because wqy-zenhei.ttc affected sazanami-gothic.ttf badly
401- added update-desktop-database process in %%post and %%postun
402
403* Sat Jan 10 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.7-1
404- new upstream release
405
406* Sun Nov 16 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.6-1
407- new upstream release
408
409* Sun Nov 02 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.5-1
410- new upstream release
411- fixed License to GPLv2+
412- added BuildRequires: libboost-devel
413- added Requires: libboost-iostreams
414- dropped wesnoth.desktop, wesnoth.png, wesnoth-editor.desktop
415
416- apply wesnoth-1.2.8-gcc43.patch (from Fedora package)
417
418* Tue Oct 14 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.7-1vl5
419- applied new versioning policy, spec in utf-8
420
421* Wed Jan 02 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.7-0vl2
422- rebuilt for VineSeed
423
424* Tue Oct 23 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.7-0vl1
425- new upstream
426 - define with_editor 0, with_tools 0, with_campaignd 0, with_wesnothd 0
427 - drop wesnoth-server package
428 - arrange wesnothd server package files
429   [HELP] please test wesnoth-server, which change with_wesnothd to TRUE
430
431# * Tue Sep 4 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl3
432# - provide wesnoth-tools package
433# - drop wesnoth-server package
434# - arrange wesnothd server package files
435#   [HELP] please test wesnoth-server and wesnoth-campaign-server,
436#   which change with_wesnothd and with_campaignd to TRUE
437
438* Mon Sep 3 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl2
439- rebuild for VineSeed
440
441* Mon Sep 3 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl1
442- initial build for Vine Linux 4.1
443
444* Sun Apr 15 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.3-0vlmp1
445- new upstream for Vine Linux 4.1
446
447* Fri Jun 10 2005 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 0.9.2-0vlmp1
448- initial build for Vine Linux 3.2
449
450
451
452# end of file
Note: See TracBrowser for help on using the repository browser.