aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-support-to-override-usr-sbin-and-usr-share.patch
blob: 12dd238108ce890e507372063ba70e3549f7607a (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
From 87d0174e8d56e7458dc94f05f82ab7a67a5cf7d0 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Thu, 8 Apr 2021 14:06:05 +0800
Subject: [PATCH 1/2] support to override /usr/sbin and /usr/share

Upstream-Status: Submitted [https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/55]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 Makefile | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/Makefile b/Makefile
index 8516803..a2d8c00 100644
--- a/Makefile
+++ b/Makefile
@@ -5,14 +5,16 @@ all:
 
 clean:
 
-DSDIR=$(DESTDIR)/usr/share/debootstrap
+datadir ?= "/usr/share"
+sbindir ?= "/usr/sbin"
+DSDIR=$(DESTDIR)${datadir}/debootstrap
 install:
 	mkdir -p $(DSDIR)/scripts
-	mkdir -p $(DESTDIR)/usr/sbin
+	mkdir -p $(DESTDIR)$(sbindir)
 
 	cp -a scripts/* $(DSDIR)/scripts/
 	install -o root -g root -m 0644 functions $(DSDIR)/
 
-	sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)/usr/sbin/debootstrap
-	chown root:root $(DESTDIR)/usr/sbin/debootstrap
-	chmod 0755 $(DESTDIR)/usr/sbin/debootstrap
+	sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)$(sbindir)/debootstrap
+	chown root:root $(DESTDIR)$(sbindir)/debootstrap
+	chmod 0755 $(DESTDIR)$(sbindir)/debootstrap
-- 
2.17.1