2012-05-08 13:54:54 +02:00
|
|
|
%rubygems_requires %{rubygems19_requires}
|
|
|
|
|
|
|
|
%rb_binary %{rb19_binary}
|
2012-07-09 07:18:17 +02:00
|
|
|
%gem_binary /usr/bin/gem1.9
|
2012-05-08 13:54:54 +02:00
|
|
|
%rb_arch %{rb19_arch}
|
|
|
|
%rb_ver %{rb19_ver}
|
|
|
|
|
|
|
|
%rb_dir %{rb19_dir}
|
|
|
|
%rb_libdir %{rb19_libdir}
|
|
|
|
%rb_archdir %{rb19_archdir}
|
|
|
|
|
|
|
|
%rb_sitedir %rb19_sitedir
|
|
|
|
%rb_sitelibdir %rb19_sitelibdir
|
|
|
|
%rb_sitearchdir %rb19_sitearchdir
|
|
|
|
|
|
|
|
%rb_vendordir %rb19_vendordir
|
|
|
|
%rb_vendorlibdir %rb19_vendorlibdir
|
|
|
|
%rb_vendorarchdir %rb19_vendorarchdir
|
|
|
|
|
2012-06-19 13:40:52 +02:00
|
|
|
|
|
|
|
# old names
|
|
|
|
%rb_sitelib %rb19_sitelibdir
|
|
|
|
%rb_sitearch %rb19_sitearchdir
|
|
|
|
#
|
|
|
|
%rb_vendorlib %rb19_vendorlibdir
|
|
|
|
%rb_vendorarch %rb19_vendorarchdir
|
|
|
|
|
2012-07-04 07:08:42 +02:00
|
|
|
# %%gem_unpack macro unpacks a gem file into %%{_builddir}
|
|
|
|
#
|
|
|
|
# example:
|
|
|
|
# %prep
|
|
|
|
# %gem_unpack %{SOURCE0}
|
|
|
|
# %patch1 -p1
|
|
|
|
#
|
2012-07-26 09:25:42 +02:00
|
|
|
%gem_unpack(s:) \
|
|
|
|
source=%{-s:%{-s*}}%{!-s:%{SOURCE0}} \
|
|
|
|
%{gem_binary} unpack --verbose $source \
|
|
|
|
cd %{mod_name}-%{version} \
|
|
|
|
chmod og-w -R . \
|
|
|
|
%{gem_binary} unpack --spec --verbose $source \
|
2012-07-04 07:08:42 +02:00
|
|
|
%{nil}
|
|
|
|
|
|
|
|
# %%gem_build macro ...
|
|
|
|
#
|
|
|
|
%gem_build() \
|
2012-07-26 09:25:42 +02:00
|
|
|
GEMSPEC_SOURCE_DIR=`find . -maxdepth 2 -type f -name %{mod_name}-%{version}.gemspec | xargs dirname` \
|
|
|
|
cd $GEMSPEC_SOURCE_DIR && %{gem_binary} build --verbose %{mod_name}-%{version}.gemspec \
|
2012-07-04 07:08:42 +02:00
|
|
|
%{nil}
|
|
|
|
|
|
|
|
# %%gem_install macro ...
|
|
|
|
#
|
|
|
|
# When invoked with a single parameter, the macro retains the old macro behavior, i.e.
|
|
|
|
# building the upstream gem directly in $RPM_BUILD_ROOT without unpacking to %{_builddir} first.
|
|
|
|
#
|
2012-07-26 09:25:42 +02:00
|
|
|
%gem_install /usr/lib/rpm/gem_install.sh --default-gem %{mod_name}-%{version}.gem --build-root %{buildroot} --gem-binary %{gem_binary}
|
2012-07-04 07:08:42 +02:00
|
|
|
|
|
|
|
%gem_cleanup() \
|
2012-07-26 09:25:42 +02:00
|
|
|
/usr/lib/rpm/gem_build_cleanup.sh %{buildroot}%{_libdir}/ruby/gems/%{rb_ver}/ \
|
2012-07-04 07:08:42 +02:00
|
|
|
%{nil}
|
|
|
|
|