1 diff -durN freeswan-1.3.orig/Makefile freeswan-1.3/Makefile
2 --- freeswan-1.3.orig/Makefile Tue Feb 8 22:22:28 2000
3 +++ freeswan-1.3/Makefile Tue Apr 25 11:44:45 2000
5 # public and private command directories
6 # Beware, many things define PATH settings which are assumed to include
7 # PUBDIR (or at least, to include *some* copy of the "ipsec" command).
8 -PUBDIR=/usr/local/sbin
10 # PRIVDIR is where things get put, FINALPRIVDIR is where they think they
11 # will be put (currently only used by utils/ipsec)
12 -PRIVDIR=/usr/local/lib/ipsec
13 -FINALPRIVDIR=/usr/local/lib/ipsec
14 +PRIVDIR=/usr/lib/ipsec
15 +FINALPRIVDIR=/usr/lib/ipsec
17 -MANTREE=/usr/local/man
18 +MANTREE=/usr/share/man
19 # all relevant manpage subdirectories
20 MANPLACES=man3 man5 man8
21 # where boot/shutdown scripts go (first one that exists gets it)
22 -RCDIRS=/etc/rc.d/init.d /etc/rc.d /etc/init.d /sbin/init.d
23 -RCDIR=$(shell for d in $(RCDIRS) ; \
24 - do if test -d $$d ; \
25 - then echo $$d ; exit 0 ; \
26 - fi ; done ; echo /unknown )
27 +RCDIR=/etc/rc.d/init.d
29 # kernel location, and location of kernel patches in the distribution
30 KERNELSRC=/usr/src/linux
32 SETTINGS=BINDIR=$(PRIVDIR) PUBDIR=$(PUBDIR) PRIVDIR=$(PRIVDIR) \
33 FINALPRIVDIR=$(FINALPRIVDIR) MANTREE=$(MANTREE) INSTALL="$(INSTALL)"
35 - mkdir -p $(PRIVDIR) $(PUBDIR)
36 - for m in $(MANPLACES) ; do mkdir -p $(MANTREE)/$$m ; done
37 + mkdir -p $(DESTDIR)$(PRIVDIR) $(DESTDIR)$(PUBDIR)
38 + for m in $(MANPLACES) ; do mkdir -p $(DESTDIR)$(MANTREE)/$$m ; done
39 cd lib ; $(MAKE) install $(SETTINGS)
40 cd klips/utils ; $(MAKE) install $(SETTINGS)
41 cd pluto ; $(MAKE) install $(SETTINGS)
42 diff -durN freeswan-1.3.orig/klips/utils/Makefile freeswan-1.3/klips/utils/Makefile
43 --- freeswan-1.3.orig/klips/utils/Makefile Tue Feb 8 22:22:06 2000
44 +++ freeswan-1.3/klips/utils/Makefile Tue Apr 25 11:44:45 2000
49 -CFLAGS=-O2 -I../net/ipsec -I../../lib -g
50 +CFLAGS=$(OPT_FLAGS) -I../net/ipsec -I../../lib
53 #CFLAGS+= -Wconversion
55 CFLAGS+= -Wbad-function-cast
57 ALL=spi eroute spigrp tncfg klipsdebug
58 -BINDIR=/usr/local/lib/ipsec
59 -MANTREE=/usr/local/man
60 +BINDIR=/usr/lib/ipsec
61 +MANTREE=/usr/share/man
62 MANDIR=$(MANTREE)/man8
63 FREESWANLIB=../../lib/libfreeswan.a
69 - $(INSTALL) $(ALL) $(BINDIR)
70 + $(INSTALL) $(ALL) $(DESTDIR)$(BINDIR)
71 for f in $(addsuffix .8, $(ALL)) ; do \
72 - $(INSTALL) $$f $(MANDIR)/ipsec_$$f || exit 1 ; done
73 + $(INSTALL) $$f $(DESTDIR)$(MANDIR)/ipsec_$$f || exit 1 ; done
76 $(CC) $(DFLAGS) -o $@ $? $(FREESWANLIB)
77 diff -durN freeswan-1.3.orig/lib/Makefile freeswan-1.3/lib/Makefile
78 --- freeswan-1.3.orig/lib/Makefile Tue Feb 8 22:22:09 2000
79 +++ freeswan-1.3/lib/Makefile Tue Apr 25 11:44:45 2000
81 HDRS=freeswan.h internal.h
85 +CFLAGS=$(OPT_FLAGS) -I.
86 # Add debugging symbols
90 #CFLAGS+= -Wconversion
91 #CFLAGS+= -Wmissing-prototypes
93 CFLAGS+= -Wbad-function-cast
97 -EXTLIBS=libdes.a libgmp.a
98 -MANTREE=/usr/local/man
101 +MANTREE=/usr/share/man
102 MANDIR=$(MANTREE)/man3
103 MANS=atoaddr.3 atoasr.3 atodata.3 atosa.3 atoul.3 goodmask.3 optionsfrom.3 \
106 all: $(EXTHDRS) $(LIB) $(EXTLIBS)
110 + mkdir -p $(DESTDIR)$(MANDIR)
113 - $(INSTALL) $$f $(MANDIR)/ipsec_$$f || exit 1 ; \
114 - ../utils/manlink $(MANDIR) ipsec_$$f ; \
115 + $(INSTALL) $$f $(DESTDIR)$(MANDIR)/ipsec_$$f || exit 1 ; \
116 + ../utils/manlink $(DESTDIR)$(MANDIR) ipsec_$$f ; \
120 diff -durN freeswan-1.3.orig/libdes/Makefile freeswan-1.3/libdes/Makefile
121 --- freeswan-1.3.orig/libdes/Makefile Thu Nov 25 18:04:25 1999
122 +++ freeswan-1.3/libdes/Makefile Tue Apr 25 11:44:45 2000
126 #CFLAG= -O4 -funroll-loops -fomit-frame-pointer
127 -CFLAG= -O3 -fomit-frame-pointer
128 +CFLAG= $(OPT_FLAGS) -fomit-frame-pointer
130 CFLAGS=$(OPTS) $(CFLAG)
133 #DES_ENC=asm/dx86-sol.o asm/yx86-sol.o # solaris format x86
134 #DES_ENC=asm/dx86bsdi.o asm/yx86basi.o # bsdi format x86
136 -LIBDIR=/usr/local/lib
137 -BINDIR=/usr/local/bin
138 -INCDIR=/usr/local/include
139 -MANDIR=/usr/local/man
147 @@ -231,20 +231,16 @@
148 chmod 644 $(INSTALLTOP)/include/des.h; \
150 echo Standalone install; \
151 - cp $(DLIB) $(LIBDIR)/$(DLIB); \
152 + cp $(DLIB) $(DESTDIR)$(LIBDIR)/$(DLIB); \
153 if test -s /bin/ranlib; then \
154 - /bin/ranlib $(LIBDIR)/$(DLIB); \
155 + /bin/ranlib $(DESTDIR)$(LIBDIR)/$(DLIB); \
157 if test -s /usr/bin/ranlib; then \
158 - /usr/bin/ranlib $(LIBDIR)/$(DLIB); \
159 + /usr/bin/ranlib $(DESTDIR)$(LIBDIR)/$(DLIB); \
162 - chmod 644 $(LIBDIR)/$(DLIB); \
163 - cp des_crypt.man $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \
164 - chmod 644 $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \
165 - cp des.man $(MANDIR)/man$(MAN1)/des.$(MAN1); \
166 - chmod 644 $(MANDIR)/man$(MAN1)/des.$(MAN1); \
167 - cp des.h $(INCDIR)/des.h; \
168 - chmod 644 $(INCDIR)/des.h; \
169 + cp des_crypt.man $(DESTDIR)$(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \
170 + cp des.man $(DESTDIR)$(MANDIR)/man$(MAN1)/des.$(MAN1); \
171 + cp des.h $(DESTDIR)$(INCDIR)/des.h; \
173 # DO NOT DELETE THIS LINE -- make depend depends on it.
174 diff -durN freeswan-1.3.orig/pluto/Makefile freeswan-1.3/pluto/Makefile
175 --- freeswan-1.3.orig/pluto/Makefile Fri Dec 17 03:42:19 1999
176 +++ freeswan-1.3/pluto/Makefile Tue Apr 25 11:45:57 2000
180 # directory in which to install programs
181 -BINDIR=/usr/local/lib/ipsec
182 +BINDIR=/usr/lib/ipsec
184 # directory in which to install man pages
185 -MANTREE=/usr/local/man
186 +MANTREE=/usr/share/man
187 FMANDIR=$(MANTREE)/man5
188 PMANDIR=$(MANTREE)/man8
193 # -O on Linux makes gcc coredump when compiling sha1.c
194 -CFLAGS = -g -Wall -W -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast \
195 +CFLAGS = $(OPT_FLAGS) -Wall -W -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast \
196 -Wcast-qual -Wmissing-declarations -Wwrite-strings -Wstrict-prototypes
198 # where to find klips headers and FreeS/WAN headers
201 CPPFLAGS = $(HDRDIRS) $(BYTE_ORDER) \
202 -DPLUTO -DKLIPS -DROAD_WARRIOR_FUDGE -DDODGE_DH_MISSING_ZERO_BUG \
204 + -DDEBUG -DGCC_LINT -DSHARED_SECRETS_FILE='"/etc/freeswan/ipsec.secrets"'
206 ALLFLAGS = $(CPPFLAGS) $(CFLAGS)
208 @@ -142,21 +142,21 @@
209 OBJSPLUTO = connections.o constants.o cookie.o crypto.o defs.o log.o \
210 state.o main.o server.o timer.o id.o ipsec_doi.o kernel.o \
211 kernel_comm.o demux.o packet.o preshared.o rnd.o spdb.o \
212 - sha1.o md5.o $(OBJSGCRYPT) $(LIBDESLITE) $(LIBGMP) $(FREESWANLIB)
213 + sha1.o md5.o $(OBJSGCRYPT) $(LIBDESLITE) $(FREESWANLIB)
215 OBJSWHACK = whack.o $(FREESWANLIB)
217 all: $(BINNAMEPLUTO) $(BINNAMEWHACK)
220 - $(INSTALL) $(BINNAMEPLUTO) $(BINNAMEWHACK) $(BINDIR)
221 - $(INSTALL) pluto.8 $(PMANDIR)/ipsec_pluto.8
222 - ../utils/manlink $(PMANDIR) ipsec_pluto.8
223 - $(INSTALL) ipsec.secrets.5 $(FMANDIR)
224 - ../utils/manlink $(FMANDIR) ipsec.secrets.5
225 + $(INSTALL) $(BINNAMEPLUTO) $(BINNAMEWHACK) $(DESTDIR)$(BINDIR)
226 + $(INSTALL) pluto.8 $(DESTDIR)$(PMANDIR)/ipsec_pluto.8
227 + ../utils/manlink $(DESTDIR)$(PMANDIR) ipsec_pluto.8
228 + $(INSTALL) ipsec.secrets.5 $(DESTDIR)$(FMANDIR)
229 + ../utils/manlink $(DESTDIR)$(FMANDIR) ipsec.secrets.5
231 $(BINNAMEPLUTO): $(OBJSPLUTO)
232 - $(CC) -o $(BINNAMEPLUTO) $(LDFLAGS) $(OBJSPLUTO) $(LIBSPLUTO)
233 + $(CC) -o $(BINNAMEPLUTO) $(LDFLAGS) $(OBJSPLUTO) $(LIBSPLUTO) -lgmp
235 $(BINNAMEWHACK): $(OBJSWHACK)
236 $(CC) -o $(BINNAMEWHACK) $(OBJSWHACK) $(LIBSWHACK)
237 diff -durN freeswan-1.3.orig/utils/Makefile freeswan-1.3/utils/Makefile
238 --- freeswan-1.3.orig/utils/Makefile Tue Feb 8 22:22:30 2000
239 +++ freeswan-1.3/utils/Makefile Tue Apr 25 11:44:45 2000
243 # pathnames, subject to overrides from main Makefile
244 -PUBDIR=/usr/local/sbin
245 -PRIVDIR=/usr/local/lib/ipsec
246 -FINALPRIVDIR=/usr/local/lib/ipsec
248 +PRIVDIR=/usr/lib/ipsec
249 +FINALPRIVDIR=/usr/lib/ipsec
250 RCDIR=/etc/rc.d/init.d
252 -MANTREE=/usr/local/man
253 +CONFDIR=/etc/freeswan
254 +MANTREE=/usr/share/man
256 FMANDIR=$(MANTREE)/man5
257 CMANDIR=$(MANTREE)/man8
259 $(CC) $(CFLAGS) ranbits.o $(LIB) -o $@
261 rsasigkey: rsasigkey.o
262 - $(CC) $(CFLAGS) rsasigkey.o $(LIB) ../lib/libgmp.a -o $@
263 + $(CC) $(CFLAGS) rsasigkey.o $(LIB) -lgmp -o $@
266 $(CC) $(CFLAGS) man_xref.o $(LIB) -o $@
268 ./randomize conf.proto | egrep -v RCSI >$@
270 install: $(PUBS) $(PRIVS) $(MANS) $(GENDFILES)
271 - mkdir -p $(PUBDIR) $(PRIVDIR) $(FMANDIR) $(CMANDIR)
272 - $(INSTALL) $(PUBS) $(PUBDIR)
273 - $(INSTALL) $(PRIVS) $(PRIVDIR)
274 - $(INSTALL) $(PUB) ipsec.conf.5 $(FMANDIR)
275 - $(INSTALL) $(PUB) $(PLAIN_MANS) $(CMANDIR)
276 + mkdir -p $(DESTDIR)$(PUBDIR) $(DESTDIR)$(PRIVDIR) $(DESTDIR)$(FMANDIR) $(DESTDIR)$(CMANDIR)
277 + $(INSTALL) $(PUBS) $(DESTDIR)$(PUBDIR)
278 + $(INSTALL) $(PRIVS) $(DESTDIR)$(PRIVDIR)
279 + $(INSTALL) $(PUB) ipsec.conf.5 $(DESTDIR)$(FMANDIR)
280 + $(INSTALL) $(PUB) $(PLAIN_MANS) $(DESTDIR)$(CMANDIR)
281 for f in $(IPSEC_CMANS) ; \
283 - $(INSTALL) $(PUB) $$f $(CMANDIR)/ipsec_$$f || exit 1 ; \
284 - ./manlink $(CMANDIR) ipsec_$$f ; \
285 + $(INSTALL) $(PUB) $$f $(DESTDIR)$(CMANDIR)/ipsec_$$f || exit 1 ; \
286 + ./manlink $(DESTDIR)$(CMANDIR) ipsec_$$f ; \
288 - test -f $(CONFDIR)/ipsec.secrets || \
289 - $(INSTALL) $(PRIV) secrets.eg $(CONFDIR)/ipsec.secrets
290 - test -f $(CONFDIR)/ipsec.conf || \
291 - $(INSTALL) $(PUB) conf.eg $(CONFDIR)/ipsec.conf
292 + test -f $(DESTDIR)$(CONFDIR)/ipsec.secrets || \
293 + $(INSTALL) $(PRIV) secrets.eg $(DESTDIR)$(CONFDIR)/ipsec.secrets
294 + test -f $(DESTDIR)$(CONFDIR)/ipsec.conf || \
295 + $(INSTALL) $(PUB) conf.eg $(DESTDIR)$(CONFDIR)/ipsec.conf
296 # main copy must go in RCDIR, PRIVDIR may not be mounted at boot time
297 - $(INSTALL) setup $(RCDIR)/ipsec
298 - rm -f $(PRIVDIR)/setup
299 - ln -s $(RCDIR)/ipsec $(PRIVDIR)/setup
300 - if which chkconfig >/dev/null 2>&1 ; \
301 - then chkconfig --add ipsec ; \
302 - else $(MAKE) setup4 ; \
305 -setup4: $(RCDIR)/ipsec
306 - # fallback rc install -- on in run states 2345, off in 016
307 - -cd $(RCDIR)/../rc0.d ; ln -s ../init.d/ipsec K35ipsec
308 - -cd $(RCDIR)/../rc1.d ; ln -s ../init.d/ipsec K35ipsec
309 - -cd $(RCDIR)/../rc2.d ; ln -s ../init.d/ipsec S35ipsec
310 - -cd $(RCDIR)/../rc3.d ; ln -s ../init.d/ipsec S35ipsec
311 - -cd $(RCDIR)/../rc4.d ; ln -s ../init.d/ipsec S35ipsec
312 - -cd $(RCDIR)/../rc5.d ; ln -s ../init.d/ipsec S35ipsec
313 - -cd $(RCDIR)/../rc6.d ; ln -s ../init.d/ipsec K35ipsec
314 + $(INSTALL) setup $(DESTDIR)$(RCDIR)/ipsec
315 + rm -f $(DESTDIR)$(PRIVDIR)/setup
316 + ln -s $(RCDIR)/ipsec $(DESTDIR)$(PRIVDIR)/setup
319 rm -f *.o $(BINS) $(GENDFILES) $(LOCALS)