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

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

rebuilt with new toolchain

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.6
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* Tue Jun 14 2016 Munehiro Yamamoto <munepi@vinelinux.org> 1.12.6-1
289- new upstream release
290
291* Thu Jan 21 2016 Munehiro Yamamoto <munepi@vinelinux.org> 1.12.5-1
292- new upstream release
293- Wesnoth ships its own fonts, replace with Vine Linux packaged versions
294  - Requires: TrueType-vlgothic TrueType-dejavu-sans TrueType-droid-sans
295- supported server, tools packages
296
297* Fri Dec 20 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 1.10.7-1
298- update to 1.10.7
299
300* Mon Dec 09 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.10.5-2
301- rebuild with libboost-1.54.0
302
303* Fri Jan 11 2013 IWAI, Masaharu <iwai@alib.jp> 1.10.5-1
304- update to 1.10.5
305- update BR libboost version: 1.35 -> 1.36
306- add BuildRequires:
307  - libboost-serialization
308  - libboost-program-options
309  - libboost-system
310  - libboost-thread
311- using cmake
312- drop unnecessary script in install section
313  - fix desktop file script
314
315* Mon Sep  5 2011 IWAI, Masaharu <iwai@alib.jp> 1.8.6-2
316- drop Requires: xorg-x11-libs
317- drop unnecessary routine for Vine Linux 4
318
319* Sun May 15 2011 IWAI, Masaharu <iwai@alib.jp> 1.8.6-1
320- new upstream release
321
322* Tue Jan 18 2011 Shu KONNO <owa@bg.wakwak.com> 1.8.5-2
323- rebuilt with libboost-1.45.0
324
325* Wed Oct 20 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.5-1
326- new upstream release
327- add Japanese po files version 20100926 (Source12)
328- add BuildRequires: unzip for Japanese po files
329
330* Thu Aug 12 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.4-1
331- new upstream release
332- drop Japanese po files version 20100710 (Source12)
333
334* Sat Jul 10 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.3-1
335- new upstream release
336- add Japanese po files version 20100710 (Source12)
337
338* Thu Jun  3 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.2-1
339- new upstream release
340- add required Boost Library version
341
342* Mon May  3 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.1-1
343- new upstream release
344- fix typo for Conflicts tag: wesnoth165
345
346* Fri Apr  2 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.0-2
347- new upstream release
348- running autogen.sh: missing configure script in 1.8 tarball
349
350* Tue Mar 30 2010 IWAI, Masaharu <iwai@alib.jp> 1.8.0-1.svn41885
351- update to 1.8.0+svn41885
352- add Conflicts: wesnoth165
353- without unofficial po files (Source10): unstream merged
354- symbolic link: VL-Gothic-Regular.ttf to wqy-zenhei.ttc
355- add BuildRequires: lua-devel
356- fix changelog: 1.6.5-3
357
358* Mon Mar 29 2010 IWAI, Masaharu <iwai@alib.jp> 1.6.5-3
359- add unofficial Japanese po files
360  - add wesnoth-1.6.5-japanese-po.tar.gz (Source10)
361  - add wesnoth-1.6.5-sotbe-ja.po (Source11)
362  - add Japanese translators patch (Patch10)
363- update Packager: assign iwaim
364
365* Mon Feb 08 2010 Shu KONNO <owa@bg.wakwak.com> 1.6.5-2vl6
366- rebuilt with new toolchain and libboost-1.42.0
367
368* Fri Sep 11 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.6.5-1
369- new upstream release
370- added BuildRequires:
371  - desktop-file-utils
372  - ImageMagick
373
374* Wed Jul 22 2009 Munehiro Yamamoto <munepi@vinelinux.org> 1.6.4-1
375- new upstream release
376
377* Wed Jul  8 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.6.3-2
378- fix enable-server bits
379  - specify --enable-server=no when with_wesnothd is NOT set)
380  - fix install section
381
382* Fri Jul 03 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.3-1
383- new upstream release
384
385* Sun May 17 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.2-1
386- new upstream release
387
388* Fri May 08 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6.1-1
389- new upstream release
390
391* Mon Mar 23 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.6a-1
392- new upstream release
393- added BuildRequires: libboost-regex
394- added Requires:
395  - libboost-regex
396  - TrueType-vlgothic for vl5
397- dropped BuildRequires: TrueType-sazanami
398- dropped wesnoth-1.2.8-gcc43.patch
399- added configure options:
400  - --disable-dependency-tracking
401  - --with-localedir=%%{_datadir}/locale
402- removed wqy-zenhei.ttc
403  because wqy-zenhei.ttc affected sazanami-gothic.ttf badly
404- added update-desktop-database process in %%post and %%postun
405
406* Sat Jan 10 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.7-1
407- new upstream release
408
409* Sun Nov 16 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.6-1
410- new upstream release
411
412* Sun Nov 02 2008 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.4.5-1
413- new upstream release
414- fixed License to GPLv2+
415- added BuildRequires: libboost-devel
416- added Requires: libboost-iostreams
417- dropped wesnoth.desktop, wesnoth.png, wesnoth-editor.desktop
418
419- apply wesnoth-1.2.8-gcc43.patch (from Fedora package)
420
421* Tue Oct 14 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.7-1vl5
422- applied new versioning policy, spec in utf-8
423
424* Wed Jan 02 2008 Shu KONNO <owa@bg.wakwak.com> 1.2.7-0vl2
425- rebuilt for VineSeed
426
427* Tue Oct 23 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.7-0vl1
428- new upstream
429 - define with_editor 0, with_tools 0, with_campaignd 0, with_wesnothd 0
430 - drop wesnoth-server package
431 - arrange wesnothd server package files
432   [HELP] please test wesnoth-server, which change with_wesnothd to TRUE
433
434# * Tue Sep 4 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl3
435# - provide wesnoth-tools package
436# - drop wesnoth-server package
437# - arrange wesnothd server package files
438#   [HELP] please test wesnoth-server and wesnoth-campaign-server,
439#   which change with_wesnothd and with_campaignd to TRUE
440
441* Mon Sep 3 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl2
442- rebuild for VineSeed
443
444* Mon Sep 3 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.6-0vl1
445- initial build for Vine Linux 4.1
446
447* Sun Apr 15 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.2.3-0vlmp1
448- new upstream for Vine Linux 4.1
449
450* Fri Jun 10 2005 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 0.9.2-0vlmp1
451- initial build for Vine Linux 3.2
452
453
454
455# end of file
Note: See TracBrowser for help on using the repository browser.