From 6a60cf8431373fec813cfdb8d7a948d04e609d0f Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sun, 8 Oct 2023 13:26:55 -0400 Subject: Add rc script --- Makefile | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8922511..d6a8580 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,23 @@ +PREFIX ?= /usr/local +MANDIR ?= ${PREFIX}/man + CFLAGS += -std=c11 -Wall -Wextra -all: kitd +all: kitd rc + +rc: rc.in + sed 's|%%PREFIX%%|${PREFIX}|g' rc.in >rc clean: - rm -f kitd + rm -f kitd rc + +install: kitd kitd.8 rc + install -d ${DESTDIR}${PREFIX}/sbin ${DESTDIR}${MANDIR}/man8 + install -d ${DESTDIR}/etc/rc.d + install kitd ${DESTDIR}${PREFIX}/sbin + install -m 644 kitd.8 ${DESTDIR}${MANDIR}/man8 + install rc ${DESTDIR}/etc/rc.d/kitd + +uninstall: + rm -f ${DESTDIR}${PREFIX}/sbin/kitd ${DESTDIR}${MANDIR}/man8/kitd.8 + rm -f ${DESTDIR}/etc/rc.d/kitd -- cgit 1.4.1