Permalink
Browse files

Avoiding the breakage of check-buildroot by stripping debug info.

  • Loading branch information...
1 parent 39aaf0e commit 5a8c981cda075ee7c416f334999440b0fc7a921f Adam Young committed May 5, 2010
Showing with 17 additions and 2 deletions.
  1. +17 −2 rubygem-libxml.spec
View
@@ -5,7 +5,7 @@
%define geminstdir %{gemdir}/gems/%{gemname}-%{version}
Summary: Ruby libxml bindings
-Name: rubygem-libxml
+Name: rubygem-%{gemname}
Version: 1.1.4
Release: 1%{?dist}
Group: Development/Languages
@@ -15,6 +15,9 @@ Source0: http://gems.rubyforge.org/gems/%{gemname}-%{version}.gem
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: rubygems
BuildRequires: rubygems
+BuildRequires: ruby-devel
+BuildRequires: zlib
+
Provides: rubygem(%{gemname}) = %{version}
%description
@@ -34,6 +37,19 @@ rm -rf %{buildroot}
mkdir -p %{buildroot}%{gemdir}
gem install --local --install-dir %{buildroot}%{gemdir} \
--force --rdoc %{SOURCE0}
+pushd %{buildroot}%{gemdir}/gems/%{gemname}-%{version}/ext/libxml
+make clean
+sed -e 's!RUBYLIBDIR = .*!RUBYLIBDIR = $(sitearchdir)$(target_prefix)!' \
+ -e 's!RUBYARCHDIR = .*!RUBYARCHDIR = $(sitearchdir)$(target_prefix)!' \
+ < Makefile > Makefile.new
+mv Makefile.new Makefile
+make clean
+popd
+
+/usr/lib/rpm/find-debuginfo.sh
+#for now just delete it. Eventually, we want a debuginfo rpm
+rm -f %{buildroot}/usr/lib/debug/usr/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.4/lib/libxml_ruby.so.debug
+rm -rd %{buildroot}/usr/lib/debug
%clean
rm -rf %{buildroot}
@@ -48,7 +64,6 @@ rm -rf %{buildroot}
%changelog
* Mon May 3 2010 Adam Young <ayoung@ayoung.boston.devel.redhat.com> - 1.1.3-2
-- Changed RPM name to conform to Fedora standards
- Ugraded to libxml-ruby 1.1.4
* Sat Apr 17 2010 Adam Young <ayoung@ayoung.boston.devel.redhat.com> - 1.1.3-1

0 comments on commit 5a8c981

Please sign in to comment.