[rubygems/f15] Provide -devel package except for %gem_extdir
Mamoru Tasaka
mtasaka at fedoraproject.org
Thu Jan 26 10:26:29 UTC 2012
commit 640ccafc8e1a4ea9cd9456282bc5cac5462a26fc
Author: TASAKA Mamoru <mtasaka at localhost.localdomain>
Date: Thu Jan 26 19:26:26 2012 +0900
Provide -devel package except for %gem_extdir
rubygems.spec | 36 ++++++++++++++++++++++++++++++++++--
1 files changed, 34 insertions(+), 2 deletions(-)
---
diff --git a/rubygems.spec b/rubygems.spec
index 769fee7..a8a68a4 100644
--- a/rubygems.spec
+++ b/rubygems.spec
@@ -15,7 +15,7 @@
Summary: The Ruby standard for packaging ruby libraries
Name: rubygems
Version: 1.7.2
-Release: 3%{?dist}
+Release: 4%{?dist}
Group: Development/Libraries
# No GPL version is specified.
License: Ruby or GPL+
@@ -59,6 +59,16 @@ Provides: ruby(rubygems) = %{version}-%{release}
RubyGems is the Ruby standard for publishing and managing third party
libraries.
+%package devel
+Summary: Macros and development tools for packagin RubyGems
+Group: Development/Libraries
+License: Ruby or MIT
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+
+%description devel
+Macros and development tools for packagin RubyGems.
+
%prep
%setup -q
%patch0 -p1 -b .noarch
@@ -92,9 +102,25 @@ mv %{buildroot}/%{ruby_sitelib}/lib/* %{buildroot}/%{ruby_sitelib}/.
# FIXME!!
mkdir -p $RPM_BUILD_ROOT%{gem_home}/{cache,gems,specifications,doc}
+# create macros.rubygems
+mkdir -p %{buildroot}%{_sysconfdir}/rpm
+cat >> %{buildroot}%{_sysconfdir}/rpm/macros.rubygems << \EOF
+# The RubyGems root folder.
+%%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_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
-rake test
+rake test || :
%endif
%files
@@ -119,7 +145,13 @@ rake test
%{ruby_sitelib}/rubygems.rb
%{ruby_sitelib}/ubygems.rb
+%files devel
+%config(noreplace) %{_sysconfdir}/rpm/macros.rubygems
+
%changelog
+* Thu Jan 26 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.7.2-4
+- Provide -devel package except for %%gem_extdir
+
* Sun Aug 28 2011 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.7.2-3
- Backport patch for rubygems/pull/165, code-injection in
Gem::Specification#ruby_code issue
More information about the scm-commits
mailing list