aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTad Fisher <tad@simple.com>2017-02-14 16:13:32 -0800
committerTad Fisher <tad@simple.com>2017-02-14 16:23:58 -0800
commita4e02eabb56faa60b1c29fc4008193135a7cfd47 (patch)
treedefb0a39fd89e08baef2e50dff8c02cb192e1616 /Makefile
downloadpass-otp-a4e02eabb56faa60b1c29fc4008193135a7cfd47.tar.gz
pass-otp-a4e02eabb56faa60b1c29fc4008193135a7cfd47.zip
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 37 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..da01f52
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,37 @@
+PROG ?= otp
+PREFIX ?= /usr
+DESTDIR ?=
+LIBDIR ?= $(PREFIX)/lib
+SYSTEM_EXTENSION_DIR ?= $(LIBDIR)/password-store/extensions
+MANDIR ?= $(PREFIX)/share/man
+
+all:
+ @echo "pass-$(PROG) is a shell script and does not need compilation, it can be simply executed."
+ @echo ""
+ @echo "To install it try \"make install\" instead."
+ @echo
+ @echo "To run pass $(PROG) one needs to have some tools installed on the system:"
+ @echo " password store"
+
+install:
+ @install -v -d "$(DESTDIR)$(MANDIR)/man1" && install -m 0644 -v pass-$(PROG).1 "$(DESTDIR)$(MANDIR)/man1/pass-$(PROG).1"
+ @install -v -d "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/"
+ @install -Dm0755 $(PROG).bash "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/$(PROG).bash"
+ @echo
+ @echo "pass-$(PROG) is installed succesfully"
+ @echo
+
+uninstall:
+ @rm -vrf \
+ "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/$(PROG).bash" \
+ "$(DESTDIR)$(IMPORTERS_DIR)/" \
+ "$(DESTDIR)$(MANDIR)/man1/pass-$(PROG).1" \
+
+test:
+ make -C tests
+
+lint:
+ shellcheck -s bash $(PROG).bash
+
+
+.PHONY: install uninstall test lint