aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-07 08:28:34 +0200
committerMattias Andrée <maandree@kth.se>2016-07-07 08:28:34 +0200
commite7ac4a51cb7fdf3a21b66e9d6ae1033e2c2c7e63 (patch)
treee01b1a561a7f175cde50ddccf55d3b0bdb18c0db
parentAdd manpage (diff)
downloadblue-e7ac4a51cb7fdf3a21b66e9d6ae1033e2c2c7e63.tar.gz
blue-e7ac4a51cb7fdf3a21b66e9d6ae1033e2c2c7e63.tar.bz2
blue-e7ac4a51cb7fdf3a21b66e9d6ae1033e2c2c7e63.tar.xz
Add makefile
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--Makefile38
1 files changed, 38 insertions, 0 deletions
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