--- Makefile.orig 2022-10-04 17:34:08 UTC +++ Makefile @@ -4,13 +4,13 @@ VERSION = 1.3 VERSION = 1.3 # paths -PREFIX = /usr/local +PREFIX ?= /usr/local MANPREFIX = ${PREFIX}/share/man # use system flags. -SIC_CFLAGS = ${CFLAGS} -SIC_LDFLAGS = ${LDFLAGS} -SIC_CPPFLAGS = ${LDFLAGS} -DVERSION=\"${VERSION}\" -D_GNU_SOURCE +SIC_CFLAGS += ${CFLAGS} +SIC_LDFLAGS += ${LDFLAGS} +SIC_CPPFLAGS += ${LDFLAGS} -DVERSION=\"${VERSION}\" -D_GNU_SOURCE BIN = sic SRC = ${BIN:=.c} @@ -45,15 +45,15 @@ install: all install: all mkdir -p ${DESTDIR}${PREFIX}/bin - cp -f ${BIN} "${DESTDIR}${PREFIX}/bin" - chmod 755 "${DESTDIR}${PREFIX}/bin/${BIN}" + cp -f sic ${DESTDIR}${PREFIX}/bin/simpleirc + chmod 755 ${DESTDIR}${PREFIX}/bin/simpleirc mkdir -p "${DESTDIR}${MANPREFIX}/man1" sed "s/VERSION/${VERSION}/g" < ${MAN1} > "${DESTDIR}${MANPREFIX}/man1/${MAN1}" - chmod 644 "${DESTDIR}${MANPREFIX}/man1/${MAN1}" + mv ${DESTDIR}${MANPREFIX}/man1/sic.1 ${DESTDIR}${MANPREFIX}/man1/simpleirc.1 + chmod 644 ${DESTDIR}${MANPREFIX}/man1/simpleirc.1 uninstall: - rm -f \ - "${DESTDIR}${PREFIX}/bin/${BIN}"\ - "${DESTDIR}${MANPREFIX}/man1/${MAN1}" + rm -f ${DESTDIR}${PREFIX}/bin/simpleirc + rm -f ${DESTDIR}${MANPREFIX}/man1/simpleirc.1 .PHONY: all clean dist install uninstall