summaryrefslogtreecommitdiff
path: root/sysutils/debootstrap/files/patch-Makefile
blob: b38ee844e7ff9719a1efcf85424866af745be80b (plain) (blame)
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
--- Makefile.orig	2015-05-19 09:35:39 UTC
+++ Makefile
@@ -1,6 +1,6 @@
 # avoid dpkg-dev dependency; fish out the version with sed
 VERSION := $(shell sed 's/.*(\(.*\)).*/\1/; q' debian/changelog)
-DATE := $(shell sed -n '/^ -- /{s/.*> \(.*\)/\1/p;q}' debian/changelog)
+DATE := $(shell sed -n '/^ -- /{s/.*> \(.*\)/\1/p;q;}' debian/changelog)
 
 MAKEDEV ?= /sbin/MAKEDEV
 
@@ -14,17 +14,15 @@ clean:
 	rm -f devices.tar.gz
 	rm -rf dev
 
-DSDIR=$(DESTDIR)/usr/share/debootstrap
+DSDIR=$(DESTDIR)%%DATADIR%%
 install:
 	mkdir -p $(DSDIR)/scripts
-	mkdir -p $(DESTDIR)/usr/sbin
+	mkdir -p $(DESTDIR)%%PREFIX%%/sbin
 
 	cp -a scripts/* $(DSDIR)/scripts/
-	install -o root -g root -m 0644 functions $(DSDIR)/
+	cp -a 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)%%PREFIX%%/sbin/debootstrap
 
 ifeq ($(shell uname),Linux)
 	install -o root -g root -m 0644 devices.tar.gz $(DSDIR)/