From c0a305579e2f7b42eb234591534904b60e2e15fd Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Tue, 2 Apr 2024 03:45:07 -0300 Subject: [PATCH] Add install, deinstall Makefile targets Fix #12 --- Makefile | 15 +++++++++++++++ README.md | 13 +++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..11291f7 --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +PREFIX = /usr/local +BINDIR = $(PREFIX)/bin +LIBEXECDIR = $(PREFIX)/libexec +MANDIR = $(PREFIX)/man/man8 + +install: + install -d $(BINDIR) $(LIBEXECDIR) $(MANDIR) + install -m 0755 bin/portzap $(BINDIR) + install -m 0755 -d libexec/portzap $(LIBEXECDIR) + install -m 0644 man/man8/portzap.8 $(MANDIR) + +deinstall: + rm -rf $(LIBEXECDIR)/portzap + rm -f $(BINDIR)/portzap + rm -f $(MANDIR)/portzap.8 diff --git a/README.md b/README.md index 24db00b..32c794c 100644 --- a/README.md +++ b/README.md @@ -31,14 +31,11 @@ portzap is a utility that manages a local copy of the ## Install -``` -$ git clone https://github.com/0x1eef/portzap.git -$ cd portzap -# cp -R bin /usr/local/ -# cp -R libexec /usr/local/ -# portzap adduser -# pw groupmod -n _portzap -m -``` + $ git clone https://github.com/0x1eef/portzap.git + $ cd portzap + # make install + # portzap adduser + # pw groupmod -n _portzap -m ## Sources