[rubygem-atk/f13/master] - 0.90.5 - Move C extension so that "require %gemname" works correctly
Mamoru Tasaka
mtasaka at fedoraproject.org
Sat Oct 30 19:23:38 UTC 2010
commit fbe23bc0f087eb68ef729c7f0465d32c71ba38a1
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date: Sun Oct 31 04:23:39 2010 +0900
- 0.90.5
- Move C extension so that "require %gemname" works correctly
.gitignore | 1 +
rubygem-atk.spec | 27 ++++++++++++++++++++-------
sources | 2 +-
3 files changed, 22 insertions(+), 8 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 34487e6..b428ee3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/atk-0.90.2.gem
/atk-0.90.3.gem
/atk-0.90.4.gem
+/atk-0.90.5.gem
diff --git a/rubygem-atk.spec b/rubygem-atk.spec
index 3859380..22e4c59 100644
--- a/rubygem-atk.spec
+++ b/rubygem-atk.spec
@@ -5,14 +5,14 @@
%global gemname atk
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
-%global glibminver 0.90.4
-%global obsoleteevr 0.90.4-1.999
+%global glibminver 0.90.5
+%global obsoleteevr 0.90.5-1.999
%global rubyabi 1.8
Summary: Ruby binding of ATK-1.0.x
Name: rubygem-%{gemname}
-Version: 0.90.4
+Version: 0.90.5
Release: 2%{?dist}
Group: Development/Languages
# from README
@@ -73,8 +73,8 @@ rubygem-%{gemname}
%setup -q -c -T
mkdir -p .%{gemdir}
-export pkgconfigdir=$(pwd)%{_libdir}/pkgconfig
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
+export CONFIGURE_ARGS="$CONFIGURE_ARGS --with-pkg-config-dir=$(pwd)%{_libdir}/pkgconfig"
gem install \
-V \
--local \
@@ -86,6 +86,14 @@ gem install \
find . -name \*.gem | xargs chmod 0644
%build
+# Move C extension library to some private directory
+pushd .%{geminstdir}
+mkdir lib/ruby-gnome2
+mv lib/%{gemname}.so lib/ruby-gnome2/
+grep -rl '%{gemname}.so' . | \
+ xargs sed -i \
+ -e "\@require at s|'%{gemname}.so'|'ruby-gnome2/%{gemname}.so'|" \
+ -e '\@require at s|"%{gemname}.so"|"ruby-gnome2/%{gemname}.so"|'
%install
rm -rf %{buildroot}
@@ -97,9 +105,9 @@ cp -a .%{gemdir}/* \
pushd %{buildroot}
# move header files, C extension files to the correct directory
-mkdir -p .%{ruby_sitearch}
+mkdir -p .%{ruby_sitearch}/ruby-gnome2
mv .%{geminstdir}/lib/*.h .%{ruby_sitearch}/
-mv .%{geminstdir}/lib/%{gemname}.so .%{ruby_sitearch}/
+mv .%{geminstdir}/lib/ruby-gnome2/%{gemname}.so .%{ruby_sitearch}/ruby-gnome2/
popd
# move pkgconfig file
@@ -190,7 +198,8 @@ rm -rf %{buildroot}
%exclude %{geminstdir}/Rakefile
%{geminstdir}/lib/%{gemname}.rb
-%{ruby_sitearch}/%{gemname}.so
+# %%ruby_sitearch/ruby-gnome2 is owned by rubygem-glib2
+%{ruby_sitearch}/ruby-gnome2/%{gemname}.so
%{gemdir}/cache/%{gemname}-%{version}.gem
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
@@ -211,6 +220,10 @@ rm -rf %{buildroot}
%{geminstdir}/Rakefile
%changelog
+* Sun Oct 31 2010 Mamoru Taska <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.90.5-2
+- 0.90.5
+- Move C extension so that "require %%gemname" works correctly
+
* Sun Oct 24 2010 Mamoru Taska <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.90.4-2
- 0.90.4
diff --git a/sources b/sources
index 081b7aa..a10fb4c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-d715ad226f0adc7bd8a0f337a86614b7 atk-0.90.4.gem
+91567b259afad58a05cfbdb42089b1a0 atk-0.90.5.gem
More information about the scm-commits
mailing list