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

Revision 11719, 15.4 KB checked in by iwaim, 6 years ago (diff)

wesnoth 1.14.2-1

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