diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 27 |
1 files changed, 19 insertions, 8 deletions
@@ -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 |