%rubygems_requires %{rubygems19_requires} %rb_binary %{rb19_binary} %gem_binary /usr/bin/gem1.9 %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 # old names %rb_sitelib %rb19_sitelibdir %rb_sitearch %rb19_sitearchdir # %rb_vendorlib %rb19_vendorlibdir %rb_vendorarch %rb19_vendorarchdir # %%gem_unpack macro unpacks a gem file into %%{_builddir} # # example: # %prep # %gem_unpack %{SOURCE0} # %patch1 -p1 # %gem_unpack() \ if [ %# -eq 0 ]; then \ %{gem_binary} unpack --verbose %{SOURCE0} \ else \ %{gem_binary} unpack --verbose %1 \ fi \ cd %{mod_name}-%{version} \ %{nil} # %%gem_build macro ... # %gem_build() \ GEMSPEC_SOURCE_DIR=`find . -maxdepth 2 -type f -name "*.gemspec" | xargs dirname` \ cd $GEMSPEC_SOURCE_DIR && %{gem_binary} build --verbose *.gemspec \ %{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. # %gem_install() \ if [ %# -ge 1 ]; then \ %{gem_binary} install --verbose --local --build-root=%{buildroot} %* ;\ else \ GEM_FILE=`find . -maxdepth 2 -type f -name "%{mod_name}-%{version}.gem"` \ %{gem_binary} install --verbose --local --bindir %{buildroot}%{_bindir} --install-dir %{buildroot}%{_libdir}/ruby/gems/%{rb_ver} $GEM_FILE \ fi; \ if test -d $RPM_BUILD_ROOT/usr/bin; then \ cd $RPM_BUILD_ROOT/usr/bin; \ bins=`ls -1 *1.9 2> /dev/null`; \ if test -n "$bins"; then \ for bin in $bins; do \ mv -v $bin $(echo "$bin" | sed -e 's,1.9$,,'); \ done ;\ fi ;\ fi ;\ %{nil} %gem_cleanup() \ /usr/bin/gem_build_cleanup %{buildroot}%{_libdir}/ruby/gems/%{rb_ver}/ \ %{nil}