[rubygem-RedCloth] Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0

Vít Ondruch vondruch at fedoraproject.org
Thu Mar 7 13:26:17 UTC 2013


commit 64df6cdde00f108a7827adc666b52182bbbf7f88
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Thu Mar 7 14:26:10 2013 +0100

    Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0

 rubygem-RedCloth.spec |   54 +++++++++++++++++-------------------------------
 1 files changed, 19 insertions(+), 35 deletions(-)
---
diff --git a/rubygem-RedCloth.spec b/rubygem-RedCloth.spec
index fa2d4cf..7b19118 100644
--- a/rubygem-RedCloth.spec
+++ b/rubygem-RedCloth.spec
@@ -1,22 +1,22 @@
 # Generated from RedCloth-4.1.9.gem by gem2rpm -*- rpm-spec -*-
 %global gem_name RedCloth
 %global gemlibname redcloth_scan.so
-%global installroot %{buildroot}%{gem_instdir}
-%global extensionddir %{installroot}/ext/redcloth_scan/
 
 Summary:       Textile parser for Ruby
 Name:          rubygem-%{gem_name}
 Version:       4.2.9
-Release:       3%{?dist}
+Release:       4%{?dist}
 Group:         Development/Languages
 License:       MIT
 URL:           http://redcloth.org
 Source0:       http://gems.rubyforge.org/gems/%{gem_name}-%{version}.gem
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires:      ruby(abi) = 1.9.1
+Requires:      ruby(release)
 Requires:      ruby(rubygems)
 BuildRequires: rubygems-devel
 BuildRequires: rubygem(rspec-core)
+BuildRequires: rubygem(rspec-mocks)
+BuildRequires: rubygem(rspec-expectations)
 BuildRequires: ruby-devel
 Provides:      rubygem(%{gem_name}) = %{version}
 
@@ -26,9 +26,8 @@ Textile parser for Ruby.
 
 %prep
 %setup -q -c -T
-export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
-gem install --local --install-dir .%{gem_dir} \
-          --force -V --rdoc %{SOURCE0}
+
+%gem_install -n %{SOURCE0}
 
 # To create debuginfo file corretly (workaround for
 # "#line" directive)
@@ -37,38 +36,20 @@ mkdir ext
 ln -sf .. ext/redcloth_scan
 popd
 
+
 %build
 
 %install
-rm -rf %{buildroot}
-
-install -d -m0755 %{buildroot}%{gem_dir}
-install -d -m0755 %{buildroot}%{ruby_vendorlibdir}
-install -d -m0755 %{buildroot}%{gem_extdir}/lib
-
-cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}
+mkdir -p %{buildroot}%{gem_dir}
+cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}/
 
-mkdir -p %{buildroot}/%{_bindir}
+mkdir -p %{buildroot}%{_bindir}
+cp -a ./%{_bindir}/* %{buildroot}%{_bindir}
 
-cp -a %{buildroot}%{gem_dir}/bin/* %{buildroot}/%{_bindir}
-mv %{extensionddir}%{gemlibname} %{buildroot}%{gem_extdir}/lib/%{gemlibname}
-rm -rf %{extensionddir}
+# Move C extension to the ext dir
+mkdir -p %{buildroot}%{gem_extdir_mri}/lib
+mv %{buildroot}%{gem_instdir}/lib/redcloth_scan.so %{buildroot}%{gem_extdir_mri}/lib/
 
-rm %{installroot}/lib/%{gemlibname}
-cp %{installroot}/lib/redcloth.rb %{buildroot}%{ruby_vendorlibdir}/redcloth.rb
-rm -rf %{buildroot}%{gem_dir}/bin
-find %{installroot}/bin -type f | xargs chmod a+x
-find %{installroot} -name "*.rb" | xargs chmod a+x
-
-find %{installroot} -type f -name \*.rb | xargs chmod 0644
-
-# 4.2.2-1 No files have the prologue to run as executables.
-#find %%{installroot} -type f -name "\*.rb" | \
-#  xargs grep -l "^#!l%%{_bindir}/env" $file | xargs chmod 0755
-
-rm -f %{installroot}/.require_paths
-rm -f %{installroot}/Manifest
-rm -f %{installroot}/RedCloth.gemspec
 %clean
 rm -rf %{buildroot}
 
@@ -82,14 +63,14 @@ popd
 %{_bindir}/redcloth
 %exclude %{gem_instdir}/.gemtest
 %exclude %{gem_instdir}/.rspec
+%exclude %{gem_instdir}/ext
 %dir %{gem_instdir}
 %{gem_instdir}/bin
 %{gem_instdir}/Gemfile
 %{gem_instdir}/redcloth.gemspec
 %{gem_instdir}/tasks
 %{gem_libdir}
-%{ruby_vendorlibdir}/redcloth.rb
-%{gem_extdir}/lib/%{gemlibname}
+%{gem_extdir_mri}/lib/%{gemlibname}
 %doc %{gem_docdir}
 %doc %{gem_instdir}/doc
 %doc %{gem_instdir}/spec
@@ -102,6 +83,9 @@ popd
 
 
 %changelog
+* Thu Mar 07 2013 Josef Stribny <jstribny at redhat.com> - 4.2.9-4
+- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.2.9-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list