pkgsrc/misc/dvtm/patches/patch-aa
tonio d717d4bb97 Use BSD_INSTALL_* instead of simply install and strip
This fixes install under darwin, when strip -s dvtm does not work
2009-02-19 19:22:22 +00:00

38 lines
1.3 KiB
Text

$NetBSD: patch-aa,v 1.4 2009/02/19 19:22:22 tonio Exp $
Do not use rudimentary mkdir(1), cp(1) and chmod(1): install(1) is
simpler and more elegant to install binaries.
--- Makefile.orig 2009-02-08 22:52:37.000000000 +0100
+++ Makefile
@@ -20,6 +20,7 @@ ${OBJ}: config.h config.mk
dvtm: ${OBJ}
@echo CC -o $@
@${CC} -o $@ ${OBJ} ${LDFLAGS}
+ @sed "s/VERSION/${VERSION}/g" < dvtm.1 > dvtm.1.out
debug: clean
@make CFLAGS='${DEBUG_CFLAGS}'
@@ -40,18 +41,12 @@ dist: clean
@rm -rf dvtm-${VERSION}
install: dvtm
- @echo stripping executable
- @strip -s dvtm
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
- @mkdir -p ${DESTDIR}${PREFIX}/bin
- @cp -f dvtm ${DESTDIR}${PREFIX}/bin
- @chmod 755 ${DESTDIR}${PREFIX}/bin/dvtm
- @cp -f dvtm-status ${DESTDIR}${PREFIX}/bin
- @chmod 755 ${DESTDIR}${PREFIX}/bin/dvtm-status
+ ${BSD_INSTALL_PROGRAM} dvtm ${DESTDIR}${PREFIX}/bin
+ ${BSD_INSTALL_SCRIPT} dvtm-status ${DESTDIR}${PREFIX}/bin
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
- @mkdir -p ${DESTDIR}${MANPREFIX}/man1
- @sed "s/VERSION/${VERSION}/g" < dvtm.1 > ${DESTDIR}${MANPREFIX}/man1/dvtm.1
- @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dvtm.1
+ ${BSD_INSTALL_MAN_DIR} ${DESTDIR}${MANPREFIX}/man1
+ ${BSD_INSTALL_MAN} dvtm.1.out ${DESTDIR}${MANPREFIX}/man1/dvtm.1
uninstall:
@echo removing executable file from ${DESTDIR}${PREFIX}/bin