Blame SOURCES/macros.rubygems

364bab
# The RubyGems root folder.
364bab
%gem_dir %{_datadir}/gems
364bab
%gem_archdir %{_libdir}/gems
364bab
364bab
# Common gem locations and files.
364bab
%gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}
364bab
%gem_extdir_mri %{gem_archdir}/ruby/%{gem_name}-%{version}
364bab
%gem_libdir %{gem_instdir}/lib
364bab
%gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem
364bab
%gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec
364bab
%gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}
364bab
364bab
# Install gem into appropriate directory.
364bab
# -n<gem_file>      Overrides gem file name for installation.
364bab
# -d<install_dir>   Set installation directory.
364bab
%gem_install(d:n:) \
364bab
mkdir -p %{-d*}%{!?-d:.%{gem_dir}} \
364bab
\
364bab
CONFIGURE_ARGS="--with-cflags='%{optflags}' $CONFIGURE_ARGS" \\\
364bab
gem install \\\
364bab
        -V \\\
364bab
        --local \\\
364bab
        --build-root %{-d*}%{!?-d:.} \\\
364bab
        --force \\\
364bab
        --document=ri,rdoc \\\
364bab
        %{-n*}%{!?-n:%{gem_name}-%{version}.gem} \
364bab
%{nil}
364bab
364bab
# For rubygems packages we want to filter out any provides caused by private
364bab
# libs in %%{gem_archdir}.
364bab
#
364bab
# Note that this must be invoked in the spec file, preferably as
364bab
# "%{?rubygems_default_filter}", before any %description block.
364bab
%rubygems_default_filter %{expand: \
364bab
%global __provides_exclude_from %{?__provides_exclude_from:%{__provides_exclude_from}|}^%{gem_extdir_mri}/.*\\\\.so$ \
364bab
}