rdtool-vl.spec 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. %define emacsen_pkg 1
  2. %{?without_emacsen: %define emacsen_pkg 0}
  3. %if %{emacsen_pkg}
  4. %undefine without_emacsen
  5. %else
  6. %define without_emacsen 1
  7. %endif
  8. %define rdmode rd-mode
  9. %define rdmode_el rd-mode
  10. Summary: RD document formatter
  11. Name: rdtool
  12. Version: 0.6.22
  13. Release: 3%{?_dist_release}
  14. License: distributable
  15. Group: Development/Tools
  16. Source0: http://www.moonwolf.com/ruby/archive/rdtool-%{version}.tar.gz
  17. Source1: %{rdmode_el}-install.sh
  18. Source2: %{rdmode_el}-remove.sh
  19. Source3: vine-default-%{rdmode_el}.el
  20. Source4: %{rdmode_el}-init.el
  21. URL: http://rubyforge.org/projects/rdtool/
  22. BuildArch: noarch
  23. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  24. BuildRequires: ruby, ruby-devel >= 1.8.0
  25. Requires: libruby >= 1.8.0, ruby, sh-utils
  26. Summary(ja): RDドキュメントのフォーマッタ
  27. %description
  28. RD is Ruby's POD. RDtool is formatter for RD.
  29. %description -l ja
  30. RD は Ruby においての POD です.RDtool は RD ドキュメントを
  31. 様々な形式に変換するためのツールです.
  32. Vendor: Project Vine
  33. Distribution: Vine Linux
  34. Packager: iwaim
  35. %if %{emacsen_pkg}
  36. %package -n %{rdmode_el}
  37. Summary: Emacsen major-mode for RD documents
  38. Summary: RDドキュメントのためのEmacsen用メジャーモード
  39. Group: Applications/Editors/Emacs
  40. PreReq: emacsen, emacsen-common >= 0.1
  41. %description -n %{rdmode_el}
  42. Emacsen major mode rd-mode for the RD documents
  43. %description -n %{rdmode_el} -l ja
  44. RDドキュメントのためのEmacsen用メジャーモード: rd-mode
  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 %{SOURCE3} %{SOURCE4} $RPM_BUILD_ROOT/%{_datadir}/emacs/site-lisp/%{rdmode}
  69. %_installemacsenscript %{rdmode} %{SOURCE1}
  70. %_removeemacsenscript %{rdmode} %{SOURCE2}
  71. %endif
  72. %if %{emacsen_pkg}
  73. %post -n %{rdmode_el}
  74. if [ "$1" = 2 ]; then
  75. %_emacsenPackageRemove %{rdmode}
  76. fi
  77. %_addemacsenlist %{rdmode}
  78. %_emacsenPackageInstall %{rdmode}
  79. %preun -n %{rdmode_el}
  80. if [ "$1" = 0 ]; then
  81. %_emacsenPackageRemove %{rdmode}
  82. %_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. %{emacsen_pkgdir}/install/%{rdmode}
  104. %{emacsen_pkgdir}/remove/%{rdmode}
  105. %endif
  106. %changelog
  107. * Thu Aug 5 2010 IWAI, Masaharu <iwai@alib.jp> 0.6.22-3
  108. - fix global-font-lock-mode argument in vine-default-rd-mode.el
  109. - fix: install vine-default file in rd-mode-install.el
  110. * Fri Mar 19 2010 IWAI, Masaharu <iwai@alib.jp> 0.6.22-2
  111. - apply vine-default
  112. - update rd-mode-{install,remove}.sh
  113. - add vine-default-rd-mode.el (Source3)
  114. - add rd-mode-init.el (Source4)
  115. - using emacsen_pkgdir macro
  116. - update Summary and description for rd-mode package
  117. - update URL
  118. - add Tags: Vendor, Distribution and Packager
  119. - drop unnecessary defined variable: ruby, rbindir
  120. - drop unnecessary if routine: Source1,2
  121. - drop unnecessary Prefix tag
  122. * Sat Nov 7 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.22-1
  123. - new upstream release
  124. - applied new versioning policy, spec in UTF-8
  125. * Sat Sep 16 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.20-0vl2
  126. - fixed Group typo
  127. * Wed Sep 13 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.20-0vl1
  128. - new upstream release
  129. - changed rd-mode Group to Appliations/Editors/Emacs <BTS:VineLinux:163>
  130. - s/Copyright/License/
  131. * Mon Nov 15 2004 IWAI, Masaharu <iwai@alib.jp> 0.6.17-0vl1
  132. - new upstream release
  133. - drop unnecessary packages in BuildRequires: racc and ruby-amstd
  134. - update Source0 URL
  135. - drop obsolete patch: rdtoolconf.rb.patch ( Patch0 )
  136. - drop obsolete patch: rd-mode patch ( Patch2 )
  137. - update setup and intall sections: new upstream package using setup.rb
  138. - add README.ja.html in %%doc
  139. - fix missing rd/dot.rd2rc
  140. * Mon Oct 06 2003 akira yamada <akira@vinelinux.org> rdtool-0.6.13-0vl3
  141. - build with ruby-1.8.0. it requires libruby >= 1.8.0.
  142. * Fri May 23 2003 IWAI Masaharu <iwai@alib.jp> 0.6.13-0vl2
  143. - fix typo in %%description -l ja for rdtool package
  144. - generate rd-mode package
  145. * Thu May 22 2003 IWAI Masaharu <iwai@alib.jp> 0.6.13-0vl1
  146. - new upstream version
  147. - update rdtoolconf.rb.patch (Patch0)
  148. - drop close-dt.patch (Pathc1): upstream merged
  149. - drop test in %%docdir
  150. * Sun Jun 16 2002 akira yamada <akira@vinelinux.org> 0.6.11-0vl2
  151. - added rdtool-0.6.11-close-dt.patch: ruby-ext#02080: missing </dt>
  152. - added rdtool-0.6.11-rd-mode.patch: ruby-list#35281: rd-mode.el - a bit fix
  153. * Mon Feb 04 2002 akira yamada <akira@vinelinux.org> 0.6.11-0vl1
  154. - new upstream version.
  155. - added ruby-optparse to BuildRequires.
  156. * Thu Jul 26 2001 akira yamada <akira@vinelinux.org> 0.6.10-0vl4
  157. - fixed bug in rd/rd2html-lib.rb (prepare_footnotes)
  158. - fixed bug in rd/rdblockparser.ry (desclistitem)
  159. * Thu Jul 26 2001 akira yamada <akira@vinelinux.org>
  160. - Rebuild with ruby-devel-1.6.4-0vl3.
  161. * Thu Jun 28 2001 akira yamada <akira@vinelinux.org>
  162. - Applied bugfix patch for rdvisitor.rb.
  163. * Tue Jun 12 2001 akira yamada <akira@vinelinux.org>
  164. - New upstream version 0.6.10.
  165. * Tue Mar 27 2001 akira yamada <akira@vinelinux.org>
  166. - Initial packaging.