Blob Blame History Raw
From 160b8c4657356725befb02212c148c58da3ce7aa Mon Sep 17 00:00:00 2001
From: Ivan Devat <idevat@redhat.com>
Date: Fri, 1 Jul 2016 07:23:37 +0200
Subject: [PATCH] allow to specify bash completion install dir

---
 Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 5c3e9d6..8e845d6 100644
--- a/Makefile
+++ b/Makefile
@@ -76,11 +76,16 @@ ifndef install_settings
   endif
 endif
 
+
+ifndef BASH_COMPLETION_DIR
+	BASH_COMPLETION_DIR=${DESTDIR}/etc/bash_completion.d
+endif
+
 install:
 	$(PYTHON) setup.py install --root=$(or ${DESTDIR}, /) ${EXTRA_SETUP_OPTS}
 	mkdir -p ${DESTDIR}${PREFIX}/sbin/
 	mv ${DESTDIR}${PREFIX}/bin/pcs ${DESTDIR}${PREFIX}/sbin/pcs
-	install -D pcs/bash_completion.sh ${DESTDIR}/etc/bash_completion.d/pcs
+	install -D pcs/bash_completion.sh ${BASH_COMPLETION_DIR}/pcs
 	install -m644 -D pcs/pcs.8 ${DESTDIR}/${MANDIR}/man8/pcs.8
 ifeq ($(IS_DEBIAN),true)
   ifeq ($(install_settings),true)
-- 
1.8.3.1