summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7a1f9b0
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+DESTDIR?=
+PREFIX?= /usr/local
+BINDIR?= ${PREFIX}/bin
+HOOKDIR?= ${PREFIX}/share/lfldap/hooks
+
+HOOKS= apache24.sh \
+ chrony.sh \
+ nginx.sh \
+ pf.sh \
+ postfix.sh
+
+all: .PHONY
+
+${DESTDIR}${BINDIR}:
+ install -d -m 0755 ${DESTDIR}${BINDIR}
+
+${DESTDIR}${HOOKDIR}:
+ install -d -m 0755 ${DESTDIR}${HOOKDIR}
+
+install: install-bin install-hooks .PHONY
+
+install-bin: ${DESTDIR}${BINDIR} .PHONY
+ install -C -m 0755 lfldap-update.sh ${DESTDIR}${BINDIR}/lfldap-update
+
+install-hooks: ${DESTDIR}${HOOKDIR} .PHONY
+.for hook in ${HOOKS}
+ install -C -m 0644 ${hook} ${DESTDIR}${HOOKDIR}
+.endfor