rdtool-vl.spec 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. %define ruby /usr/bin/ruby
  2. %define rbindir %(%{ruby} -r rbconfig -e 'print Config::CONFIG["bindir"]')
  3. %define emacsen_pkg 1
  4. %{?without_emacsen: %define emacsen_pkg 0}
  5. %if %{emacsen_pkg}
  6. %undefine without_emacsen
  7. %else
  8. %define without_emacsen 1
  9. %endif
  10. %define rdmode rd-mode
  11. %define rdmode_el rd-mode
  12. Summary: RD document formatter
  13. Name: rdtool
  14. Version: 0.6.22
  15. Release: 1%{?_dist_release}
  16. License: distributable
  17. Group: Development/Tools
  18. Source0: http://www.moonwolf.com/ruby/archive/rdtool-%{version}.tar.gz
  19. %if %{emacsen_pkg}
  20. Source1: %{rdmode_el}-install.sh
  21. Source2: %{rdmode_el}-remove.sh
  22. %endif
  23. URL: http://www2.pos.to/~tosh/ruby/rdtool/
  24. Prefix: /usr
  25. BuildArch: noarch
  26. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  27. BuildRequires: ruby, ruby-devel >= 1.8.0
  28. Requires: libruby >= 1.8.0, ruby, sh-utils
  29. Summary(ja): RDドキュメントのフォーマッタ
  30. %description
  31. RD is Ruby's POD. RDtool is formatter for RD.
  32. %description -l ja
  33. RD は Ruby においての POD です.RDtool は RD ドキュメントを
  34. 様々な形式に変換するためのツールです.
  35. %if %{emacsen_pkg}
  36. %package -n %{rdmode_el}
  37. Summary: Emacs-lisp rd-mode for RD documents
  38. Group: Applications/Editors/Emacs
  39. PreReq: emacsen, emacsen-common >= 0.1
  40. URL: http://www2.pos.to/~tosh/ruby/rdtool/
  41. %description -n %{rdmode_el}
  42. Emacs-lisp rd-mode for the RD documents
  43. %description -n %{rdmode_el} -l ja
  44. Emacs 上で RD ドキュメントを書くのに便利なモードです。
  45. %endif
  46. %prep
  47. %setup -q
  48. %build
  49. %install
  50. rm -rf $RPM_BUILD_ROOT
  51. %{ruby} setup.rb all --bindir=%{buildroot}%{rbindir} \
  52. --rbdir=%{buildroot}%{rlibdir}
  53. # fix missing rd/dot.rd2rc
  54. install -m 0644 lib/rd/dot.rd2rc %{buildroot}%{rlibdir}/rd
  55. %if %{emacsen_pkg}
  56. mkdir -p $RPM_BUILD_ROOT/%{_datadir}/emacs/site-lisp/%{rdmode}
  57. mkdir -p $RPM_BUILD_ROOT/%{_libdir}/emacsen-common/packages/install
  58. mkdir -p $RPM_BUILD_ROOT/%{_libdir}/emacsen-common/packages/remove
  59. %endif
  60. # fixing `#!' paths
  61. for f in `find . -type f`
  62. do
  63. sed -e 's,^#![ ]*\([^ ]*\)/\(ruby\|with\|perl\|env\),#!/usr/bin/\2,' < $f > $f.n
  64. mv -f $f.n $f
  65. done
  66. # installing rd-mode
  67. %if %{emacsen_pkg}
  68. cp utils/*.el $RPM_BUILD_ROOT/%{_datadir}/emacs/site-lisp/%{rdmode}
  69. %{?emacsen_pkg: %_installemacsenscript %{rdmode} %{SOURCE1}}
  70. %{?emacsen_pkg: %_removeemacsenscript %{rdmode} %{SOURCE2}}
  71. %endif
  72. %if %{emacsen_pkg}
  73. %post -n %{rdmode_el}
  74. if [ "$1" = 2 ]; then
  75. %{?emacsen_pkg: %_emacsenPackageRemove %{rdmode}}
  76. fi
  77. %{?emacsen_pkg: %_addemacsenlist %{rdmode}}
  78. %{?emacsen_pkg: %_emacsenPackageInstall %{rdmode}}
  79. %preun -n %{rdmode_el}
  80. if [ "$1" = 0 ]; then
  81. %{?emacsen_pkg: %_emacsenPackageRemove %{rdmode}}
  82. %{?emacsen_pkg: %_removeemacsenlist %{rdmode}}
  83. fi
  84. %endif
  85. %clean
  86. rm -rf ${RPM_BUILD_ROOT}
  87. %files
  88. %defattr(-, root, root)
  89. %{_bindir}/*
  90. %{rlibdir}/rd
  91. %doc HISTORY
  92. %doc README.rd
  93. %doc README.rd.ja
  94. %doc README.html
  95. %doc README.ja.html
  96. %doc doc/rd-draft.rd
  97. %doc doc/rd-draft.rd.ja
  98. %doc utils
  99. %if %{emacsen_pkg}
  100. %files -n %{rdmode_el}
  101. %defattr(-, root, root)
  102. %{_datadir}/emacs/site-lisp/%{rdmode}
  103. %{_libdir}/emacsen-common/packages/install/%{rdmode}
  104. %{_libdir}/emacsen-common/packages/remove/%{rdmode}
  105. %endif
  106. %changelog
  107. * Sat Nov 7 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.22-1
  108. - new upstream release
  109. - applied new versioning policy, spec in UTF-8
  110. * Sat Sep 16 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.20-0vl2
  111. - fixed Group typo
  112. * Wed Sep 13 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.20-0vl1
  113. - new upstream release
  114. - changed rd-mode Group to Appliations/Editors/Emacs <BTS:VineLinux:163>
  115. - s/Copyright/License/
  116. * Mon Nov 15 2004 IWAI, Masaharu <iwai@alib.jp> 0.6.17-0vl1
  117. - new upstream release
  118. - drop unnecessary packages in BuildRequires: racc and ruby-amstd
  119. - update Source0 URL
  120. - drop obsolete patch: rdtoolconf.rb.patch ( Patch0 )
  121. - drop obsolete patch: rd-mode patch ( Patch2 )
  122. - update setup and intall sections: new upstream package using setup.rb
  123. - add README.ja.html in %%doc
  124. - fix missing rd/dot.rd2rc
  125. * Mon Oct 06 2003 akira yamada <akira@vinelinux.org> rdtool-0.6.13-0vl3
  126. - build with ruby-1.8.0. it requires libruby >= 1.8.0.
  127. * Fri May 23 2003 IWAI Masaharu <iwai@alib.jp> 0.6.13-0vl2
  128. - fix typo in %%description -l ja for rdtool package
  129. - generate rd-mode package
  130. * Thu May 22 2003 IWAI Masaharu <iwai@alib.jp> 0.6.13-0vl1
  131. - new upstream version
  132. - update rdtoolconf.rb.patch (Patch0)
  133. - drop close-dt.patch (Pathc1): upstream merged
  134. - drop test in %%docdir
  135. * Sun Jun 16 2002 akira yamada <akira@vinelinux.org> 0.6.11-0vl2
  136. - added rdtool-0.6.11-close-dt.patch: ruby-ext#02080: missing </dt>
  137. - added rdtool-0.6.11-rd-mode.patch: ruby-list#35281: rd-mode.el - a bit fix
  138. * Mon Feb 04 2002 akira yamada <akira@vinelinux.org> 0.6.11-0vl1
  139. - new upstream version.
  140. - added ruby-optparse to BuildRequires.
  141. * Thu Jul 26 2001 akira yamada <akira@vinelinux.org> 0.6.10-0vl4
  142. - fixed bug in rd/rd2html-lib.rb (prepare_footnotes)
  143. - fixed bug in rd/rdblockparser.ry (desclistitem)
  144. * Thu Jul 26 2001 akira yamada <akira@vinelinux.org>
  145. - Rebuild with ruby-devel-1.6.4-0vl3.
  146. * Thu Jun 28 2001 akira yamada <akira@vinelinux.org>
  147. - Applied bugfix patch for rdvisitor.rb.
  148. * Tue Jun 12 2001 akira yamada <akira@vinelinux.org>
  149. - New upstream version 0.6.10.
  150. * Tue Mar 27 2001 akira yamada <akira@vinelinux.org>
  151. - Initial packaging.