diff options
author | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2010-10-16 10:15:23 +0000 |
---|---|---|
committer | Per Øyvind Karlsen <peroyvind@mandriva.org> | 2010-10-16 10:15:23 +0000 |
commit | b56089de7c35ff42f0184ee22f2de0553392fd46 (patch) | |
tree | 0a650aa4980cadc3e446a4d9290e09570ba31d3f /build.macros.in | |
parent | a7be79dfae7c40425612f5441fb97c6ae6cd7901 (diff) | |
download | rpm-setup-b56089de7c35ff42f0184ee22f2de0553392fd46.tar rpm-setup-b56089de7c35ff42f0184ee22f2de0553392fd46.tar.gz rpm-setup-b56089de7c35ff42f0184ee22f2de0553392fd46.tar.bz2 rpm-setup-b56089de7c35ff42f0184ee22f2de0553392fd46.tar.xz rpm-setup-b56089de7c35ff42f0184ee22f2de0553392fd46.zip |
add gem_helper.rb and it's corresponding macros %gem_unpack, %gem_build &1.108
gem_install for simplifying & streamlining ruby gem packaging.
Diffstat (limited to 'build.macros.in')
-rw-r--r-- | build.macros.in | 24 |
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: |