From 283de972f29a47f4a7c49a363f065a9dc5de530b Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Wed, 13 May 2015 12:45:58 +0200 Subject: [PATCH] ceph-detect-init: plain setup.py install on make install If no DESTDIR environment variable is set, just python setup.py install instead of setting --root, --prefix or --install-layout. These options are tested to do the right thing in the context of RPM and deb packaging but they are presumably not what someone using make install manually would want. http://tracker.ceph.com/issues/11598 Fixes: #11598 Signed-off-by: Loic Dachary --- src/ceph-detect-init/Makefile.am | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ceph-detect-init/Makefile.am b/src/ceph-detect-init/Makefile.am index 72741afe339..3e5ad03f732 100644 --- a/src/ceph-detect-init/Makefile.am +++ b/src/ceph-detect-init/Makefile.am @@ -61,9 +61,12 @@ clean-local:: install-data-local:: cd ceph-detect-init ; \ - if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ - options=--install-layout=deb ; \ - else \ - options=--prefix=/usr ; \ + if test "$(DESTDIR)" ; then \ + if lsb_release -si | grep --quiet 'Ubuntu\|Debian\|Devuan' ; then \ + options=--install-layout=deb ; \ + else \ + options=--prefix=/usr ; \ + fi ; \ + root="--root=$(DESTDIR)" ; \ fi ; \ - python setup.py install --root=$(DESTDIR) $$options + python setup.py install $$root $$options -- 2.47.3