On Tue, Apr 10, 2012 at 07:01:33AM +0200, Vít Ondruch wrote:
I did patching in following gems: rubygem-sqlite3, rubygem-arel,
rubygem-erubis. You can use them as an example.
I used the rubygem-idn package an example and did the following:
pushd ..
gem unpack %{SOURCE0}
pushd %{gemname}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gemname}.gemspec
%patch1 -p6
%patch2 -p6
%patch3 -p6
%patch4 -p6
%patch5 -p6
%patch6 -p6
%patch7 -p6
# eliminate the encoding-related entries in the gemspec
sed '
# remove encoding_spec.rb
s/\,\ \"spec\/qpid\/encoding_spec.rb\"//
# remove encoding.rb
s/\,\ \"lib\/qpid\/encoding.rb\"//
# add in the new files for non-blocking I/O
s/s\.files\ \=\ \[/s\.files\ \=\ \[\"ext\/nonblockio\/extconf\.rb\"\,\
\"ext\/nonblockio\/nonblockio\.c\"\,\
\"ext\/nonblockio\/nonblockio\.h\"\,\
\"ext\/nonblockio\/qpid_receiver\.c\"\,\
\"ext\/nonblockio\/qpid_sender\.c\",\
\"ext\/nonblockio\/qpid_session\.c\",\
\"ext\/nonblockio\/qpid_utils\.c\",\
\"lib\/qpid\/utils\.rb\"\,\ /
' %{gemname}.gemspec > %{gemname}.gemspec-1
cp -f %{gemname}.gemspec-1 %{gemname}.gemspec
gem build %{gemname}.gemspec --verbose
cp -f %{gemname}-%{version}.gem %{SOURCE0}
And then do the installation using the modified gem rather than the
original %{SOURCE0}.
--
Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc.
Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/