From 68ed8e9daa132b3a3911e41ca5cd14dd9d3e9dc1 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sun, 31 Oct 2010 04:25:08 +0900 Subject: [PATCH] - 0.90.5 - Move C extension so that "require %gemname" works correctly --- .gitignore | 1 + rubygem-gio2.spec | 29 +++++++++++++++++++++-------- sources | 2 +- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index f67c8a8..019ad69 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /gio2-0.90.4.gem +/gio2-0.90.5.gem diff --git a/rubygem-gio2.spec b/rubygem-gio2.spec index 812ec68..65adc9e 100644 --- a/rubygem-gio2.spec +++ b/rubygem-gio2.spec @@ -5,15 +5,15 @@ %global gemname gio2 %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 gio-2.0.x Name: rubygem-%{gemname} -Version: 0.90.4 -Release: 2%{?dist} +Version: 0.90.5 +Release: 3%{?dist} Group: Development/Languages # from README License: LGPLv2 @@ -68,8 +68,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 \ @@ -81,6 +81,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@s|'%{gemname}.so'|'ruby-gnome2/%{gemname}.so'|" \ + -e '\@require@s|"%{gemname}.so"|"ruby-gnome2/%{gemname}.so"|' %install rm -rf %{buildroot} @@ -92,9 +100,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 @@ -185,7 +193,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 @@ -204,5 +213,9 @@ rm -rf %{buildroot} %{geminstdir}/Rakefile %changelog +* Sun Oct 31 2010 Mamoru Taska - 0.90.5-3 +- 0.90.5 +- Move C extension so that "require %%gemname" works correctly + * Sun Oct 24 2010 Mamoru Taska - 0.90.4-2 - Initial package diff --git a/sources b/sources index 4a8ee3d..459985d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -db47bd398db0cb77ec856290afef126e gio2-0.90.4.gem +17c240dcfee20ce036e8585ffe5dab90 gio2-0.90.5.gem