aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-05-29 14:22:15 +0800
committerGuangxiong Lin <[email protected]>2022-05-29 15:08:21 +0800
commit9464678f948c623eb3440ba07a35c90c8ecc6951 (patch)
tree125eb029fba65e056eff2f79028a2a275dc22e61 /Makefile
downloadpass-login-9464678f948c623eb3440ba07a35c90c8ecc6951.tar.gz
pass-login-9464678f948c623eb3440ba07a35c90c8ecc6951.tar.bz2
pass-login-9464678f948c623eb3440ba07a35c90c8ecc6951.zip
First commitv0.1.0
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..35e29d1
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,37 @@
+PROG ?= login
+PREFIX ?= /usr
+DESTDIR ?=
+LIBDIR ?= $(PREFIX)/lib
+SYSTEM_EXTENSION_DIR ?= $(LIBDIR)/password-store/extensions
+MANDIR ?= $(PREFIX)/share/man
+BASHCOMPDIR ?= $(PREFIX)/etc/bash_completion.d
+
+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
+
+install:
+ @install -vd "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/" \
+ "$(DESTDIR)$(MANDIR)/man1" \
+ "$(DESTDIR)$(BASHCOMPDIR)"
+ @install -vm0755 $(PROG).bash "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/$(PROG).bash"
+ @install -vm 0644 "completion/pass-$(PROG).bash" "$(DESTDIR)$(BASHCOMPDIR)/pass-$(PROG)"
+ @install -vm 0644 "pass-$(PROG).1" "$(DESTDIR)$(MANDIR)/man1/pass-$(PROG).1"
+ @echo
+ @echo "pass-$(PROG) is installed succesfully"
+ @echo
+
+uninstall:
+ @rm -vrf \
+ "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/$(PROG).bash" \
+ "$(DESTDIR)$(BASHCOMPDIR)/pass-$(PROG)" \
+ "$(DESTDIR)$(MANDIR)/man1/pass-$(PROG).1"
+
+lint:
+ shellcheck --shell bash $(PROG).bash
+
+check: lint
+
+.PHONY: install uninstall lint check