fix isakmpd
[openwrt/svn-archive/archive.git] / package / isakmpd / patches / 020-standardize.patch
1 diff -urN isakmpd/GNUmakefile isakmpd.new/GNUmakefile
2 --- isakmpd/GNUmakefile 2004-01-16 13:36:32.000000000 +0100
3 +++ isakmpd.new/GNUmakefile 2006-09-03 17:33:03.000000000 +0200
4 @@ -238,3 +238,16 @@
5
6 realcleandepend:
7 rm -f .depend tags
8 +
9 +# Install rules
10 +install: install-bin install-man
11 +
12 +install-bin: isakmpd
13 + -mkdir -p $(DESTDIR)$(BINDIR)
14 + $(INSTALL) $(INSTALL_OPTS) -m 755 isakmpd $(DESTDIR)$(BINDIR)
15 +
16 +install-man:
17 + -mkdir -p $(DESTDIR)$(MANDIR)/man8
18 + $(INSTALL) $(INSTALL_OPTS) -m 444 isakmpd.8 $(DESTDIR)$(MANDIR)/man8
19 + -mkdir -p $(DESTDIR)$(MANDIR)/man5
20 + $(INSTALL) $(INSTALL_OPTS) -m 444 isakmpd.conf.5 isakmpd.policy.5 $(DESTDIR)$(MANDIR)/man5
21 diff -urN isakmpd/samples/Makefile isakmpd.new/samples/Makefile
22 --- isakmpd/samples/Makefile 2003-06-03 16:39:50.000000000 +0200
23 +++ isakmpd.new/samples/Makefile 2006-09-03 17:07:24.000000000 +0200
24 @@ -26,7 +26,7 @@
25 #
26
27 FILES= VPN-* policy singlehost-*
28 -TARGETDIR= /usr/share/ipsec/isakmpd
29 +TARGETDIR= /usr/share/isakmpd/samples
30
31 # The mkdir below is for installation on OpenBSD pre 2.7
32 install:
33
34 diff -urN isakmp.old/sysdep/linux/GNUmakefile.sysdep isakmp.dev/sysdep/linux/GNUmakefile.sysdep
35 --- isakmp.old/sysdep/linux/GNUmakefile.sysdep 2006-09-07 13:49:20.000000000 +0200
36 +++ isakmp.dev/sysdep/linux/GNUmakefile.sysdep 2006-09-07 13:51:41.000000000 +0200
37 @@ -25,18 +25,18 @@
38 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 #
40
41 -LIBGMP:= /usr/lib/libgmp.a
42 -LIBCRYPTO:= /usr/lib/libcrypto.a
43 +LIBGMP:=
44 +LIBCRYPTO:= -lcrypto
45 LIBSYSDEPDIR:= ${.CURDIR}/sysdep/common/libsysdep
46 LIBSYSDEP:= ${LIBSYSDEPDIR}/libsysdep.a
47
48 -LDADD+= -lgmp ${LIBSYSDEP} ${LIBCRYPTO}
49 +LDADD+= $(EXTRA_LDFLAGS) -lgmp ${LIBSYSDEP} ${LIBCRYPTO}
50 DPADD+= ${LIBGMP} ${LIBSYSDEP}
51
52 CFLAGS+= -DHAVE_GETNAMEINFO -DUSE_OLD_SOCKADDR -DHAVE_PCAP \
53 -DNEED_SYSDEP_APP -DMP_FLAVOUR=MP_FLAVOUR_GMP -DUSE_AES \
54 -I${.CURDIR}/sysdep/linux/include -I${.CURDIR}/sysdep/common \
55 - -I/usr/include/openssl
56 + $(EXTRA_CPPFLAGS)
57
58 FEATURES= debug tripledes blowfish cast ec aggressive x509 policy
59 FEATURES+= dpd nat_traversal isakmp_cfg des aes
60 diff -ruN isakmpd-20041012.orig/GNUmakefile isakmpd-20041012.new/GNUmakefile
61 --- isakmpd-20041012.orig/GNUmakefile 2006-12-16 22:41:26.000000000 +0100
62 +++ isakmpd-20041012.new/GNUmakefile 2006-12-16 22:48:27.000000000 +0100
63 @@ -169,7 +169,6 @@
64 X509= x509.c
65 CFLAGS+= -DUSE_LIBCRYPTO
66 LDADD+= -lcrypto
67 -DPADD+= ${LIBCRYPTO}
68 endif
69
70 ifdef USE_RAWKEY
71 diff -ruN isakmpd-20041012.orig/Makefile isakmpd-20041012.new/Makefile
72 --- isakmpd-20041012.orig/Makefile 2004-10-12 23:25:52.000000000 +0200
73 +++ isakmpd-20041012.new/Makefile 2006-12-16 22:46:48.000000000 +0100
74 @@ -147,7 +147,6 @@
75 .ifdef USE_LIBCRYPTO
76 CFLAGS+= -DUSE_LIBCRYPTO
77 LDADD+= -lcrypto
78 -DPADD+= ${LIBCRYPTO}
79 .endif
80
81 .ifdef USE_LIBDES
82 diff -ruN isakmpd-20041012.orig/apps/certpatch/Makefile isakmpd-20041012.new/apps/certpatch/Makefile
83 --- isakmpd-20041012.orig/apps/certpatch/Makefile 2004-10-12 23:25:52.000000000 +0200
84 +++ isakmpd-20041012.new/apps/certpatch/Makefile 2006-12-16 22:48:58.000000000 +0100
85 @@ -40,7 +40,6 @@
86 .PATH: ${TOPSRC} ${TOPSRC}/sysdep/${OS} ${TOPOBJ}
87 CFLAGS+= -I${TOPSRC} -I${TOPSRC}/sysdep/${OS} -I${TOPOBJ} -Wall
88 LDADD+= -lcrypto
89 -DPADD+= ${LIBCRYPTO}
90 MAN= certpatch.8
91
92 .if ${FEATURES:Mgmp} == "gmp"
93 diff -ruN isakmpd-20041012.orig/regress/crypto/Makefile isakmpd-20041012.new/regress/crypto/Makefile
94 --- isakmpd-20041012.orig/regress/crypto/Makefile 2004-10-12 23:25:52.000000000 +0200
95 +++ isakmpd-20041012.new/regress/crypto/Makefile 2006-12-16 22:50:02.000000000 +0100
96 @@ -13,7 +13,7 @@
97 -DUSE_TRIPLEDES -DUSE_CAST -DUSE_BLOWFISH -DUSE_DES \
98 -DUSE_AES
99 LDADD+= -lcrypto -ldes
100 -DPADD+= ${LIBCRYPTO} ${LIBDES}
101 +DPADD+= ${LIBDES}
102 NOMAN=
103 DEBUG= -g
104
105 diff -ruN isakmpd-20041012.orig/regress/dh/Makefile isakmpd-20041012.new/regress/dh/Makefile
106 --- isakmpd-20041012.orig/regress/dh/Makefile 2004-10-12 23:25:52.000000000 +0200
107 +++ isakmpd-20041012.new/regress/dh/Makefile 2006-12-16 22:49:25.000000000 +0100
108 @@ -15,7 +15,6 @@
109 -DUSE_EC
110 NOMAN=
111 LDADD+= -lcrypto
112 -DPADD+= ${LIBCRYPTO}
113 DEBUG= -g
114
115 .if ${FEATURES:Mgmp} == "gmp"
116 diff -ruN isakmpd-20041012.orig/regress/group/Makefile isakmpd-20041012.new/regress/group/Makefile
117 --- isakmpd-20041012.orig/regress/group/Makefile 2004-10-12 23:25:52.000000000 +0200
118 +++ isakmpd-20041012.new/regress/group/Makefile 2006-12-16 22:49:30.000000000 +0100
119 @@ -15,7 +15,6 @@
120 -DUSE_EC
121 NOMAN=
122 LDADD+= -lcrypto
123 -DPADD+= ${LIBCRYPTO}
124 DEBUG= -g
125
126 .if ${FEATURES:Mgmp} == "gmp"
127 diff -ruN isakmpd-20041012.orig/regress/rsakeygen/Makefile isakmpd-20041012.new/regress/rsakeygen/Makefile
128 --- isakmpd-20041012.orig/regress/rsakeygen/Makefile 2004-10-12 23:25:52.000000000 +0200
129 +++ isakmpd-20041012.new/regress/rsakeygen/Makefile 2006-12-16 22:49:41.000000000 +0100
130 @@ -62,7 +62,6 @@
131 .ifdef USE_LIBCRYPTO
132 CFLAGS+= -DUSE_LIBCRYPTO
133 LDADD+= -lcrypto
134 -DPADD+= ${LIBCRYPTO}
135 .endif
136
137 .if !defined (HAVE_DLOPEN) && !defined (USE_LIBCRYPTO)
138 diff -ruN isakmpd-20041012.orig/regress/x509/Makefile isakmpd-20041012.new/regress/x509/Makefile
139 --- isakmpd-20041012.orig/regress/x509/Makefile 2004-10-12 23:25:52.000000000 +0200
140 +++ isakmpd-20041012.new/regress/x509/Makefile 2006-12-16 22:49:49.000000000 +0100
141 @@ -78,7 +78,6 @@
142 X509= x509.c
143 CFLAGS+= -DUSE_LIBCRYPTO
144 LDADD+= -lcrypto ${LIBLWRES}
145 -DPADD+= ${LIBCRYPTO}
146 .endif
147
148 .if !defined (HAVE_DLOPEN) && !defined (USE_LIBCRYPTO) || !defined (USE_KEYNOTE)