Merge from vendor branch tnf:
[pkgsrc.git] / net / pptp / patches / patch-aa
1 $NetBSD$
2
3 Index: Makefile
4 --- Makefile.orig       Wed Feb 18 17:42:14 1998
5 +++ Makefile    Sun Apr  9 21:07:17 2000
6 @@ -1,10 +1,11 @@
7 -VERSION = 1.0.2
8 -VERSION_DEFINE = '-DPPTP_LINUX_VERSION="${VERSION}"'
9 +VERSION = 1.0.2+NetBSD
10 +VERSION_DEFINE = '-DPPTP_LINUX_VERSION="${VERSION}"' -DPROGRAM_NAME='"pptp"'
11  
12  CC     = gcc -Wall
13 -DEBUG  = -g
14 +RM     = rm
15 +DEBUG  = -g -O2 # -O9
16  INCLUDE =
17 -CFLAGS  = -O9 $(VERSION_DEFINE) $(DEBUG) $(INCLUDE)
18 +CFLAGS  =  $(VERSION_DEFINE) $(DEBUG) $(INCLUDE)
19  LIBS   =
20  LDFLAGS        =
21  
22 @@ -24,7 +25,19 @@
23  CALLMGR_OBJS = pptp_callmgr.o pptp_ctrl.o dirutil.o util.o vector.o version.o
24  CALLMGR_DEPS = pptp_callmgr.h pptp_ctrl.h dirutil.h pptp_msg.h vector.h
25  
26 -all: $(PPTP_BIN) $(CALLMGR_BIN)
27 +MANPAGE=pptp.8
28 +
29 +all: $(PPTP_BIN) $(MANPAGE)
30 +
31 +install:
32 +       $(INSTALL) -c $(PPTP_BIN) ${PREFIX}/sbin/${PPTP_BIN}
33 +       $(INSTALL) -c -m 444 $(MANPAGE) ${PREFIX}/man/man8/$(MANPAGE)
34 +       mkdir -p ${PREFIX}/share/doc/pptp
35 +       $(INSTALL) -c -m 444 USING ${PREFIX}/share/doc/pptp/USING
36 +       $(INSTALL) -c -m 444 README ${PREFIX}/share/doc/pptp/README
37 +       $(INSTALL) -c -m 444 INSTALL ${PREFIX}/share/doc/pptp/INSTALL
38 +       $(INSTALL) -c -m 444 NEWS ${PREFIX}/share/doc/pptp/NEWS
39 +       tar cf - Reference Documentation |(cd ${PREFIX}/share/doc/pptp && tar xpBf -)
40  
41  $(PPTP_BIN): $(PPTP_OBJS) $(PPTP_DEPS)
42         $(CC) -o $(PPTP_BIN) $(PPTP_OBJS) $(LDFLAGS) $(LIBS)
43 @@ -36,7 +49,7 @@
44         $(CC) -o vector_test vector_test.o vector.o
45  
46  clean:
47 -       $(RM) *.o *~
48 +       $(RM) -f *.o *~
49  
50  clobber: clean
51         $(RM) $(PPTP_BIN) $(CALLMGR_BIN) vector_test