patch-Makefile 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. $OpenBSD: patch-Makefile,v 1.2 2017/03/07 08:53:17 bentley Exp $
  2. --- Makefile.orig Tue Feb 28 11:00:40 2017
  3. +++ Makefile Tue Feb 28 11:04:01 2017
  4. @@ -35,28 +35,28 @@ all:
  5. @echo "Password store is a shell script, so there is nothing to do. Try \"make install\" instead."
  6. install-common:
  7. - @install -v -d "$(DESTDIR)$(MANDIR)/man1" && install -m 0644 -v man/pass.1 "$(DESTDIR)$(MANDIR)/man1/pass.1"
  8. - @[ "$(WITH_BASHCOMP)" = "yes" ] || exit 0; install -v -d "$(DESTDIR)$(BASHCOMPDIR)" && install -m 0644 -v src/completion/pass.bash-completion "$(DESTDIR)$(BASHCOMPDIR)/pass"
  9. - @[ "$(WITH_ZSHCOMP)" = "yes" ] || exit 0; install -v -d "$(DESTDIR)$(ZSHCOMPDIR)" && install -m 0644 -v src/completion/pass.zsh-completion "$(DESTDIR)$(ZSHCOMPDIR)/_pass"
  10. - @[ "$(WITH_FISHCOMP)" = "yes" ] || exit 0; install -v -d "$(DESTDIR)$(FISHCOMPDIR)" && install -m 0644 -v src/completion/pass.fish-completion "$(DESTDIR)$(FISHCOMPDIR)/pass.fish"
  11. + @install -d "$(DESTDIR)$(MANDIR)/man1" && install -m 0644 man/pass.1 "$(DESTDIR)$(MANDIR)/man1/pass.1"
  12. + @[ "$(WITH_BASHCOMP)" = "yes" ] || exit 0; install -d "$(DESTDIR)$(BASHCOMPDIR)" && install -m 0644 src/completion/pass.bash-completion "$(DESTDIR)$(BASHCOMPDIR)/pass"
  13. + @[ "$(WITH_ZSHCOMP)" = "yes" ] || exit 0; install -d "$(DESTDIR)$(ZSHCOMPDIR)" && install -m 0644 src/completion/pass.zsh-completion "$(DESTDIR)$(ZSHCOMPDIR)/_pass"
  14. + @[ "$(WITH_FISHCOMP)" = "yes" ] || exit 0; install -d "$(DESTDIR)$(FISHCOMPDIR)" && install -m 0644 src/completion/pass.fish-completion "$(DESTDIR)$(FISHCOMPDIR)/pass.fish"
  15. ifneq ($(strip $(wildcard $(PLATFORMFILE))),)
  16. install: install-common
  17. - @install -v -d "$(DESTDIR)$(LIBDIR)/password-store" && install -m 0644 -v "$(PLATFORMFILE)" "$(DESTDIR)$(LIBDIR)/password-store/platform.sh"
  18. - @install -v -d "$(DESTDIR)$(LIBDIR)/password-store/extensions"
  19. - @install -v -d "$(DESTDIR)$(BINDIR)/"
  20. + @install -d "$(DESTDIR)$(LIBDIR)/password-store" && install -m 0644 "$(PLATFORMFILE)" "$(DESTDIR)$(LIBDIR)/password-store/platform.sh"
  21. + @install -d "$(DESTDIR)$(LIBDIR)/password-store/extensions"
  22. + @install -d "$(DESTDIR)$(BINDIR)/"
  23. @trap 'rm -f src/.pass' EXIT; sed 's:.*PLATFORM_FUNCTION_FILE.*:source "$(LIBDIR)/password-store/platform.sh":;s:^SYSTEM_EXTENSION_DIR=.*:SYSTEM_EXTENSION_DIR="$(LIBDIR)/password-store/extensions":' src/password-store.sh > src/.pass && \
  24. - install -v -d "$(DESTDIR)$(BINDIR)/" && install -m 0755 -v src/.pass "$(DESTDIR)$(BINDIR)/pass"
  25. + install -d "$(DESTDIR)$(BINDIR)/" && install -m 0755 src/.pass "$(DESTDIR)$(BINDIR)/pass"
  26. else
  27. install: install-common
  28. - @install -v -d "$(DESTDIR)$(LIBDIR)/password-store/extensions"
  29. + @install -d "$(DESTDIR)$(LIBDIR)/password-store/extensions"
  30. @trap 'rm -f src/.pass' EXIT; sed '/PLATFORM_FUNCTION_FILE/d;s:^SYSTEM_EXTENSION_DIR=.*:SYSTEM_EXTENSION_DIR="$(LIBDIR)/password-store/extensions":' src/password-store.sh > src/.pass && \
  31. - install -v -d "$(DESTDIR)$(BINDIR)/" && install -m 0755 -v src/.pass "$(DESTDIR)$(BINDIR)/pass"
  32. + install -d "$(DESTDIR)$(BINDIR)/" && install -m 0755 src/.pass "$(DESTDIR)$(BINDIR)/pass"
  33. endif
  34. uninstall:
  35. - @rm -vrf \
  36. + @rm -rf \
  37. "$(DESTDIR)$(BINDIR)/pass" \
  38. "$(DESTDIR)$(LIBDIR)/password-store" \
  39. "$(DESTDIR)$(MANDIR)/man1/pass.1" \