rubygems-vl.spec 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. %define ruby /usr/bin/ruby
  2. %define rdoc /usr/bin/rdoc
  3. %define gemdir %{_localstatedir}/lib/gems/%(%{ruby} -r rbconfig -e 'print File.basename(Config::CONFIG["rubylibdir"])')
  4. Summary: packaging system for Ruby application or library
  5. Summary(ja): Rubyアプリケーションやライブラリのためのパッケージシステム
  6. Name: rubygems
  7. Version: 1.3.7
  8. Release: 1%{?_dist_release}
  9. License: distributable
  10. Group: Development/Tools
  11. Source0: rubygems-%{version}.tgz
  12. Patch1: rubygems-1.3.7-default-dir.patch
  13. URL: http://www.rubygems.org/
  14. BuildArch: noarch
  15. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  16. BuildPreReq: ruby ruby-devel rdoc
  17. Requires: ruby ruby-devel rdoc
  18. %description
  19. RubyGems is the name of the project that developed the gem packaging
  20. system and the gem command.
  21. * Easy Installation and removal of RubyGems packages and their
  22. dependents.
  23. * Management and control of local packages
  24. * Package dependency management
  25. * Query, search and list local and remote packages
  26. * Multiple version support for installed packages
  27. * Web-based interface to view the documentation for your installed
  28. gems
  29. * Easy to use interface for building gem packages
  30. * Simple server for distributing your own gem packages
  31. %description -l ja
  32. %prep
  33. %setup -q
  34. %patch1 -p1
  35. %install
  36. rm -rf ${RPM_BUILD_ROOT}
  37. mkdir -p ${RPM_BUILD_ROOT}%{rbindir}
  38. mkdir -p ${RPM_BUILD_ROOT}%{rlibdir}
  39. #%{ruby} -I${RPM_BUILD_ROOT}%{rlibdir} \
  40. %{ruby} -I%{rlibdir} setup.rb install --destdir=${RPM_BUILD_ROOT}%{rlibdir} --prefix=/
  41. # fix install path
  42. mkdir -p %{buildroot}%{_bindir}
  43. mv %{buildroot}%{rlibdir}/bin/gem %{buildroot}%{_bindir}/gem
  44. rm -rf %{buildroot}%{rlibdir}/bin
  45. mv %{buildroot}%{rlibdir}/lib/* %{buildroot}%{rlibdir}/.
  46. %{rdoc} --op html \
  47. --main README . README LICENSE.txt GPL.txt
  48. %{rdoc} --ri --op ${RPM_BUILD_ROOT}%{gemdir}/doc/%{name}-%{version} \
  49. --main README . README LICENSE.txt GPL.txt
  50. rm -f ${RPM_BUILD_ROOT}%{gemdir}/doc/rubygems-%{version}/created.rid
  51. cd pkgs/sources
  52. GEM_HOME=${RPM_BUILD_ROOT}%{gemdir} \
  53. %{ruby} -I${RPM_BUILD_ROOT}%{rlibdir} \
  54. -rrubygems -rrubygems/builder -rrubygems/installer -e '
  55. load("./sources.gemspec")
  56. spec = Gem.sources_spec
  57. gem = Gem::Builder.new(spec).build
  58. Gem::Installer.new(gem).install()
  59. '
  60. cd ../..
  61. %clean
  62. rm -rf ${RPM_BUILD_ROOT}
  63. rm -rf html
  64. %pre
  65. if [ `grep rubygems %{_sysconfdir}/group | wc -l` = 0 ]; then
  66. %{_sbindir}/groupadd rubygems
  67. fi
  68. %files
  69. %defattr(-, root, root)
  70. %doc ChangeLog
  71. %doc GPL.txt
  72. %doc LICENSE.txt
  73. %doc README
  74. %doc TODO
  75. %doc html
  76. %{rbindir}/*
  77. %{rlibdir}/*
  78. %defattr(664,root,rubygems,775)
  79. %{gemdir}
  80. %changelog
  81. * Thu Sep 16 2010 IWAI, Masaharu <iwai@alib.jp> 1.3.7-1
  82. - new upstream release
  83. - update default dir patch (Patch1)
  84. * Mon Dec 14 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.3.5-1
  85. - new upstream release
  86. * Sat Mar 7 2009 IWAI, Masaharu <iwai@alib.jp> 1.3.1-1
  87. - new upstream release
  88. - apply new versioning policy
  89. - spec in UTF-8
  90. - update URL
  91. - update default dir patch (Patch1)
  92. - drop fix shebang patch (Patch2)
  93. - drop postinst patch (Patch3)
  94. - add install dir patch (Patch4)
  95. - update %%install section
  96. - create rubygems group for %%{gemdir}
  97. * Mon Mar 19 2007 akira yamada <akira@vinelinux.org> 0.9.2-0vl1
  98. - initial packaging.