~poptart/hosaka-pki

ref: 25cc2d9928ba8db6f4e43fc71063d6de663adbbc hosaka-pki/Makefile -rw-r--r-- 747 bytes
25cc2d99 — terrorbyte Started fixing the actual structure. This is actually a real project now 2 years 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
32
include config.mk

all: check

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

#openssl.cnf:
#	@echo sed -e "" < tmpl/openssl.cnf.tmpl > openssl.cnf

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

clean:
	@printf "cleaning"

.PHONY:
	all clean install check