From e7ac4a51cb7fdf3a21b66e9d6ae1033e2c2c7e63 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 7 Jul 2016 08:28:34 +0200 Subject: Add makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f0d87a4 --- /dev/null +++ b/Makefile @@ -0,0 +1,38 @@ +PREFIX = /usr +BINDIR = $(PREFIX)/bin +DATADIR = $(PREFIX)/share +MANDIR = $(DATADIR)/man +LICENSEDIR = $(DATADIR)/license + +PKGNAME = blue +COMMAND = blue + +all: +clean: + +install: install-cmd install-doc install-license +install-doc: install-man + +install-cmd: + mkdir -p -- "$(DESTDIR)$(BINDIR)" + cp -- blue.py "$(DESTDIR)$(BINDIR)/$(COMMAND)" + chmod 0755 -- "$(DESTDIR)$(BINDIR)/$(COMMAND)" + +install-man: + mkdir -p -- "$(DESTDIR)$(MANDIR)/man1" + cp -- blue.py "$(DESTDIR)$(MANDIR)/man1/$(COMMAND).1" + chmod 0644 -- "$(DESTDIR)$(MANDIR)/man1/$(COMMAND).1" + +install-license: + mkdir -p -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" + cp -- LICENSE "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE" + chmod 0644 -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE" + +uninstall: + -rm -- "$(DESTDIR)$(BINDIR)/$(COMMAND)" + -rm -- "$(DESTDIR)$(MANDIR)/man1/$(COMMAND).1" + -rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE" + -rmdir -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" + +.PHONY: all install uninstall clean +.PHONY: install-cmd install-doc install-man install-license -- cgit v1.2.3-70-g09d2