Recently Written · git

clic

MIRROR ONLY Gopher client with pretty colours in Common Lisp

git clone https://github.com/equwal/clic

Log | Files | Refs


commit ce97c575a3ee47a5507862d0c3bf8f353da35897
Christoph Lohmann <20h@r-36.net>
2018-02-04 12:07:44 +0100

Add a manpage and makefile logic for manpage to clic.

 Makefile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index cedaa10..9c85c12 100644
--- a/Makefile
+++ b/Makefile
@@ -2,11 +2,13 @@
 # See the LICENSE file for copyright and license details.
 .POSIX:
 
+VERSION = 0.1
+
 BIN    = clic
 LISP   = ecl
 PREFIX = /usr
 BINDIR = ${PREFIX}/bin
-MANDIR = ${PREFIX}/share/man/man1
+MANDIR = ${PREFIX}/share/man
 
 all: extension.so ${BIN}
 
@@ -25,10 +27,16 @@ install: ${BIN}
 	@mkdir -p "${DESTDIR}${BINDIR}"
 	@cp -f clic "${DESTDIR}${BINDIR}/${BIN}"
 	@chmod 755 "${DESTDIR}${BINDIR}/${BIN}"
+	@echo installing manual page to ${DESTDIR}${MANDIR}/man1
+	@mkdir -p ${DESTDIR}${MANDIR}/man1
+	@sed "s/VERSION/${VERSION}/g" < clic.1 > ${DESTDIR}${MANDIR}/man1/clic.1
+	@chmod 644 ${DESTDIR}${MANDIR}/man1/clic.1
 
 uninstall:
 	@echo removing executable file from "${DESTDIR}${PREFIX}/bin"
 	@rm -f "${DESTDIR}${BINDIR}/${BIN}"
+	@echo removing manual page from ${DESTDIR}${MANDIR}/man1
+	@rm -f ${DESTDIR}${MANDIR}/man1/clic.1
 
 clean:
 	rm -f "${BIN}" clic.o clic.eclh clic.cxx bookmark-test extension.so