ruby/ruby.macros

44 lines
2.3 KiB
Plaintext
Raw Normal View History

%rb_binary /usr/bin/ruby
%rb_arch %(%{rb_binary} -e 'print RUBY_PLATFORM')
%rb_ver %(%{rb_binary} -r rbconfig -e 'print RbConfig::CONFIG["ruby_version"]')
#
## Base
# "rubylibprefix"=>"/usr/lib64/ruby",
%rb_dir %(%{rb_binary} -rrbconfig -e 'puts RbConfig::CONFIG["rubylibprefix"]' )
# "rubylibdir" =>"/usr/lib64/ruby/2.1.0",
%rb_libdir %(%{rb_binary} -rrbconfig -e 'puts RbConfig::CONFIG["rubylibdir"]' )
# "archdir" =>"/usr/lib64/ruby/2.1.0/x86_64-linux",
%rb_archdir %(%{rb_binary} -rrbconfig -e 'puts RbConfig::CONFIG["archdir"]' )
## Site
# "sitedir" =>"/usr/lib64/ruby/site_ruby",
%rb_sitedir %(%{rb_binary} -rrbconfig -e 'puts RbConfig::CONFIG["sitedir"]' )
# "sitelibdir" =>"/usr/lib64/ruby/site_ruby/2.1.0",
%rb_sitelibdir %(%{rb_binary} -rrbconfig -e 'puts RbConfig::CONFIG["sitelibdir"]' )
# "sitearchdir" =>"/usr/lib64/ruby/site_ruby/2.1.0/x86_64-linux",
%rb_sitearchdir %(%{rb_binary} -rrbconfig -e 'puts RbConfig::CONFIG["sitearchdir"]' )
## Vendor
# "vendordir" =>"/usr/lib64/ruby/vendor_ruby",
%rb_vendordir %(%{rb_binary} -rrbconfig -e 'puts RbConfig::CONFIG["vendordir"]' )
# "vendorlibdir" =>"/usr/lib64/ruby/vendor_ruby/2.1.0",
%rb_vendorlibdir %(%{rb_binary} -rrbconfig -e 'puts RbConfig::CONFIG["vendorlibdir"]' )
# "vendorarchdir" =>"/usr/lib64/ruby/vendor_ruby/2.1.0/x86_64-linux",
%rb_vendorarchdir %(%{rb_binary} -rrbconfig -e 'puts RbConfig::CONFIG["vendorarchdir"]' )
# backward compat
%rb_sitearch %{rb_sitearchdir}
%rb_sitelib %{rb_sitelibdir}
%rb_vendorlib %{rb_vendorlibdir}
%rb_vendorarch %{rb_vendorarchdir}
%gem_install /usr/lib/rpm/gem_install_wrapper.sh
%gem_cleanup /usr/bin/gem_build_cleanup %{buildroot}%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_name}-%{version}/
%gem_base %(%{rb_binary} -rrubygems -e 'print Gem::BasicSpecification.new.base_dir' )
%gem_extensions %(%{rb_binary} -rrubygems -e 'print Gem::BasicSpecification.new.extensions_dir' )
%gem_doc_ext %(%{rb_binary} -rrubygems -e 'bs = Gem::BasicSpecification.new; rp = bs.extensions_dir.rpartition(bs.base_dir); print rp[1]+"/doc"+rp[2]' )
%gem_platform %(%{rb_binary} -rrubygems -r rbconfig -e 'print Gem::Platform.new(RbConfig::CONFIG["arch"]).to_s' )