summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorStefan Kreutz <mail@skreutz.com>2022-11-09 09:49:02 +0100
committerStefan Kreutz <mail@skreutz.com>2022-11-09 09:49:02 +0100
commit9a08dec095725012546ea93ac07142a570d1b220 (patch)
treeb33557ad90ae94adb7d2e24dad1c45387910c18b /Makefile
parentc39913911b6c357ca9882d37b54db8daa23a5383 (diff)
downloadjotpass-0.2.0.tar
Port to GNU/Linuxjotpass-0.2.0
Tested on Void Linux x86_64 glibc.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile36
1 files changed, 29 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 552ebda..8f06eeb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,31 @@
-MAN= jotpass.1
-BINDIR= /usr/local/bin
-MANDIR= /usr/local/man/man
+# Portable makefile supporting OpenBSD and GNU/Linux.
-beforeinstall:
- ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
- ${.CURDIR}/jotpass.ksh ${DESTDIR}${BINDIR}/jotpass
+PREFIX = /usr/local
+INSTALL = install
+BINDIR = bin
+BINOWN = root
+BINGRP = root
+BINMODE = 555
+MANDIR = man/man
+MANOWN = root
+MANGRP = root
+MANMODE = 444
-.include <bsd.prog.mk>
+include config.mk
+
+all:
+
+clean:
+
+lint:
+ shellcheck -a jotpass.ksh
+ mandoc -T lint -W warning jotpass.1
+ -mandoc -T lint -W all jotpass.1
+
+install:
+ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} jotpass.ksh ${DESTDIR}${PREFIX}/${BINDIR}/jotpass
+ ${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} jotpass.1 ${DESTDIR}${PREFIX}/${MANDIR}1/jotpass.1
+
+uninstall:
+ rm -f ${DESTDIR}${PREFIX}/${BINDIR}/jotpass
+ rm -f ${DESTDIR}${PREFIX}/${MANDIR}1/jotpass.1
Generated by cgit. See skreutz.com for my tech blog and contact information.