Browse Source

add Makefile for installation

embed
Manos Pitsidianakis 2 years ago
parent
commit
4aa34b2462
Signed by: epilys GPG Key ID: 73627C2F690DF710
  1. 24
      Makefile
  2. 16
      README

24
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

16
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

Loading…
Cancel
Save