[rubygem-glib2/f14/master] - 0.90.5 - Move C extension so that "require %gemname" works correctly
Mamoru Tasaka
mtasaka at fedoraproject.org
Sat Oct 30 19:22:31 UTC 2010
commit a47a2d4818a869a9bc19df8695f9b997b38096aa
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date: Sun Oct 31 04:22:33 2010 +0900
- 0.90.5
- Move C extension so that "require %gemname" works correctly
.gitignore | 1 +
rubygem-glib2.spec | 36 +++++++++++++++++++++++++++++-------
sources | 2 +-
3 files changed, 31 insertions(+), 8 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 57396dd..5575d65 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/glib2-0.90.2.gem
/glib2-0.90.3.gem
/glib2-0.90.4.gem
+/glib2-0.90.5.gem
diff --git a/rubygem-glib2.spec b/rubygem-glib2.spec
index 9dbd1da..4d0a709 100644
--- a/rubygem-glib2.spec
+++ b/rubygem-glib2.spec
@@ -5,14 +5,14 @@
%global gemname glib2
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
-%global obsoleteevr 0.90.4-1.999
+%global obsoleteevr 0.90.5-1.999
%global rubyabi 1.8
Summary: Ruby binding of GLib-2.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
@@ -80,8 +80,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 \
@@ -92,6 +92,12 @@ gem install \
find . -name \*.gem | xargs chmod 0644
+# Make pkg-config devel dependency (not runtime)
+sed -i \
+ -e '\@pkg-config at s|add_\(runtime_\)*dependency|add_development_dependency|' \
+ .%{gemdir}/specifications/%{gemname}-%{version}.gemspec \
+ .%{geminstdir}/Rakefile
+
# Remove completely unneeded files
pushd .%{geminstdir}
# Remove vendorlized one (already packaged)
@@ -105,7 +111,18 @@ find sample/ test/ -name \*.rb | xargs chmod 0644
grep -rl '#![ ]*/usr' sample/ test/ | \
xargs chmod 0755
+# back
+popd
+
%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}
@@ -117,9 +134,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
@@ -215,6 +232,7 @@ rm -rf %{buildroot}
%defattr(-,root,root,-)
%dir %{geminstdir}
%dir %{geminstdir}/lib/
+%dir %{ruby_sitearch}/ruby-gnome2/
%doc %{geminstdir}/[A-Z]*
%exclude %{geminstdir}/Rakefile
@@ -222,7 +240,7 @@ rm -rf %{buildroot}
%{geminstdir}/lib/glib2.rb
%{geminstdir}/lib/glib-mkenums.rb
%{geminstdir}/lib/gnome2-win32-binary-downloader.rb
-%{ruby_sitearch}/%{gemname}.so
+%{ruby_sitearch}/ruby-gnome2/%{gemname}.so
%{gemdir}/cache/%{gemname}-%{version}.gem
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
@@ -254,6 +272,10 @@ rm -rf %{buildroot}
%changelog
+* Sun Oct 31 2010 Mamoru Taska <mtasaka at ioa.s.u-tokyo.ac.jp> - 0.90.5-3
+- 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 bc6a721..3b4a39b 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a0273a2c595dbb932bfd0f60688420ad glib2-0.90.4.gem
+007f0b0ecac0eb39b455630642590062 glib2-0.90.5.gem
More information about the scm-commits
mailing list