[rubygem-foreigner] Updated the specfile to reflect current Ruby packaging guidelines.

Darryl L. Pierce mcpierce at fedoraproject.org
Thu Dec 20 21:37:36 UTC 2012


commit 864af7da01266be6f3eabb4f4ba38880fa34d428
Author: Darryl L. Pierce <dpierce at redhat.com>
Date:   Thu Dec 20 16:37:27 2012 -0500

    Updated the specfile to reflect current Ruby packaging guidelines.

 rubygem-foreigner.spec |   33 +++++++++++++++++++++++----------
 1 files changed, 23 insertions(+), 10 deletions(-)
---
diff --git a/rubygem-foreigner.spec b/rubygem-foreigner.spec
index ee42524..208e84a 100644
--- a/rubygem-foreigner.spec
+++ b/rubygem-foreigner.spec
@@ -5,21 +5,22 @@
 Summary:       Foreign Keys for Rails
 Name:          rubygem-%{gem_name}
 Version:       1.2.1
-Release:       1%{?dist}
+Release:       1.1%{?dist}
 License:       MIT
+
 URL:           http://github.com/matthuhiggins/foreigner
 Source0:       http://rubygems.org/gems/%{gem_name}-%{version}.gem
 
 Provides:      rubygem(%{gem_name}) = %{version}
 
-Requires:      ruby(abi) = %{rubyabi}
-Requires:      ruby(rubygems) >= 1.3.5
-Requires:      rubygem(activerecord) >= 3.0.0
-
 BuildArch:     noarch
 
 BuildRequires: rubygems-devel
 
+Requires:      ruby(abi) = %{rubyabi}
+Requires:      rubygems
+Requires:      rubygem(activerecord) >= 3.0.0
+
 
 %description
 Adds helpers to migrations and correctly dumps foreign keys to schema.rb.
@@ -36,17 +37,26 @@ BuildArch: noarch
 
 
 %prep
+gem unpack %{SOURCE0}
+%setup -q -D -T -n %{gem_name}-%{version}
 
+gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
 
-%build
+# apply any patches here
 
 
-%install
-gem install --local --install-dir %{buildroot}%{gem_dir} \
-            --force --rdoc %{SOURCE0}
+%build
+gem build %{gem_name}.gemspec
 
+gem install --local \
+            --install-dir .%{gem_dir} \
+            --force \
+            --rdoc %{SOURCE0}
 
-%check
+
+%install
+mkdir -p %{buildroot}%{gem_dir}
+cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}/
 
 
 %files
@@ -65,6 +75,9 @@ gem install --local --install-dir %{buildroot}%{gem_dir} \
 
 
 %changelog
+* Thu Dec 20 2012 Darryl L. Pierce <dpierce at redhat.com> - 1.2.1-1.1
+- Updated the specfile to reflect current Ruby packaging guidelines.
+
 * Thu Aug  9 2012 Darryl L. Pierce <dpierce at redhat.com> - 1.2.1-1
 - Rebased on foreigner release 1.2.1.
 


More information about the scm-commits mailing list