[rubygem-cairo/f17] Update to 1.12.2

Mamoru Tasaka mtasaka at fedoraproject.org
Wed Apr 18 09:42:55 UTC 2012


commit daa600f9198350c4e743a2c07fabb1034aa5f0c2
Author: TASAKA Mamoru <mtasaka at localhost.localdomain>
Date:   Wed Apr 18 18:42:50 2012 +0900

    Update to 1.12.2
    
    - And use git based gem for now to avoid test failure

 .gitignore          |    1 +
 create-cairo-gem.sh |   16 ++++++++++++++++
 rubygem-cairo.spec  |   18 ++++++++++++++++--
 sources             |    2 +-
 4 files changed, 34 insertions(+), 3 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ee75121..be7f1ce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 /cairo-1.10.0.gem
 /cairo-1.10.2.gem
+/cairo-1.12.2-af3e3fc059.gem
diff --git a/create-cairo-gem.sh b/create-cairo-gem.sh
new file mode 100644
index 0000000..08948c1
--- /dev/null
+++ b/create-cairo-gem.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+set -x
+
+ORIGDIR=$(pwd)
+
+DIR=$(mktemp -p /tmp -d tmp.XXXXXX)
+pushd $DIR
+git clone https://github.com/rcairo/rcairo.git
+cd rcairo
+
+VERSION=$(gem build cairo.gemspec 2>&1 | sed -n -e 's|^.*Version: ||p')
+GITHASH=$(git log | head -n 1 | sed -e 's|^.* \(..........\).*|\1|')
+cp -p cairo-$VERSION.gem $ORIGDIR/cairo-$VERSION-$GITHASH.gem
+
+popd
+rm -rf $DIR
diff --git a/rubygem-cairo.spec b/rubygem-cairo.spec
index 154bb5e..36a4b35 100644
--- a/rubygem-cairo.spec
+++ b/rubygem-cairo.spec
@@ -14,17 +14,25 @@
 %endif
 
 %global	gem_name		cairo
+%global	gemver		1.12.2
+%global	gem_githash	af3e3fc059
 
 # Upstream GIT http://github.com/rcairo/
 
 Summary:	Ruby bindings for cairo
 Name:		rubygem-%{gem_name}
-Version:	1.10.2
-Release:	4%{?dist}
+Version:	%{gemver}
+Release:	1.git%{gem_githash}%{?dist}
 Group:		Development/Languages
 License:	GPLv2 or Ruby
 URL:		http://cairographics.org/rcairo/
+%if 0
 Source0:	http://rubygems.org/downloads/%{gem_name}-%{version}.gem
+%else
+Source0:	%{gem_name}-%{gemver}-%{gem_githash}.gem
+%endif
+# Git based gem is created by below
+Source1:	create-cairo-gem.sh
 
 BuildRequires:	ruby(abi) = %{rubyabi}
 BuildRequires:	rubygems-devel
@@ -238,6 +246,8 @@ popd
 # Fix up test/run-test.rb
 sed -i -e '\@require .rubygems at a\\ngem "test-unit"\n' test/run-test.rb
 sed -i -e "\@require 'bundler/setup'@d" test/run-test.rb
+sed -i -e "\@require at s|test-unit|test/unit|" test/run-test.rb
+
 ruby ./test/run-test.rb
 popd
 
@@ -275,6 +285,10 @@ popd
 %{header_dir}/rb_cairo.h
 
 %changelog
+* Wed Apr 18 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.12.2-1.gitaf3e3fc059
+- Update to 1.12.2
+- And use git based gem for now to avoid test failure
+
 * Tue Apr 03 2012 Vít Ondruch <vondruch at redhat.com> - 1.10.2-4
 - Fix conditionals for F17 to work for RHEL 7 as well.
 
diff --git a/sources b/sources
index 4b6ee48..66da5e1 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-643103c9f8fe61d167cf3136f359398a  cairo-1.10.2.gem
+6ce7a1a0fd23c3f0ef34e5395a2615d0  cairo-1.12.2-af3e3fc059.gem


More information about the scm-commits mailing list