add Makefile - drist - a remote deployment tool HTML git clone git://bitreich.org/drist/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/drist/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit ad3583713639a46538012ea36758e508834a9a36 DIR parent effd83e11ba14b330cc585cc85830d3841f8b5d8 HTML Author: Solene Rapenne <solene@perso.pw> Date: Tue, 17 Jul 2018 13:51:01 +0200 add Makefile Diffstat: A Makefile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+), 0 deletions(-) --- DIR diff --git a/Makefile b/Makefile @@ -0,0 +1,30 @@ +# notes – a console notes manager using git +# See the LICENSE file for copyright and license details. +.POSIX: + +VERSION = 0.1 + +BIN = drist +PREFIX = /usr +BINDIR = ${PREFIX}/bin +MANDIR = ${PREFIX}/share/man + +all: + +install: + @echo installing executable to "${DESTDIR}${PREFIX}/bin" + @mkdir -p "${DESTDIR}${BINDIR}" + @cp -f "${BIN}" "${DESTDIR}${BINDIR}/${BIN}" + @chmod 755 "${DESTDIR}${BINDIR}/${BIN}" + @echo installing manual page to ${DESTDIR}${MANDIR}/man1 + @mkdir -p ${DESTDIR}${MANDIR}/man1 + @sed "s/VERSION/${VERSION}/g" < ${BIN}.1 > ${DESTDIR}${MANDIR}/man1/${BIN}.1 + @chmod 644 ${DESTDIR}${MANDIR}/man1/${BIN}.1 + +uninstall: + @echo removing executable file from "${DESTDIR}${PREFIX}/bin" + @rm -f "${DESTDIR}${BINDIR}/${BIN}" + @echo removing manual page from ${DESTDIR}${MANDIR}/man1 + @rm -f ${DESTDIR}${MANDIR}/man1/${BIN}.1 + +.PHONY: all install uninstall clean