rdtool-vl.spec 5.8 KB

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