wesnoth-vl.spec 15 KB

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