jnethack-vl.spec 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. %define original_version 3.4.3
  2. %define jp_patch_version 0.9
  3. Summary: JNetHack
  4. Summary(ja): JNetHack
  5. Name: jnethack
  6. Version: %{original_version}_%{jp_patch_version}
  7. Release: 0vl3
  8. License: NETHACK GENERAL PUBLIC LICENSE
  9. Group: Applications/Games
  10. URL: http://www.nethack.org/
  11. Source0: ftp://ftp.sourceforge.net/n/ne/nethack/nethack-343-src.tgz
  12. Source1: jnethack.desktop
  13. Patch0: http://osdn.dl.sourceforge.jp/jnethack/15876/jnethack-3.4.3-0.9.diff.gz
  14. # Patch1 is for Linux tty and X11
  15. Patch1: jnethack-343-vine-setup.patch
  16. Buildroot: %{_tmppath}/%{name}-%{version}-root
  17. BuildRequires: XOrg-devel, sed, ncurses-devel, bison, flex
  18. BuildRequires: desktop-file-utils
  19. Requires: XOrg, ncurses
  20. Requires: desktop-file-utils
  21. Vendor: Project Vine
  22. Distribution: Vine Linux
  23. Packager: IKEDA Katsumi <ikeda@webmasters.gr.jp>
  24. %define _gamedir %{_prefix}/games
  25. %description
  26. JNetHack is Japanized NetHack.
  27. NetHack is a single player dungeon exploration game that runs on
  28. a wide variety of computer systems, with a variety of graphical
  29. and text interfaces all using the same game engine.
  30. %description -l ja
  31. JNetHack は、日本語に対応した NetHack です。
  32. NetHack はシングルプレイヤーのダンジョン探検ゲームで、非常に多様な
  33. コンピュータシステムで動作し、グラフィックやテキストといった種類の
  34. インタフェースで同じゲームエンジンを使用します。
  35. %prep
  36. %{__rm} -rf ${RPM_BUILD_ROOT}
  37. %setup -q -n nethack-%{original_version}
  38. %patch0 -p1 -b .jpatch
  39. %patch1 -p1 -b .vine-setup
  40. %build
  41. (cd sys/unix && sh setup.sh)
  42. %{__make} \
  43. LFLAGS="-L%{_libdir} -L/usr/X11R6/%{_lib}" \
  44. WINTTYLIB=%{_libdir}/libncurses.a
  45. %install
  46. %{__rm} -rf ${RPM_BUILD_ROOT}
  47. make PREFIX="${RPM_BUILD_ROOT}/usr" HACKDIR="%{__gamedir}/lib/nethackdir" install
  48. (cd ${RPM_BUILD_ROOT}/%{_gamedir} && %{__mv} jnethack jnethack.tmp &&
  49. %{__sed} -e "s;${RPM_BUILD_ROOT};;" < jnethack.tmp > jnethack &&
  50. %{__rm} -f jnethack.tmp)
  51. %{__install} -d ${RPM_BUILD_ROOT}/%{_prefix}/X11R6/lib/X11/app-defaults
  52. %{__install} -m 644 win/X11/JNetHack.ad ${RPM_BUILD_ROOT}/%{_prefix}/X11R6/lib/X11/app-defaults/JNetHack
  53. %{__install} -d ${RPM_BUILD_ROOT}/%{_mandir}/man6
  54. %{__install} -m 644 doc/dgn_comp.6 ${RPM_BUILD_ROOT}/%{_mandir}/man6/dgn_comp.6
  55. %{__install} -m 644 doc/dlb.6 ${RPM_BUILD_ROOT}/%{_mandir}/man6/dlb.6
  56. %{__install} -m 644 doc/lev_comp.6 ${RPM_BUILD_ROOT}/%{_mandir}/man6/lev_comp.6
  57. %{__install} -m 644 doc/nethack.6 ${RPM_BUILD_ROOT}/%{_mandir}/man6/nethack.6
  58. %{__install} -m 644 doc/recover.6 ${RPM_BUILD_ROOT}/%{_mandir}/man6/recover.6
  59. %{__install} -d ${RPM_BUILD_ROOT}%{_datadir}/applications
  60. %{__install} -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_datadir}/applications/jnethack.desktop
  61. %{__cat} << EOF > ${RPM_BUILD_ROOT}%{_gamedir}/jnethack-tty
  62. #!/bin/sh
  63. NETHACKOPTIONS=windowtype:tty jnethack
  64. EOF
  65. %{__cat} << EOF > ${RPM_BUILD_ROOT}%{_gamedir}/jnethack-x11
  66. #!/bin/sh
  67. NETHACKOPTIONS=windowtype:X11 jnethack
  68. EOF
  69. %{__chmod} 755 ${RPM_BUILD_ROOT}%{_gamedir}/jnethack-tty
  70. %{__chmod} 755 ${RPM_BUILD_ROOT}%{_gamedir}/jnethack-x11
  71. %{__install} -d ${RPM_BUILD_ROOT}%{_bindir}
  72. %{__ln_s} %{_gamedir}/jnethack ${RPM_BUILD_ROOT}%{_bindir}/jnethack
  73. %{__ln_s} %{_gamedir}/jnethack-tty ${RPM_BUILD_ROOT}%{_bindir}/jnethack-tty
  74. %{__ln_s} %{_gamedir}/jnethack-x11 ${RPM_BUILD_ROOT}%{_bindir}/jnethack-x11
  75. desktop-file-install --delete-original --vendor= \
  76. --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
  77. ${RPM_BUILD_ROOT}%{_datadir}/applications/*
  78. %clean
  79. %{__rm} -rf ${RPM_BUILD_ROOT}
  80. #----------------------------------------------------------------
  81. %post
  82. update-desktop-database %{_datadir}/applications
  83. %postun
  84. update-desktop-database %{_datadir}/applications
  85. %preun
  86. %{__rm} -f %{_gamedir}/lib/jnethackdir/*lock.0
  87. %files
  88. %defattr(-, games, games)
  89. %doc Files Porting README ChangeLog.j INSTALL.j README.j
  90. %doc doc/Guidebook.txt doc/Guidebook.mn doc/Guidebook.tex
  91. %doc doc/jGuidebook.txt doc/jGuidebook.mn doc/window.doc
  92. %doc dat/license dat/help dat/hh dat/history dat/opthelp
  93. %doc dat/jhelp dat/jhh dat/jhistory dat/jopthelp japanese/Install.lnx
  94. %attr (755, games, games) %{_gamedir}/jnethack
  95. %attr (755, games, games) %{_gamedir}/jnethack-tty
  96. %attr (755, games, games) %{_gamedir}/jnethack-x11
  97. %{_bindir}/jnethack
  98. %{_bindir}/jnethack-tty
  99. %{_bindir}/jnethack-x11
  100. %dir %{_gamedir}/lib
  101. %attr (775, games, games) %dir %{_gamedir}/lib/jnethackdir
  102. %dir %{_gamedir}/lib/jnethackdir/save
  103. %{_gamedir}/lib/jnethackdir/nhdat
  104. %{_gamedir}/lib/jnethackdir/x11tiles
  105. %{_gamedir}/lib/jnethackdir/NetHack.ad
  106. %{_gamedir}/lib/jnethackdir/pet_mark.xbm
  107. %{_gamedir}/lib/jnethackdir/rip.xpm
  108. %{_gamedir}/lib/jnethackdir/license
  109. %{_gamedir}/lib/jnethackdir/recover
  110. %{_gamedir}/lib/jnethackdir/perm
  111. %attr (2755, games, games) %{_gamedir}/lib/jnethackdir/jnethack
  112. %config %attr (664, games, games) %{_gamedir}/lib/jnethackdir/record
  113. %config %attr (664, games, games) %{_gamedir}/lib/jnethackdir/logfile
  114. %{_mandir}/man6/dgn_comp.6*
  115. %{_mandir}/man6/dlb.6*
  116. %{_mandir}/man6/lev_comp.6*
  117. %{_mandir}/man6/nethack.6*
  118. %{_mandir}/man6/recover.6*
  119. %{_prefix}/X11R6/lib/X11/app-defaults/JNetHack
  120. %{_datadir}/applications/jnethack.desktop
  121. %changelog
  122. * Sun Dec 30 2007 Shu KONNO <owa@bg.wakwak.com> 3.4.3_0.9-0vl3
  123. - added LFLAGS and WINTTYLIB to make
  124. * Sat Sep 15 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.4.3_0.9-0vl2
  125. - rebuilt for VineSeed
  126. * Sat Sep 15 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.4.3_0.9-0vl1
  127. - new upstream release (jnethack-3.4.3-0.9)
  128. * Sat Jan 20 2007 IKEDA Katsumi <ikeda@webmasters.gr.jp> 3.4.3_0.7-0vl1
  129. - new upstream release (jnethack-3.4.3-0.7)
  130. - add a symbolic link to /usr/games/jnethack in /usr/bin/
  131. - add jnethack.desktop
  132. * Mon Sep 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.4.3-0vl5
  133. - changed Group to Applications/Games
  134. * Sun Jan 09 2005 IKEDA Katsumi <ikeda@webmasters.gr.jp> 3.4.3-0vl4
  135. - new upstream version (jnethack-3.4.3-0.5)
  136. * Mon Aug 16 2004 IKEDA Katsumi <ikeda@webmasters.gr.jp> 3.4.3-0vl3
  137. - Modified BuildRequires and Requires
  138. - Rebuild for Vine Linux 3.0.
  139. * Fri Aug 6 2004 IKEDA Katsumi <ikeda@webmasters.gr.jp> 3.4.3-0vl2
  140. - upstream update: jnethack-3.4.3-0.4.diff.gz
  141. * Tue Jun 23 2004 IKEDA Katsumi <ikeda@webmasters.gr.jp> 3.4.3-0vl1
  142. - Initial specfile