rdtool-vl.spec 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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: 2%{?_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. * Fri Mar 19 2010 IWAI, Masaharu <iwai@alib.jp> 0.6.22-2
  108. - apply vine-default
  109. - update rd-mode-{install,remove}.sh
  110. - add vine-default-rd-mode.el (Source3)
  111. - add rd-mode-init.el (Source4)
  112. - using emacsen_pkgdir macro
  113. - update Summary and description for rd-mode package
  114. - update URL
  115. - add Tags: Vendor, Distribution and Packager
  116. - drop unnecessary defined variable: ruby, rbindir
  117. - drop unnecessary if routine: Source1,2
  118. - drop unnecessary Prefix tag
  119. * Sat Nov 7 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.22-1
  120. - new upstream release
  121. - applied new versioning policy, spec in UTF-8
  122. * Sat Sep 16 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.20-0vl2
  123. - fixed Group typo
  124. * Wed Sep 13 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.6.20-0vl1
  125. - new upstream release
  126. - changed rd-mode Group to Appliations/Editors/Emacs <BTS:VineLinux:163>
  127. - s/Copyright/License/
  128. * Mon Nov 15 2004 IWAI, Masaharu <iwai@alib.jp> 0.6.17-0vl1
  129. - new upstream release
  130. - drop unnecessary packages in BuildRequires: racc and ruby-amstd
  131. - update Source0 URL
  132. - drop obsolete patch: rdtoolconf.rb.patch ( Patch0 )
  133. - drop obsolete patch: rd-mode patch ( Patch2 )
  134. - update setup and intall sections: new upstream package using setup.rb
  135. - add README.ja.html in %%doc
  136. - fix missing rd/dot.rd2rc
  137. * Mon Oct 06 2003 akira yamada <akira@vinelinux.org> rdtool-0.6.13-0vl3
  138. - build with ruby-1.8.0. it requires libruby >= 1.8.0.
  139. * Fri May 23 2003 IWAI Masaharu <iwai@alib.jp> 0.6.13-0vl2
  140. - fix typo in %%description -l ja for rdtool package
  141. - generate rd-mode package
  142. * Thu May 22 2003 IWAI Masaharu <iwai@alib.jp> 0.6.13-0vl1
  143. - new upstream version
  144. - update rdtoolconf.rb.patch (Patch0)
  145. - drop close-dt.patch (Pathc1): upstream merged
  146. - drop test in %%docdir
  147. * Sun Jun 16 2002 akira yamada <akira@vinelinux.org> 0.6.11-0vl2
  148. - added rdtool-0.6.11-close-dt.patch: ruby-ext#02080: missing </dt>
  149. - added rdtool-0.6.11-rd-mode.patch: ruby-list#35281: rd-mode.el - a bit fix
  150. * Mon Feb 04 2002 akira yamada <akira@vinelinux.org> 0.6.11-0vl1
  151. - new upstream version.
  152. - added ruby-optparse to BuildRequires.
  153. * Thu Jul 26 2001 akira yamada <akira@vinelinux.org> 0.6.10-0vl4
  154. - fixed bug in rd/rd2html-lib.rb (prepare_footnotes)
  155. - fixed bug in rd/rdblockparser.ry (desclistitem)
  156. * Thu Jul 26 2001 akira yamada <akira@vinelinux.org>
  157. - Rebuild with ruby-devel-1.6.4-0vl3.
  158. * Thu Jun 28 2001 akira yamada <akira@vinelinux.org>
  159. - Applied bugfix patch for rdvisitor.rb.
  160. * Tue Jun 12 2001 akira yamada <akira@vinelinux.org>
  161. - New upstream version 0.6.10.
  162. * Tue Mar 27 2001 akira yamada <akira@vinelinux.org>
  163. - Initial packaging.