From d079e330e35093c0f821d1f1d007ccd9c004dd0c Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 28 Oct 2017 23:13:38 +0200 Subject: sollte jetzt fuer alle passen ... --- Makefile | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4cc0ebe..a793d83 100644 --- a/Makefile +++ b/Makefile @@ -20,26 +20,37 @@ # DESTDIR = -ETCDIR = /etc +BINDIR = /usr/bin DEVDIR = /dev +ETCDIR = /etc UUIDDIR = $(DEVDIR)/disk/by-uuid MAPDIR = $(DEVDIR)/mapper RCDDIR = $(ETCDIR)/rc.d +SYSTEMDDIR = /usr/lib/systemd/system +CONF_PREFIXES = -VERSION = 0.3 +VERSION = 0.4 -all: cryptfs +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)@" $< > $@ + sed "s/#VERSION#/$(VERSION)/; s@#DEVDIR#@$(DEVDIR)@; s@#ETCDIR#@$(ETCDIR)@; s@#UUIDDIR#@$(UUIDDIR)@; s@#MAPDIR#@$(MAPDIR)@; s@#RCDDIR#@$(RCDDIR)@; s@#CONF_PREFIXES#@$(CONF_PREFIXES)@" $< > $@ + [ "$@" = "cryptfs.bin" ] && chmod +x "$@" || true + [ "$@" = "cryptfs.rc" ] && chmod +x "$@" || true + +.PHONY: install_bin install_systemd install_sysvinit dist clean + +install_bin: + install -D -m0755 cryptfs.bin $(DESTDIR)$(BINDIR)/cryptfs -.PHONY: install dist clean +install_systemd: install_bin + install -D -m0644 cryptfs.service $(DESTDIR)$(SYSTEMDDIR)/cryptfs -install: all - install -D -m0755 cryptfs $(DESTDIR)$(RCDDIR)/cryptfs +install_sysvinit: install_bin + install -D -m0755 cryptfs.rc $(DESTDIR)$(RCDDIR)/cryptfs clean: - rm -f cryptfs + rm -f cryptfs.bin cryptfs.rc cryptfs.service dist: clean git status --porcelain 2> /dev/null | grep -q "\S" && (git add .; git commit -m"neue Version: $(VERSION)") || true -- cgit v1.2.3-70-g09d2