[rubygems] once build 1.8.11 on _rawhide_ with providing -devel package
Mamoru Tasaka
mtasaka at fedoraproject.org
Sun Jan 29 11:34:47 UTC 2012
commit c9e055ce87a0adf6ba97984e12a0a6d2f8713bc9
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date: Sun Jan 29 20:34:44 2012 +0900
once build 1.8.11 on _rawhide_ with providing -devel package
rubygems.spec | 148 ++++++++++++++++++++------------------------------------
sources | 1 +
2 files changed, 54 insertions(+), 95 deletions(-)
---
diff --git a/rubygems.spec b/rubygems.spec
index 3316de1..08d19ad 100644
--- a/rubygems.spec
+++ b/rubygems.spec
@@ -1,15 +1,12 @@
# Upstream git:
# https://github.com/rubygems/rubygems.git
#
+%global gem_dir %(ruby -rrbconfig -e 'puts File::expand_path(File::join(Config::CONFIG["sitedir"],"..","gems"))')
+%global rb_ver %(ruby -rrbconfig -e 'puts Config::CONFIG["ruby_version"]')
+%global gem_home %{gem_dir}/%{rb_ver}
+%global ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')
-# The RubyGems library has to stay out of Ruby directory three, since the
-# RubyGems should be share by all Ruby implementations.
-%global rubygems_dir %{_datadir}/rubygems
-
-# Specify custom RubyGems root and other related macros.
-%global gem_dir %{_datadir}/gems
-# TODO: Should we create arch specific rubygems-filesystem?
-%global gem_extdir %{_exec_prefix}/lib{,64}/gems
+%global repoid 75475
# Executing testsuite (enabling %%check section) will cause dependency loop.
# To avoid dependency loop when necessary, please set the following value to 0
@@ -17,21 +14,14 @@
Summary: The Ruby standard for packaging ruby libraries
Name: rubygems
-Version: 1.8.15
+Version: 1.8.11
Release: 2%{?dist}
Group: Development/Libraries
License: Ruby or MIT
-URL: https://rubygems.org/
-Source0: http://production.cf.rubygems.org/rubygems/%{name}-%{version}.tgz
-
-# Sources from the works by Vít Ondruch <vondruch at redhat.com>
-# Please keep Source100 and Patch{105,109} in sync with ruby.spec
-
-Source100: operating_system.rb
-
-# Kill patch0 for ruby 1.9.x
-##Patch0: rubygems-1.8.5-noarch-gemdir.patch
+URL: http://rubyforge.org/projects/rubygems/
+Source0: http://rubyforge.org/frs/download.php/%{repoid}/rubygems-%{version}.tgz
+Patch0: rubygems-1.8.5-noarch-gemdir.patch
# Will discuss upstream
# https://github.com/rubygems/rubygems/issues/120
# rubygems-Patches-28631
@@ -43,30 +33,20 @@ Patch3: rubygems-1.8.5-show-rdoc-process-verbosely.patch
# on 2011-10-01)
Patch6: rubygems-1.8.5-all-load-paths.patch
-# Patches from the works by Vít Ondruch <vondruch at redhat.com>
-# Fix the uninstaller, so that it doesn't say that gem doesn't exist
-# when it exists outside of the GEM_HOME (already fixed in the upstream)
-Patch105: ruby-1.9.3-rubygems-1.8.11-uninstaller.patch
-# Add support for installing binary extensions according to FHS.
-# https://github.com/rubygems/rubygems/issues/210
-Patch109: rubygems-1.8.11-binary-extensions.patch
-
-
-Requires: ruby(abi) = 1.9.1
-Requires: rubygem(rdoc) >= 3.9.4
-Requires: rubygem(io-console) >= 0.3
-BuildRequires: ruby(abi) = 1.9.1
+Requires: ruby(abi) = 1.8
+Requires: ruby >= 1.8.7
+Requires: ruby-rdoc
+BuildRequires: ruby
+BuildRequires: ruby-rdoc
%if %{enable_check}
# For mkmf.rb
BuildRequires: ruby-devel
+BuildRequires: rubygem(hoe)
BuildRequires: rubygem(minitest)
BuildRequires: rubygem(rake)
-BuildRequires: rubygem(rdoc) >= 3.9.4
-BuildRequires: rubygem(io-console) >= 0.3
%endif
BuildArch: noarch
Provides: ruby(rubygems) = %{version}-%{release}
-Provides: gem = %{version}-%{release}
%description
RubyGems is the Ruby standard for publishing and managing third party
@@ -84,14 +64,10 @@ Macros and development tools for packagin RubyGems.
%prep
%setup -q
-#%%patch0 -p1 -b .noarch
-%if 1
+%patch0 -p1 -b .noarch
%patch1 -p1 -b .insync
%patch3 -p1 -b .rdoc_v
%patch6 -p1 -b .load_path
-%endif
-%patch105 -p1 -b .uninst
-%patch109 -p1 -b .bindir
# Some of the library files start with #! which rpmlint doesn't like
# and doesn't make much sense
@@ -99,97 +75,79 @@ for f in `find lib -name \*.rb` ; do
head -1 $f | grep -q '^#!/usr/bin/env ruby' && sed -i -e '1d' $f
done
+# Cleanups
+rm -rf rubygems-update-%{version}/
+
%build
# Nothing
%install
-GEM_HOME=%{buildroot}/%{gem_dir} \
- ruby setup.rb --rdoc --prefix=/ \
- --destdir=%{buildroot}/%{rubygems_dir}/
+GEM_HOME=%{buildroot}/%{gem_home} \
+ ruby setup.rb --prefix=/ \
+ --no-rdoc --no-ri \
+ --destdir=%{buildroot}/%{ruby_sitelib}/
mkdir -p %{buildroot}/%{_bindir}
-mv %{buildroot}/%{rubygems_dir}/bin/gem %{buildroot}/%{_bindir}/gem
-rm -rf %{buildroot}/%{rubygems_dir}/bin
+mv %{buildroot}/%{ruby_sitelib}/bin/gem %{buildroot}/%{_bindir}/gem
+rm -rf %{buildroot}/%{ruby_sitelib}/bin
+mv %{buildroot}/%{ruby_sitelib}/lib/* %{buildroot}/%{ruby_sitelib}/.
-mv %{buildroot}/%{rubygems_dir}/lib/* %{buildroot}/%{rubygems_dir}/.
-# No longer needed
-rmdir %{buildroot}%{rubygems_dir}/lib
+# FIXME!!
+mkdir -p $RPM_BUILD_ROOT%{gem_home}/{cache,gems,specifications,doc}
-# Install custom operating_system.rb.
-mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults
-install -cpm 0644 %{SOURCE100} %{buildroot}%{rubygems_dir}/rubygems/defaults/
-
-# Create gem folders.
-mkdir -p %{buildroot}%{gem_dir}/{cache,gems,specifications,doc}
-mkdir -p %{buildroot}%{gem_extdir}/exts
-
-# Create macros.rubygems file for rubygems-devel
+# create macros.rubygems
mkdir -p %{buildroot}%{_sysconfdir}/rpm
-
cat >> %{buildroot}%{_sysconfdir}/rpm/macros.rubygems << \EOF
# The RubyGems root folder.
-%%gem_dir %{gem_dir}
+%%gem_dir %{gem_home}
# Common gem locations and files.
+# ... But don't provide gem_extdir for F-16 and below
+# - This directory won't work
%%gem_instdir %%{gem_dir}/gems/%%{gem_name}-%%{version}
-%%gem_extdir %%{_libdir}/gems/exts/%%{gem_name}-%%{version}
%%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}
EOF
+
%if %{enable_check}
%check
-# Create an empty operating_system.rb, so that the system's one doesn't get used,
-# otherwise the test suite fails.
-mkdir -p lib/rubygems/defaults
-touch lib/rubygems/defaults/operating_system.rb
-
-# It is necessary to specify the paths using RUBYOPT to let the test suite pass."
-GEM_PATH=%{gem_dir} RUBYOPT="-Itest -I%{_libdir}/gems/exts/io-console-0.3/lib/ -I./lib/" \
- testrb test
+# Don't use isolate
+sed -i.tmp -e '\@isolate at d' Rakefile
+rake test || :
+mv Rakefile.tmp Rakefile
%endif
%files
+%defattr(-, root, root, -)
%doc README*
+#%%doc ChangeLog
%doc History.txt
%doc MIT.txt LICENSE.txt
%dir %{gem_dir}
-%dir %{gem_dir}/cache
-%dir %{gem_dir}/gems
-%dir %{gem_dir}/specifications
-%doc %{gem_dir}/doc
+%dir %{gem_home}
+%dir %{gem_home}/cache
+%dir %{gem_home}/gems
+%dir %{gem_home}/specifications
+%doc %{gem_home}/doc
%{_bindir}/gem
-%dir %{rubygems_dir}/
-%{rubygems_dir}/rbconfig/
-%{rubygems_dir}/rubygems/
-%{rubygems_dir}/rubygems.rb
-%{rubygems_dir}/ubygems.rb
-%{rubygems_dir}/gauntlet_rubygems.rb
-
-%dir %{_exec_prefix}/lib/gems
-%dir %{_exec_prefix}/lib64/gems
-%dir %{_exec_prefix}/lib/gems/exts
-%dir %{_exec_prefix}/lib64/gems/exts
+%dir %{ruby_sitelib}/
+%{ruby_sitelib}/gauntlet_rubygems.rb
+%{ruby_sitelib}/lib
+%{ruby_sitelib}/rbconfig/
+%{ruby_sitelib}/rubygems/
+%{ruby_sitelib}/rubygems.rb
+%{ruby_sitelib}/ubygems.rb
%files devel
%config(noreplace) %{_sysconfdir}/rpm/macros.rubygems
%changelog
-* Thu Jan 26 2012 Vít Ondruch <vondruch at redhat.com> - 1.8.15-2
-- Make test suite green.
-
-* Thu Jan 26 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.8.15-1
-- 1.8.15
-
-* Thu Jan 26 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.8.11-10
-- Incorpolate works by Vít Ondruch <vondruch at redhat.com>
- made for ruby 1.9.x
-
-* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.8.11-2
-- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+* Thu Jan 26 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.8.11-1.1
+- Provide -devel package except for %%gem_extdir
* Mon Nov 11 2011 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.8.11-1
- 1.8.11
diff --git a/sources b/sources
index 515f672..22ad7da 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
4e9fc1aa1be60439adf4132250424679 rubygems-1.8.15.tgz
+5c796d4423e5186c61e844b9beb6efec rubygems-1.8.11.tgz
More information about the scm-commits
mailing list