diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..637f3f2 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +PREFIX := /usr/local +PKGNAME := movie-rename + +build: + cargo build --release + +build-debug: + cargo build + +clean: + cargo clean + +install: build + install -Dm755 target/release/$(PKGNAME) "$(DESTDIR)$(PREFIX)/bin/$(PKGNAME)" + install -Dm644 $(PKGNAME).1 "$(DESTDIR)$(PREFIX)/man/man1/$(PKGNAME).1" + +uninstall: + rm -f "$(DESTDIR)$(PREFIX)/bin/$(PKGNAME)" + rm -f "$(DESTDIR)$(PREFIX)/man/man1/$(PKGNAME).1" + +.PHONY: build build-debug install clean uninstall diff --git a/README.md b/README.md index f1f576c..2f30dde 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,13 @@ This is made mostly due to [mnamer](https://github.com/jkwill87/mnamer) not havi ## Installation Install from [AUR](https://aur.archlinux.org/packages/movie-rename-bin), my personal [lure-repo](https://github.com/SinTan1729/lure-repo) or download the binary from the releases. You can also get it from [crates.io](https://crates.io/crates/movie-rename). +You can also install from source by using +``` +git clone https://github.com/SinTan1729/movie-rename +cd movie-rename +sudo make install +``` + ## Usage - The syntax is: diff --git a/movie-rename.1 b/movie-rename.1 index ba2b88c..a3fb64f 100644 --- a/movie-rename.1 +++ b/movie-rename.1 @@ -1,6 +1,6 @@ .\" Manpage for movie-rename. .\" Contact sayantan[dot]santra689[at]gmail[dot]com to correct errors or typos. -.TH man 1 "08 Dec 2022" "1.1.1" "movie-rename man page" +.TH man 1 "February 2023" "movie-rename" .SH NAME movie-rename .SH SYNOPSIS