diff options
author | Martin Schwenke <martin@meltin.net> | 2014-09-02 16:18:01 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2014-09-10 01:36:14 +0200 |
commit | 05f08d5148e4df8c5bed13023824f030efebf26e (patch) | |
tree | b2fd5940c21ee72739e0f7027f1613ef42f8a4a0 | |
parent | 4cb92e42f2d4753332d3ddddf2a87fc678afd306 (diff) | |
download | samba-05f08d5148e4df8c5bed13023824f030efebf26e.tar.gz samba-05f08d5148e4df8c5bed13023824f030efebf26e.tar.xz samba-05f08d5148e4df8c5bed13023824f030efebf26e.zip |
ctdb-build: Don't try to set lib64 directory automatically in build
Just install into lib/ and let packagers decide on this policy, since
it can vary between distributions. Update our packaging files
accordingly.
A secondary matter is that things are incorrectly installed into
lib64/ when building with 32-bit userspace on a 64-bit kernel. If
this is done then it should depend on the architecture of the
compiler.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
-rwxr-xr-x | ctdb/configure.rpm | 8 | ||||
-rw-r--r-- | ctdb/packaging/RPM/ctdb.spec.in | 1 | ||||
-rwxr-xr-x | ctdb/wscript | 4 |
3 files changed, 9 insertions, 4 deletions
diff --git a/ctdb/configure.rpm b/ctdb/configure.rpm index 9cecb86e04..32e6673d31 100755 --- a/ctdb/configure.rpm +++ b/ctdb/configure.rpm @@ -1,9 +1,17 @@ +#!/bin/sh + +if gcc -dM -E - </dev/null | grep -Eq '__(x86_64|powerpc64)__' ; then + _libdir=/usr/lib64 +else + _libdir=/usr/lib +fi CFLAGS="-Wall -g -D_GNU_SOURCE" ./configure \ --builtin-libraries=replace,popt \ --bundled-libraries=!talloc,!tevent,!tdb \ --minimum-library-version=talloc:2.0.8,tdb:1.2.11,tevent:0.9.16 \ --prefix=/usr \ + --libdir=${_libdir} \ --sysconfdir=/etc \ --mandir=/usr/man \ --localstatedir=/var \ diff --git a/ctdb/packaging/RPM/ctdb.spec.in b/ctdb/packaging/RPM/ctdb.spec.in index d7adb59653..101a7133c2 100644 --- a/ctdb/packaging/RPM/ctdb.spec.in +++ b/ctdb/packaging/RPM/ctdb.spec.in @@ -95,6 +95,7 @@ CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" ./buildtools/bin/waf configure \ --enable-pmda \ %endif --prefix=%{_prefix} \ + --libdir=%{_libdir} \ --sysconfdir=%{_sysconfdir} \ --mandir=%{_mandir} \ --localstatedir="/var" diff --git a/ctdb/wscript b/ctdb/wscript index 3ced41612f..d185e7135a 100755 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -125,10 +125,6 @@ def configure(conf): conf.env.CTDB_VARDIR = os.path.join(conf.env.LOCALSTATEDIR, 'lib/ctdb') conf.env.CTDB_RUNDIR = os.path.join(conf.env.LOCALSTATEDIR, 'run/ctdb') - machine = os.uname()[4] - if machine in ['x86_64', 'ppc64', 'powerpc64']: - conf.env.LIBDIR = conf.env.LIBDIR + '64' - if Options.options.ctdb_logdir: conf.env.CTDB_LOGDIR = Options.options.ctdb_logdir else: |