summaryrefslogtreecommitdiff
path: root/debian/patches/0006-Patch-Makefile-install-target-paths-to-match-convent.patch
blob: 090a443b7fa79ba6f873c0c48bbc7ef1c6ba8a4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
From: Arto Jantunen <viiru@debian.org>
Date: Sat, 19 Feb 2022 20:50:36 +0200
Subject: Patch Makefile install target paths to match convention

DESTDIR normally means what upstream calls PREFIX. Instead of changing the
make install invocation, just patch the Makefile. Should probably be sent
upstream.
---
 Makefile | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile
index accc8ba..11111cb 100644
--- a/Makefile
+++ b/Makefile
@@ -90,20 +90,21 @@ autoloads:
 	$(EVAL) "(progn (setq generated-autoload-file (expand-file-name \"helm-autoloads.el\" \"$(PKGDIR)\")) \
 (setq backup-inhibited t) (update-directory-autoloads \"$(PKGDIR)\"))"
 
-PREFIX=/usr/local/
-BIN=${PREFIX}bin/
-DESTDIR=${PREFIX}share/emacs/site-lisp/helm/
+DESTDIR=/usr/local
+BIN=${DESTDIR}/bin
+INSTDIR=${DESTDIR}/share/emacs/site-lisp/helm
 install:
-	test -d ${DESTDIR} || mkdir ${DESTDIR}
-	rm -f ${DESTDIR}*.el
-	rm -f ${DESTDIR}*.elc
-	cp -f *.el $(DESTDIR)
-	cp -f *.elc $(DESTDIR)
-	cp -f helm-autoloads.el $(DESTDIR)
-	cp -f emacs-helm.sh $(DESTDIR)
-	ln -fs ${DESTDIR}emacs-helm.sh ${BIN}helm
+	test -d ${INSTDIR} || mkdir -p ${INSTDIR}
+	test -d ${BIN} || mkdir -p ${BIN}
+	rm -f ${INSTDIR}*.el
+	rm -f ${INSTDIR}*.elc
+	cp -f *.el $(INSTDIR)
+	cp -f *.elc $(INSTDIR)
+	cp -f helm-autoloads.el $(INSTDIR)
+	cp -f emacs-helm.sh $(INSTDIR)
+	ln -fs ${INSTDIR}/emacs-helm.sh ${BIN}/helm
 uninstall:
-	rm -vf ${DESTDIR}*.elc
-	rm -vf ${DESTDIR}*.el
-	rm -vf ${DESTDIR}emacs-helm.sh
-	rm -vf ${BIN}helm
+	rm -vf ${INSTDIR}/*.elc
+	rm -vf ${INSTDIR}/*.el
+	rm -vf ${INSTDIR}/emacs-helm.sh
+	rm -vf ${BIN}/helm