$NetBSD: patch-client_Makefile,v 1.3 2014/01/06 22:11:50 joerg Exp $

Configure for pkgsrc.

--- client/Makefile.orig	2013-01-02 23:00:42.000000000 +0000
+++ client/Makefile
@@ -18,14 +18,14 @@
 
 
 CC     = cc
-CFLAGS+= -std=gnu99  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare  -Wno-traditional	 -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wold-style-definition -Wsign-compare -Wformat=2   -Wno-format-zero-length  -Werror
+CFLAGS+= -std=gnu99  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wold-style-definition -Wsign-compare -Wformat=2   -Wno-format-zero-length  -Werror
 #CFLAGS = -O -DSERVICES -DLOCAL_ECHO
 CFLAGS += -g -DSERVICES #-DLOCAL_ECHO
 LIBS   = -lcurses -ltermlib #-lresolv
 
 LPR    = lpr 
 #RDEST	= /usr/ucb/phone
-RDEST  = /usr/local/bin/phone
+RDEST  = ${PREFIX}/bin/phone
 
 HDRS = defs.h
 
@@ -50,14 +50,14 @@ DEST = phone
 all:	${DEST}
 
 ${DEST}: ${OBJS}
-	/bin/rm -f ${DEST}
+	rm -f ${DEST}
 	${CC} ${CFLAGS} -o ${DEST} ${OBJS} ${LIBS}
 
 ${OBJS}: ${HDRS}
 
 install: ${DEST}
-	/bin/rm -f ${RDEST}
-	cp ${DEST} ${RDEST}
+	rm -f ${RDEST}
+	${BSD_INSTALL_PROGRAM} ${DEST} ${DESTDIR}${RDEST}
 
 print:	${HDRS} ${SRCS}
 	pr -f ${HDRS} ${SRCS} | expand -4 | ${LPR}
