aboutsummaryrefslogtreecommitdiffstats
path: root/build.macros.in
diff options
context:
space:
mode:
Diffstat (limited to 'build.macros.in')
-rw-r--r--build.macros.in24
1 files changed, 24 insertions, 0 deletions
diff --git a/build.macros.in b/build.macros.in
index f14e8e2..1082579 100644
--- a/build.macros.in
+++ b/build.macros.in
@@ -306,6 +306,30 @@ Requires: python >= %minver, python < %maxver
%ocaml_sitelib %(if [ -x /usr/bin/ocamlc ]; then ocamlc -where;fi)/site-lib
#------------------------------------------------------------------------------
+# Ruby gem macros
+#
+
+%gem_unpack(n:a:) \
+ %{expand: %%global __tar tar -m} \
+%setup -q -c -T -a0 %{-n:-n %{-n*}} %{-a:-a %{-a*}} \
+%{__tar}zxf data.tar.gz
+
+%__gem_helper @RPMVENDORDIR@/gem_helper.rb
+
+%gem_build(f:j:) \
+ %__gem_helper build \\\
+ %{-f:-f%{-f*}} \\\
+ %{!-j:%{_smp_mflags}}%{-j:-j%{-j*}}
+
+%gem_install(i:n:C) \
+ DESTDIR=${DESTDIR:-%{buildroot}} \\\
+ %__gem_helper install \\\
+ --env-shebang --rdoc --ri --force \\\
+ %{!-i:--install-dir %{buildroot}%{ruby_gemdir}}%{-i:--install-dir %{-i*}} \\\
+ %{!-n:--bindir %{buildroot}%{_bindir}}%{-n:--bindir%{-n*}} \\\
+ %{!-C:--fix-permissions}
+
+#------------------------------------------------------------------------------
# Redefine RPM sections to allow jumping over them using "--without <section>".
# This an interesting alternative to --short-circuit.
# The following are mostly equivalent: