summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-10-28 23:31:00 +0200
committerErich Eckner <git@eckner.net>2017-10-28 23:31:00 +0200
commitd69c0fce3c6550a0dd204be79606d1f053038137 (patch)
tree5c47092b32c9893431294a8ee1ef19d4b6b75fa3 /Makefile
parentd079e330e35093c0f821d1f1d007ccd9c004dd0c (diff)
downloadcryptfs-daemon-d69c0fce3c6550a0dd204be79606d1f053038137.tar.xz
bugfixesv0.4
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 18 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a793d83..9e817fd 100644
--- a/Makefile
+++ b/Makefile
@@ -23,10 +23,11 @@ DESTDIR =
BINDIR = /usr/bin
DEVDIR = /dev
ETCDIR = /etc
-UUIDDIR = $(DEVDIR)/disk/by-uuid
MAPDIR = $(DEVDIR)/mapper
RCDDIR = $(ETCDIR)/rc.d
SYSTEMDDIR = /usr/lib/systemd/system
+UUIDDIR = $(DEVDIR)/disk/by-uuid
+
CONF_PREFIXES =
VERSION = 0.4
@@ -34,7 +35,22 @@ VERSION = 0.4
all: cryptfs.bin cryptfs.rc cryptfs.service
%: %.in
- sed "s/#VERSION#/$(VERSION)/; s@#DEVDIR#@$(DEVDIR)@; s@#ETCDIR#@$(ETCDIR)@; s@#UUIDDIR#@$(UUIDDIR)@; s@#MAPDIR#@$(MAPDIR)@; s@#RCDDIR#@$(RCDDIR)@; s@#CONF_PREFIXES#@$(CONF_PREFIXES)@" $< > $@
+ sed " \
+ s@#BINDIR#@$(BINDIR)@; \
+ s@#DEVDIR#@$(DEVDIR)@; \
+ s@#ETCDIR#@$(ETCDIR)@; \
+ s@#MAPDIR#@$(MAPDIR)@; \
+ s@#RCDDIR#@$(RCDDIR)@; \
+ s@#SYSTEMDDIR#@$(SYSTEMDDIR)@; \
+ s@#UUIDDIR#@$(UUIDDIR)@; \
+ s@#CONF_PREFIXES#@$(CONF_PREFIXES)@; \
+ s@#VERSION#@$(VERSION)@; \
+ " $< | \
+ if which "ping6" >/dev/null 2>&1; then \
+ sed 's@#PING6#@ping6@'; \
+ else \
+ sed 's@#PING6#@ping -6@'; \
+ fi > $@
[ "$@" = "cryptfs.bin" ] && chmod +x "$@" || true
[ "$@" = "cryptfs.rc" ] && chmod +x "$@" || true