~poptart/hosaka-pki

ref: 8d6f421fbd4ea6b5ac74c4add9e8321b9c370982 hosaka-pki/Makefile -rw-r--r-- 774 bytes
8d6f421f — poptart Updated to begin adding the interactive functions 1 year, 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
include config.mk

all: check config

check:
	shellcheck -a -x -s sh ./hosaka-pki.sh

config:
	@sed -e "s%{{SSLDIR}}%${SSLDIR}%g" \
		-e "s%{{SSHDIR}}%${SSHDIR}%g" \
		-e "s%{{CONFIGDIR}}%${CONFIGDIR}%g" \
		< config.def > config

install:
	@printf "installing hosaka-pki\\n"
	@mkdir -p "${CONFIGDIR}" "${CONFIGDIR}/ssl" \
		"${CONFIGDIR}/ssh" "${CONFIGDIR}/util"
	@chown 0700 "${CONFIGDIR}/ssl" "${CONFIGDIR}/ssh"
	@cp -f config "${CONFIGDIR}/config"
	@cp -f openssl.cnf.tmpl "${CONFIGDIR}/util/openssl.cnf.tmpl"
	@sed -e "s%{{CONFIGDIR}}%${CONFIGDIR}%g" \
		< hosaka-pki.sh > ${PREFIX}/bin/hosaka-pki
	@chmod 755 ${PREFIX}/bin/hosaka-pki
	@printf "hosaka-pki installed into: ${CONFIGDIR}\\n"

clean:
	@printf "cleaning\\n"
	@rm -f config

.PHONY:
	all clean install check