summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2007-07-31 09:55:34 (GMT)
committerColin Watson <cjwatson@debian.org>2007-07-31 09:55:34 (GMT)
commit974445b92471a9044ae0ecd65357a1ca86f2ab69 (patch)
tree5abe04a3993b9ba183ac78eaa1db2dc4fb5c055b /Makefile
parent222be15fe07482c02579b89711cba9b2c5ad863d (diff)
downloaddebootstrap-974445b92471a9044ae0ecd65357a1ca86f2ab69.zip
debootstrap-974445b92471a9044ae0ecd65357a1ca86f2ab69.tar.gz
debootstrap-974445b92471a9044ae0ecd65357a1ca86f2ab69.tar.bz2
* Add --version option (closes: #294484).
r48820
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2754164..9500079 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,9 @@
CC=gcc
CFLAGS=-Wall -W -O2
+# avoid dpkg-dev dependency; fish out the version with sed
+VERSION := $(shell sed 's/.*(\(.*\)).*/\1/; q' debian/changelog)
+
ARCH := $(shell dpkg --print-architecture)
setarchdevs = $(if $(findstring $(ARCH),$(1)),$(2))
@@ -35,7 +38,9 @@ install:
ln -s sid $(DSDIR)/scripts/lenny
install -o root -g root -m 0755 debootstrap.8 $(DESTDIR)/usr/share/man/man8/
- install -o root -g root -m 0755 debootstrap $(DESTDIR)/usr/sbin/
+ sed 's/@VERSION@/$(VERSION)/g' debootstrap >$(DESTDIR)/usr/sbin/debootstrap
+ chown root:root $(DESTDIR)/usr/sbin/debootstrap
+ chmod 0755 $(DESTDIR)/usr/sbin/debootstrap
install-allarch: install
install -o root -g root -m 0644 devices-std.tar.gz \