summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile24
-rw-r--r--README16
2 files changed, 39 insertions, 1 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000..d1b3a4cf
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+.POSIX:
+.SUFFIXES:
+meli:
+ cargo build --release
+
+PREFIX=/usr/local
+
+.PHONY: clean
+clean: rm -ri ./target/
+
+
+.PHONY: uninstall
+uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/meli
+ rm $(DESTDIR)$(PREFIX)/share/man/man1/meli.1.gz
+ rm $(DESTDIR)$(PREFIX)/share/man/man5/meli.conf.5.gz
+
+.PHONY: install
+install: meli
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
+ mkdir -p $(DESTDIR)$(PREFIX)/share/man/man5
+ cp -f target/release/meli $(DESTDIR)$(PREFIX)/bin
+ gzip < meli.1 > $(DESTDIR)$(PREFIX)/share/man/man1/meli.1.gz
+ gzip < meli.conf.5 > $(DESTDIR)$(PREFIX)/share/man/man5/meli.conf.5.gz
diff --git a/README b/README
index f28dfd4e..364d2eab 100644
--- a/README
+++ b/README
@@ -11,6 +11,10 @@
terminal mail user agent {|||)<
/ \
`-'
+DOCUMENTATION
+=============
+
+After installing meli, see meli(1) and meli.conf(5) for documentation.
BUILDING
========
@@ -22,10 +26,20 @@ https://doc.rust-lang.org/cargo/getting-started/installation.html
With Cargo available, the project can be built with
-# cargo build --release
+# make
The resulting binary will then be found under target/release/meli
+Run:
+
+# make install
+
+to install the binary and man pages. This requires root, so I suggest you override the default paths and install it in your $HOME:
+
+# make PREFIX=$HOME/.local install
+
+See meli(1) and meli.conf(5) for documentation.
+
You can build and run meli with one command:
# cargo run --release