Dne 23.12.2013 18:24, Vít Ondruch napsal(a):
>
> 1) Modify our operating_system.rb and let it treat gem installation
> into %{buildroot} specially
I went ahead with this option and this [1] is the implementation. In
attachment, you can see the changes needed to rubygem-bcrypt-ruby.spec.
Few comments:
* I am going to backport patches to remove the "rm -rf
%{buildroot}%{gem_dir}/doc/extensions" need.
* Not sure if there is some neat way how to get rid of the
"-I%{buildroot}%{gem_extdir_mri}" from the %check section though :/ May
be "-I$(dirs +1)%{gem_extdir_mri}" could be better pattern, since it
points into ${_builddir}, i.e. into the directory where the test suite
is executed. Any thoughts on this topic?
Vít
[1]
http://pkgs.fedoraproject.org/cgit/ruby.git/commit/?h=private-ruby-2.1&id=19ff4992f3753a8a614abf5088635b6fbd2464e0
diff --git a/rubygem-bcrypt-ruby.spec b/rubygem-bcrypt-ruby.spec
index 59f020e..260e38d 100644
--- a/rubygem-bcrypt-ruby.spec
+++ b/rubygem-bcrypt-ruby.spec
@@ -38,15 +38,20 @@ mkdir -p %{buildroot}%{gem_dir}
cp -pa .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
-mkdir -p %{buildroot}%{gem_extdir_mri}/lib
-mv %{buildroot}%{gem_libdir}/bcrypt_ext.so %{buildroot}%{gem_extdir_mri}/lib
+mkdir -p %{buildroot}%{gem_extdir_mri}
+cp -pa .%{gem_extdir_mri}/* \
+ %{buildroot}%{gem_extdir_mri}/
# Prevent dangling symlink in -debuginfo (rhbz#878863).
rm -rf %{buildroot}%{gem_instdir}/ext/
+# This is unexpected and unnecessary.
+# https://github.com/rubygems/rubygems/issues/758
+rm -rf %{buildroot}%{gem_dir}/doc/extensions
+
%check
pushd .%{gem_instdir}
-rspec spec
+rspec -I%{buildroot}%{gem_extdir_mri} spec
popd
%files
_______________________________________________
ruby-sig mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/ruby-sig