diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-09-16 16:21:29 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-09-16 16:41:22 +0300 |
commit | 4aa34b24620026e51870e496517019429959ba60 (patch) | |
tree | a7602703ea01c2d180b970007b8a570fcc31389b | |
parent | 8795c2da4f1b082b17c0291aeecd2e51f4f4a51f (diff) |
add Makefile for installation
-rw-r--r-- | Makefile | 24 | ||||
-rw-r--r-- | README | 16 |
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 @@ -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 |