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