Browse Source

add Makefile for installation

tags/pre-alpha-0.3.0
Manos Pitsidianakis 1 year ago
parent
commit
4aa34b2462
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS. GPG Key ID: 73627C2F690DF710
2 changed files with 39 additions and 1 deletions
  1. +24
    -0
      Makefile
  2. +15
    -1
      README

+ 24
- 0
Makefile View File

@ -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

+ 15
- 1
README View File

@ -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