From b56089de7c35ff42f0184ee22f2de0553392fd46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Sat, 16 Oct 2010 10:15:23 +0000 Subject: add gem_helper.rb and it's corresponding macros %gem_unpack, %gem_build & gem_install for simplifying & streamlining ruby gem packaging. --- build.macros.in | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'build.macros.in') diff --git a/build.macros.in b/build.macros.in index f14e8e2..1082579 100644 --- a/build.macros.in +++ b/build.macros.in @@ -305,6 +305,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
". # This an interesting alternative to --short-circuit. -- cgit v1.2.1