diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-10-09 10:33:26 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-10-09 10:33:26 +0200 |
commit | 303ec60d7aedec70fcff2a4f4965bcc90c2aa365 (patch) | |
tree | 41f961a69a0235e59de4caf974024bca5ccbbf96 /Makefile | |
parent | add makefile (diff) | |
download | bfind-303ec60d7aedec70fcff2a4f4965bcc90c2aa365.tar.gz bfind-303ec60d7aedec70fcff2a4f4965bcc90c2aa365.tar.bz2 bfind-303ec60d7aedec70fcff2a4f4965bcc90c2aa365.tar.xz |
add install and unstall
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | Makefile | 33 |
1 files changed, 32 insertions, 1 deletions
@@ -1,14 +1,45 @@ +PREFIX = /usr +BIN = /bin +DATA = /share +LICENSES = $(DATA)/licenses +COMMAND = bfind +PKGNAME = bfind + PY3_SHEBANG = /usr/bin/env/ python3 .PHONY: all -all: bfind +all: cmd + +.PHONY: cmd +cmd: bfind bfind: src/bfind.py cp "$<" "$@" sed -i 's:/usr/bin/env/ python3:$(PY3_SHEBANG):' "$@" +.PHONY: install +install: install-cmd install-license + +.PHONY: install-cmd +install-cmd: bfind + install -d -- "$(DESTDIR)$(PREFIX)$(BIN)" + install -m755 -- bfind "$(DESTDIR)$(PREFIX)$(BIN)/$(COMMAND)" + +.PHONY: install-license +install-license: + install -d -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)" + install -m644 -- COPYING LICENSE "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)" + +.PHONY: uninstall +uninstall: + -rm -- "$(DESTDIR)$(PREFIX)$(BIN)/$(COMMAND)" + -rm -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)/COPYING" + -rm -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)/LICENSE" + -rm -d -- "$(DESTDIR)$(PREFIX)$(LICENSES)/$(PKGNAME)" + + .PHONY: clean clean: -rm -- bfind |