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

Revision 11685, 15.3 KB checked in by iwaim, 6 years ago (diff)

wesnoth 1.14.1-2

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