wesnoth-vl.spec 15 KB

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