Ruby SIG:Draft Package Guidelines/Example Ruby Macros File

%rubyabi %(%{_bindir}/ruby -r rbconfig -e 'puts RUBY_VERSION') %rubyapi %(%{_bindir}/ruby -r rbconfig -e 'puts RUBY_VERSION') %rubyabi_mm %(echo %rubyabi | awk -F'.' '{print $1 "." $2}') %rubyapi_mm %(echo %rubyapi | awk -F'.' '{print $1 "." $2}') %ruby_sitelib %{_prefix}/local/share/ruby/ %ruby_sitearch %{_prefix}/local/%{_lib}/ruby/ %_ruby_extconf \ export CONFIGURE_ARGS="--vendor" \ %{_bindir}/ruby extconf.rb ## ## %ruby_multiver_package %(for ruby_version in %{ruby_versions}; do \ echo "\ \ %package -n ruby-${ruby_version}-%{ruby_libname} \ BuildRequires: ruby-${ruby_version} \ BuildRequires:  ruby(abi) = ${ruby_version} \ Requires:       ruby(abi) = ${ruby_version} \ Summary:        Ruby ${ruby_version} version for package %{name} \ \ %description -n ruby-${ruby_version}-%{ruby_libname} \ This is the ${ruby_version} Ruby version package for %{name} \ \ "; done) ## ## %ruby_multiver_setup %(for ruby_version in %{ruby_versions}; do \ echo "\ \ %setup -q -c -n ruby-${ruby_version}-%{ruby_libname} \ \ "; done) ## ## %ruby_multiver_build %(echo "\ \ for ruby_version in %{ruby_versions}; do \ pushd ruby-\\${ruby_version}-%{ruby_libname} \ build_rubyver \\${ruby_version} \ make %{?_smp_mflags} \ popd \ \ done \ ") %ruby_vendorlib %{_datadir}/ruby/ %ruby_vendorarch %{_libdir}/ruby/ %ruby_sitelib_192 %{_prefix}/local/share/ruby/1.9.2/ %ruby_sitelib_191 %{_prefix}/local/share/ruby/1.9.1/ %ruby_sitelib_19 %{_prefix}/local/share/ruby/1.9/ %ruby_sitelib_187 %{_prefix}/local/share/ruby/1.8.7/ %ruby_sitelib_186 %{_prefix}/local/share/ruby/1.8.6/ %ruby_sitelib_185 %{_prefix}/local/share/ruby/1.8.5/ %ruby_sitelib_18 %{_prefix}/local/share/ruby/1.8/ %ruby_sitearch_192 %{_prefix}/local/%{_lib}/ruby/1.9.2/ %ruby_sitearch_191 %{_prefix}/local/%{_lib}/ruby/1.9.1/ %ruby_sitearch_19 %{_prefix}/local/%{_lib}/ruby/1.9/ %ruby_sitearch_187 %{_prefix}/local/%{_lib}/ruby/1.8.7/ %ruby_sitearch_186 %{_prefix}/local/%{_lib}/ruby/1.8.6/ %ruby_sitearch_185 %{_prefix}/local/%{_lib}/ruby/1.8.5/ %ruby_sitearch_18 %{_prefix}/local/%{_lib}/ruby/1.8/ %ruby_vendorlib_192 %{_datadir}/ruby/1.9.2/ %ruby_vendorlib_191 %{_datadir}/ruby/1.9.1/ %ruby_vendorlib_19 %{_datadir}/ruby/1.9/ %ruby_vendorlib_187 %{_datadir}/ruby/1.8.7/ %ruby_vendorlib_186 %{_datadir}/ruby/1.8.6/ %ruby_vendorlib_185 %{_datadir}/ruby/1.8.5/ %ruby_vendorlib_18 %{_datadir}/ruby/1.8/ %ruby_vendorarch_192 %{_libdir}/ruby/1.9.2/ %ruby_vendorarch_191 %{_libdir}/ruby/1.9.1/ %ruby_vendorarch_19 %{_libdir}/ruby/1.9/ %ruby_vendorarch_187 %{_libdir}/ruby/1.8.7/ %ruby_vendorarch_186 %{_libdir}/ruby/1.8.6/ %ruby_vendorarch_185 %{_libdir}/ruby/1.8.5/ %ruby_vendorarch_18 %{_libdir}/ruby/1.8/
 * 1) General Ruby package locations
 * 1) This is the local lib/arch and should not be used for packaging
 * 1) ruby extconf.rb is tricky, as it requires an environment variable
 * 2) CONFIGURE_ARGS to include --vendor for everything to end up in the
 * 3) correct directory
 * 1) Multi-version package macro
 * 1) Multi-version setup macro
 * 1) Multi-version build macro
 * 1) This is the general location for libs/archs compatible with all
 * 2) or most of the Ruby versions available in the Fedora repositories
 * 1) This are more specific