diff options
Diffstat (limited to 'build.macros.in')
-rw-r--r-- | build.macros.in | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/build.macros.in b/build.macros.in index d21e9e1..cec3683 100644 --- a/build.macros.in +++ b/build.macros.in @@ -482,6 +482,17 @@ popd %__ruby_module_name %{?oname}%{!?oname:%(echo %{name}|cut -d\- -f2-)} +%gem_setup \ +%setup -q \ +tar xmf data.tar.gz \ +if [ ! -f %{__ruby_module_name}.gemspec ]; then \ + %{_bindir}/gem specification -l --ruby %{SOURCE0} > %{__ruby_module_name}.gemspec \ +fi \ +sed -i -e 's/`git ls-files`/`find -type f`/' \\\ + -e 's/`git ls-files -- \\\(.*\\\)`/`find \\\1 -type f`/' \\\ + -e 's/ s.version = .*/ s.version = "%{version}"/' \\\ + %{__ruby_module_name}.gemspec + %gem_build \ if [ ! -f %{__ruby_module_name}.gemspec ]; then \ %{_bindir}/gem specification -l --ruby %{SOURCE0} > %{__ruby_module_name}.gemspec \ |