Changeset: 9eb9dd6a1f9f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9eb9dd6a1f9f
Modified Files:
MonetDB.spec
clients/ruby/Makefile.ag
clients/ruby/adapter/Makefile.ag
configure.ag
Branch: Apr2012
Log Message:
Fix up Ruby install so that it also works on Fedora 17.
diffs (97 lines):
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -48,6 +48,7 @@ BuildRequires: python
BuildRequires: readline-devel
BuildRequires: ruby
BuildRequires: rubygems
+BuildRequires: rubygems-devel
BuildRequires: unixODBC-devel
BuildRequires: zlib-devel
@@ -57,8 +58,7 @@ Obsoletes: %{name}-devel
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif
-%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e 'puts
Config::CONFIG["sitelibdir"] ')}
-%define gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
+%{!?gem_dir: %global gem_dir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)}
%description
MonetDB is a database management system that is developed from a
@@ -261,16 +261,16 @@ program.
%files client-ruby
%defattr(-,root,root)
-%docdir %{gemdir}/doc/activerecord-monetdb-adapter-0.1
-%docdir %{gemdir}/doc/ruby-monetdb-sql-0.1
-%{gemdir}/doc/activerecord-monetdb-adapter-0.1/*
-%{gemdir}/doc/ruby-monetdb-sql-0.1/*
-%{gemdir}/cache/*.gem
-# %dir %{gemdir}/gems/activerecord-monetdb-adapter-0.1
-# %dir %{gemdir}/gems/ruby-monetdb-sql-0.1
-%{gemdir}/gems/activerecord-monetdb-adapter-0.1
-%{gemdir}/gems/ruby-monetdb-sql-0.1
-%{gemdir}/specifications/*.gemspec
+%docdir %{gem_dir}/doc/activerecord-monetdb-adapter-0.1
+%docdir %{gem_dir}/doc/ruby-monetdb-sql-0.1
+%{gem_dir}/doc/activerecord-monetdb-adapter-0.1/*
+%{gem_dir}/doc/ruby-monetdb-sql-0.1/*
+%{gem_dir}/cache/*.gem
+# %dir %{gem_dir}/gems/activerecord-monetdb-adapter-0.1
+# %dir %{gem_dir}/gems/ruby-monetdb-sql-0.1
+%{gem_dir}/gems/activerecord-monetdb-adapter-0.1
+%{gem_dir}/gems/ruby-monetdb-sql-0.1
+%{gem_dir}/specifications/*.gemspec
%package client-tests
Summary: MonetDB Client tests package
@@ -589,6 +589,7 @@ developer, but if you do want to test, t
--with-python=yes \
--with-readline=yes \
--with-rubygem=yes \
+ --with-rubygem-dir="%{gem_dir}" \
--with-sphinxclient=no \
--with-unixodbc=yes \
--with-valgrind=no \
diff --git a/clients/ruby/Makefile.ag b/clients/ruby/Makefile.ag
--- a/clients/ruby/Makefile.ag
+++ b/clients/ruby/Makefile.ag
@@ -19,7 +19,7 @@ SUBDIRS = adapter
gem_monetdb = {
FILES = ruby-monetdb-sql-0.1.gemspec
- DIR = $(prefix)/$(RUBY_DIR)
+ DIR = $(RUBY_DIR)
}
EXTRA_DIST = Changelog README TODO ruby-monetdb-sql-0.1.gemspec
diff --git a/clients/ruby/adapter/Makefile.ag b/clients/ruby/adapter/Makefile.ag
--- a/clients/ruby/adapter/Makefile.ag
+++ b/clients/ruby/adapter/Makefile.ag
@@ -17,7 +17,7 @@
gem_adapter = {
FILES = activerecord-monetdb-adapter-0.1.gemspec
- DIR = $(prefix)/$(RUBY_DIR)
+ DIR = $(RUBY_DIR)
}
EXTRA_DIST = activerecord-monetdb-adapter-0.1.gemspec
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -1354,6 +1354,13 @@ case "$have_rubygem_dir" in
RUBY_DIR="$have_rubygem_dir"
;;
esac
+case "$RUBY_DIR" in
+${prefix}/*)
+ RUBY_DIR="\${prefix}`echo "$RUBY_DIR" | sed "s|^$prefix||"`";;
+/*) ;;
+*)
+ RUBY_DIR="\${prefix}/$RUBY_DIR";;
+esac
AC_SUBST(RUBY_DIR)
RUBYGEM=gem
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list