From 1bd0ae76ff08271010512309394b1be17e06d64d Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 11 Jan 2020 02:40:55 -0500 Subject: Add FreeBSD rc script --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 309dd8f..b358a82 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ PREFIX = /usr/local MANDIR = ${PREFIX}/share/man +ETCDIR = ${PREFIX}/etc LIBS_PREFIX = /usr/local CFLAGS += -std=c11 -Wall -Wextra -Wpedantic @@ -10,6 +11,7 @@ LDLIBS_litterbox = -ltls BINS = litterbox scoop unscoop MANS = ${BINS:=.1} +RCS = rc.d/litterbox -include config.mk @@ -37,6 +39,9 @@ install: ${BINS} ${MANS} install -d ${PREFIX}/bin ${MANDIR}/man1 install ${BINS} ${PREFIX}/bin for man in ${MANS}; do gzip -c $$man > ${MANDIR}/man1/$$man.gz; done + if [ -n '${RCS}' ]; then install -d ${ETCDIR}/rc.d; fi + if [ -n '${RCS}' ]; then install ${RCS} ${ETCDIR}/rc.d; fi uninstall: rm -f ${BINS:%=${PREFIX}/bin/%} ${MANS:%=${MANDIR}/man1/%.gz} + if [ -n '${RCS}' ]; then rm -f ${RCS:%=${ETCDIR}/%}; fi -- cgit 1.4.1