summaryrefslogtreecommitdiff
path: root/debian/patches/004-fix-destdir
blob: 6a2639555d8861c641a8773388caec7f04f38e06 (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
Description: Fix spelling errors found by lintian
Author: Dan Horák <dan@danny.cz>
Date: Sat, 24 Jan 2009 18:06:43 +0100
Description: add support for DESTDIR
 This patch is taken from Fedora:
 https://src.fedoraproject.org/rpms/mtx/tree/master

--- a/Makefile.in
+++ b/Makefile.in
@@ -33,6 +33,7 @@
 INSTALL_BIN = $(INSTALL) -m 755
 INSTALL_DIR = $(INSTALL) -m 755 -d
 
+DESTDIR		=
 prefix		= @prefix@
 exec_prefix	= @exec_prefix@
 sbindir		= @sbindir@
@@ -109,13 +110,13 @@
 dbgs: $(DBGS)
 
 install: $(BINS)
-	$(INSTALL_DIR) $(sbindir)
+	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
 	for file in $(BINS); do \
-	$(INSTALL_BIN) "$$file" $(sbindir) ; \
+	$(INSTALL_BIN) "$$file" $(DESTDIR)$(sbindir) ; \
 	done	
-	$(INSTALL_DIR) $(mandir) $(mandir)/man1
+	$(INSTALL_DIR) $(DESTDIR)$(mandir) $(DESTDIR)$(mandir)/man1
 	for file in mtx.1 tapeinfo.1 scsitape.1 scsieject.1 loaderinfo.1 ; do \
-	$(INSTALL_DOC) "$$file"  $(mandir)/man1 ; \
+	$(INSTALL_DOC) "$$file"  $(DESTDIR)$(mandir)/man1 ; \
 	done
 
 clean: