aboutsummaryrefslogtreecommitdiffstats
path: root/build.macros.in
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2013-09-10 13:10:04 +0000
committerPascal Terjan <pterjan@gmail.com>2013-09-10 13:10:04 +0000
commitdaca30569be507005ad22264dd11e542a2d22de7 (patch)
tree909625d2e9d86bea1be6afa403653fe783e31eff /build.macros.in
parentd2ddca93fb0f5d1daaef3b414a93338208c252fc (diff)
downloadrpm-setup-daca30569be507005ad22264dd11e542a2d22de7.tar
rpm-setup-daca30569be507005ad22264dd11e542a2d22de7.tar.gz
rpm-setup-daca30569be507005ad22264dd11e542a2d22de7.tar.bz2
rpm-setup-daca30569be507005ad22264dd11e542a2d22de7.tar.xz
rpm-setup-daca30569be507005ad22264dd11e542a2d22de7.zip
Create a gem_setup macro fixing most common problems1.180
Diffstat (limited to 'build.macros.in')
-rw-r--r--build.macros.in11
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 \