[ruby-shadow] Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
Vít Ondruch
vondruch at fedoraproject.org
Mon Mar 18 15:03:08 UTC 2013
commit cfa1dabeabe826d91793ac9f69437197cb3c7a56
Author: Vít Ondruch <vondruch at redhat.com>
Date: Mon Mar 18 15:33:42 2013 +0100
Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
ruby-shadow-2.2.0-Add-support-for-ruby-2.0.patch | 29 ++++++++++++++++++++++
ruby-shadow.spec | 24 ++++++++++++------
2 files changed, 45 insertions(+), 8 deletions(-)
---
diff --git a/ruby-shadow-2.2.0-Add-support-for-ruby-2.0.patch b/ruby-shadow-2.2.0-Add-support-for-ruby-2.0.patch
new file mode 100644
index 0000000..8a46015
--- /dev/null
+++ b/ruby-shadow-2.2.0-Add-support-for-ruby-2.0.patch
@@ -0,0 +1,29 @@
+From fa317a925f6880d62ce5157792d9901be33ea57f Mon Sep 17 00:00:00 2001
+From: Adam Palmblad <adam.palmblad at teampages.com>
+Date: Mon, 25 Feb 2013 12:49:39 -0800
+Subject: [PATCH] Add support for ruby 2.0.
+
+---
+ extconf.rb | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/extconf.rb b/extconf.rb
+index 9453b27..7dcbba7 100644
+--- a/extconf.rb
++++ b/extconf.rb
+@@ -7,7 +7,11 @@
+ require 'mkmf'
+
+ $CFLAGS = "#{$CFLAGS}"
+-$CFLAGS += RUBY_VERSION =~ /1\.9/ ? ' -DRUBY19' : ''
++$CFLAGS += case RUBY_VERSION
++ when /^1\.9/; ' -DRUBY19'
++ when /^2\./; ' -DRUBY19'
++ else; ''
++ end
+
+ #$LDFLAGS = "-lshadow"
+
+--
+1.8.1.5
+
diff --git a/ruby-shadow.spec b/ruby-shadow.spec
index 77d790e..2514dfc 100644
--- a/ruby-shadow.spec
+++ b/ruby-shadow.spec
@@ -1,14 +1,12 @@
-%if 0%{?fedora} >= 17
-%global ruby_archdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["vendorarchdir"]')
+%if 0%{?fedora}
+%global ruby_archdir %{ruby_vendorarchdir}
%else
%global ruby_archdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["sitearchdir"]')
%endif
-%global ruby_version %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["ruby_version"]')
-
Name: ruby-shadow
Version: 1.4.1
-Release: 18%{?dist}
+Release: 19%{?dist}
Summary: Ruby bindings for shadow password access
Group: System Environment/Libraries
License: Public Domain
@@ -16,11 +14,17 @@ URL: http://ttsky.net/
Source0: http://ttsky.net/src/ruby-shadow-%{version}.tar.gz
Patch0: 0001-Add-ruby-1.9-support.patch
Patch1: ruby-shadow-1.4.1-cflags.patch
+Patch2: ruby-shadow-2.2.0-Add-support-for-ruby-2.0.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ruby-devel
-# Work around the lack of ruby in the default mock buildroot
-%if "%{ruby_version}"
-Requires: ruby(abi) = %{ruby_version}
+%if 0%{?fedora}
+%if 0%{?fedora} <= 18
+Requires: ruby(abi) = 1.9.1
+%else
+Requires: ruby(release)
+%endif
+%else
+Requires: ruby(abi) = 1.8
%endif
Provides: ruby(shadow) = %{version}-%{release}
@@ -31,6 +35,7 @@ Ruby bindings for shadow password access
%setup -q -n shadow-%{version}
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%{_bindir}/iconv -f EUCJP -t utf8 -o README.ja README.euc
%build
@@ -50,6 +55,9 @@ rm -rf %{buildroot}
%{ruby_archdir}/shadow.so
%changelog
+* Mon Mar 18 2013 Vít Ondruch <vondruch at redhat.com> - 1.4.1-19
+- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0
+
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.1-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
More information about the scm-commits
mailing list