From 89140a1022867dc65b3021dad6ee01eff20b06f3 Mon Sep 17 00:00:00 2001 From: Gibheer Date: Wed, 4 Mar 2020 20:24:46 +0100 Subject: [PATCH] update makefile --- Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 93c1411..2f303f2 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -NAME = carp_faillover -DESTDIR ?= /usr/local +NAME = carp_failover +DESTDIR ?= . prefix ?= ${DESTDIR}/usr/local exec_prefix ?= ${prefix} bindir ?= ${exec_prefix}/bin @@ -7,9 +7,19 @@ sysconfdir ?= ${prefix}/etc/${NAME} datarootdir ?= ${prefix}/share datadir ?= ${datarootdir}/${NAME} +VERSION != git describe --tags + install: install -d ${sysconfdir} install -m 644 carp_failover.conf ${sysconfdir}/${NAME}.conf.sample install carp_failover ${exec_prefix} -.PHONY: install +release: + mkdir ${NAME}-${VERSION} + for f in ${NAME} ${NAME}.conf LICENSE README.md Makefile; do \ + cp $${f} ${NAME}-${VERSION}/; \ + done + tar -czf ${NAME}-${VERSION}.tar.gz ${NAME}-${VERSION} + rm -R ${NAME}-${VERSION}/ + +.PHONY: install release