aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFunda Wang <fwang@mageia.org>2013-08-15 15:25:04 +0000
committerFunda Wang <fwang@mageia.org>2013-08-15 15:25:04 +0000
commitabcac127ed949e61e91870b8b45fd0fbd2fa9683 (patch)
tree398acee9c031912fb55c1b2b52e57e90043bd927
parent5ff1a5a75337dbdbfce52dcddc959da794007b23 (diff)
1.178 rely on plain gem command to build rubygems1.178
-rw-r--r--Makefile.am1
-rw-r--r--NEWS3
-rw-r--r--build.macros.in35
-rw-r--r--configure.ac2
4 files changed, 23 insertions, 18 deletions
diff --git a/Makefile.am b/Makefile.am
index a57e7b8..5fd9df3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,7 +29,6 @@ pkg_scripts = \
fix-libtool-from-moving-options-after-libs \
fix-libtool-ltmain-from-overlinking \
force-as-needed-for-shared-lib-in-libtool \
- gem_helper.rb \
git-repository--after-tarball \
git-repository--apply-patch \
http.req \
diff --git a/NEWS b/NEWS
index b17ea80..6e2fbda 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+Version 1.178 - 15 Aug 2013, by Funda Wang
+- gem_helper.rb: deprecated now, we not rely on plain gem command to build rubygems
+
Version 1.177 - 15 Aug 2013, by Funda Wang
- gem_helper.rb: deal with rubygems 2.0 changes
diff --git a/build.macros.in b/build.macros.in
index 1488f3f..2b81ec3 100644
--- a/build.macros.in
+++ b/build.macros.in
@@ -480,22 +480,25 @@ popd
# Ruby gem macros
#
-%__gem_helper @RPMVENDORDIR@/gem_helper.rb
-
-%gem_build(f:j:) \
- export LC_CTYPE=UTF-8 \
- %__gem_helper build \\\
- %{-f:-f%{-f*}} \\\
- %{!-j:%{_smp_mflags}}%{-j:-j%{-j*}}
-
-%gem_install(i:n:C) \
- export LC_CTYPE=UTF-8 \
- DESTDIR=${DESTDIR:-%{buildroot}} \\\
- %__gem_helper install \\\
- --env-shebang --rdoc --ri --force --ignore-dependencies \\\
- %{!-i:--install-dir %{buildroot}%{ruby_gemdir}}%{-i:--install-dir %{-i*}} \\\
- %{!-n:--bindir %{buildroot}%{_bindir}}%{-n:--bindir%{-n*}} \\\
- %{!-C:--fix-permissions}
+%__ruby_module_name %{?oname}%{!?oname: %(echo %{name}|cut -d\- -f2-)}
+
+%gem_build \
+ if [ ! -f %{__ruby_module_name}.gemspec ]; then \
+ %{_bindir}/gem specification -l --ruby %{SOURCE0} > %{__ruby_module_name}.gemspec \
+ fi \
+ %{_bindir}/gem build %{__ruby_module_name}.gemspec
+
+%gem_install \
+ %{_bindir}/gem install %{__ruby_module_name}-%{version}.gem --local \\\
+ --env-shebang --rdoc --ri --force --ignore-dependencies \\\
+ --install-dir %{buildroot}%{ruby_gemdir} \\\
+ --bindir %{buildroot}%{_bindir} \
+ rm -fr %{buildroot}%{ruby_gemdir}/{cache,gems/%{__ruby_module_name}-%{version}/ext,gems/%{__ruby_module_name}-%{version}/%{__ruby_module_name}.gemspec} \
+ find %{buildroot}%{ruby_gemdir}/gems/%{__ruby_module_name}-%{version} -maxdepth 1 -type f -delete \
+ if [ -f %{buildroot}%{ruby_gemdir}/gems/%{__ruby_module_name}-%{version}/lib/*.so ]; then \
+ mkdir -p %{buildroot}%{ruby_sitearchdir} \
+ mv %{buildroot}%{ruby_gemdir}/gems/%{__ruby_module_name}-%{version}/lib/*.so %{buildroot}%{ruby_sitearchdir}/ \
+ fi
#------------------------------------------------------------------------------
# Systemd and general service related macros
diff --git a/configure.ac b/configure.ac
index c4b4f0e..8a02c9d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@
# $Id: configure.ac 271266 2010-11-04 10:43:28Z fwang $
AC_PREREQ(2.59)
-AC_INIT(rpm-mageia-setup, 1.177, dmorgan@mageia.org)
+AC_INIT(rpm-mageia-setup, 1.178, dmorgan@mageia.org)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(1.9 -Wno-portability no-dist-gzip dist-xz)
AC_CONFIG_SRCDIR