diff -ruN freeswan-1.8.orig/Makefile freeswan-1.8/Makefile --- freeswan-1.8.orig/Makefile Thu Nov 30 05:25:05 2000 +++ freeswan-1.8/Makefile Tue Dec 12 19:00:31 2000 @@ -17,24 +17,20 @@ # PUBDIR is where the "ipsec" command goes; beware, many things define PATH # settings which are assumed to include it (or at least, to include *some* # copy of the "ipsec" command). -PUBDIR=$(DESTDIR)/usr/local/sbin +PUBDIR=$(DESTDIR)/usr/sbin # PRIVDIR is where commands get put, REALPRIVDIR is where they think they # will be run from in the end (currently only used by utils/ipsec) -REALPRIVDIR=/usr/local/lib/ipsec +REALPRIVDIR=/usr/lib/ipsec PRIVDIR=$(DESTDIR)$(REALPRIVDIR) # where manpages go -MANTREE=$(DESTDIR)/usr/local/man +MANTREE=$(DESTDIR)/usr/share/man # all relevant manpage subdirectories MANPLACES=man3 man5 man8 # where configuration files go -CONFDIR=$(DESTDIR)/etc +CONFDIR=$(DESTDIR)/etc/freeswan # RCDIR is where boot/shutdown scripts go (first RCDIRS that exists gets it); # REALRCDIR is where they think they will ultimately be (for utils/Makefile) -RCDIRS=/etc/rc.d/init.d /etc/rc.d /etc/init.d /sbin/init.d -REALRCDIR=$(shell for d in $(RCDIRS) ; \ - do if test -d $$d ; \ - then echo $$d ; exit 0 ; \ - fi ; done ; echo /etc/rc.d/init.d ) +REALRCDIR=/etc/rc.d/init.d RCDIR=$(DESTDIR)$(REALRCDIR) # kernel location, and location of kernel patches in the distribution diff -ruN freeswan-1.8.orig/klips/utils/Makefile freeswan-1.8/klips/utils/Makefile --- freeswan-1.8.orig/klips/utils/Makefile Fri Jun 30 08:20:25 2000 +++ freeswan-1.8/klips/utils/Makefile Tue Dec 12 19:01:34 2000 @@ -14,7 +14,7 @@ # RCSID $Id$ CC=gcc -CFLAGS=-O2 -I../net/ipsec -I../../lib -g +CFLAGS=$(OPT_FLAGS) -I../net/ipsec -I../../lib -g CFLAGS+= -Wall #CFLAGS+= -Wconversion @@ -30,8 +30,8 @@ CFLAGS+= -Wbad-function-cast ALL=spi eroute spigrp tncfg klipsdebug -BINDIR=/usr/local/lib/ipsec -MANTREE=/usr/local/man +BINDIR=/usr/lib/ipsec +MANTREE=/usr/share/man MANDIR8=$(MANTREE)/man8 MANDIR5=$(MANTREE)/man5 FREESWANLIB=../../lib/libfreeswan.a diff -ruN freeswan-1.8.orig/lib/Makefile freeswan-1.8/lib/Makefile --- freeswan-1.8.orig/lib/Makefile Thu Oct 26 01:58:57 2000 +++ freeswan-1.8/lib/Makefile Tue Dec 12 19:03:01 2000 @@ -25,7 +25,7 @@ HDRS=freeswan.h internal.h LIB=libfreeswan.a # Original flags -CFLAGS=-O3 -I. +CFLAGS=$(OPT_FLAGS) -I. # Add debugging symbols CFLAGS+= -g CFLAGS+= -Wall @@ -44,7 +44,7 @@ ARFLAGS=crvs EXTHDRS=des.h EXTLIBS=libdes.a -MANTREE=/usr/local/man +MANTREE=/usr/share/man MANDIR=$(MANTREE)/man3 MANS=anyaddr.3 atoaddr.3 atoasr.3 atosa.3 atoul.3 goodmask.3 \ initaddr.3 initsubnet.3 optionsfrom.3 portof.3 rangetosubnet.3 \ @@ -57,11 +57,11 @@ all: $(EXTHDRS) $(LIB) $(EXTLIBS) install: - mkdir -p $(MANDIR) + mkdir -p $(DESTDIR)$(MANDIR) for f in $(MANS) ; \ do \ - $(INSTALL) $$f $(MANDIR)/ipsec_$$f || exit 1 ; \ - ../utils/manlink $(MANDIR) ipsec_$$f ; \ + $(INSTALL) $$f $(DESTDIR)$(MANDIR)/ipsec_$$f || exit 1 ; \ + ../utils/manlink $(DESTDIR)$(MANDIR) ipsec_$$f ; \ done $(LIB): $(OBJS) diff -ruN freeswan-1.8.orig/libdes/Makefile freeswan-1.8/libdes/Makefile --- freeswan-1.8.orig/libdes/Makefile Wed Oct 11 04:12:45 2000 +++ freeswan-1.8/libdes/Makefile Tue Dec 12 19:06:18 2000 @@ -46,9 +46,9 @@ #CC=gcc #CFLAG= -O4 -funroll-loops -fomit-frame-pointer -CFLAG= -O3 -fomit-frame-pointer +CFLAG=-fomit-frame-pointer -CFLAGS=$(OPTS) $(CFLAG) +CFLAGS=$(OPT_FLAGS) $(CFLAG) CPP=$(CC) -E AS=as @@ -59,10 +59,10 @@ #DES_ENC=asm/dx86-sol.o asm/yx86-sol.o # solaris format x86 #DES_ENC=asm/dx86bsdi.o asm/yx86basi.o # bsdi format x86 -LIBDIR=/usr/local/lib -BINDIR=/usr/local/bin -INCDIR=/usr/local/include -MANDIR=/usr/local/man +LIBDIR=/usr/lib +BINDIR=/usr/bin +INCDIR=/usr/include +MANDIR=/usr/share/man MAN1=1 MAN3=3 SHELL=/bin/sh @@ -231,20 +231,16 @@ chmod 644 $(INSTALLTOP)/include/des.h; \ else \ echo Standalone install; \ - cp $(DLIB) $(LIBDIR)/$(DLIB); \ + cp $(DLIB) $(DESTDIR)$(LIBDIR)/$(DLIB); \ if test -s /bin/ranlib; then \ - /bin/ranlib $(LIBDIR)/$(DLIB); \ + /bin/ranlib $(DESTDIR)$(LIBDIR)/$(DLIB); \ else \ if test -s /usr/bin/ranlib; then \ /usr/bin/ranlib $(LIBDIR)/$(DLIB); \ fi; \ fi; \ - chmod 644 $(LIBDIR)/$(DLIB); \ - cp des_crypt.man $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \ - chmod 644 $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \ - cp des.man $(MANDIR)/man$(MAN1)/des.$(MAN1); \ - chmod 644 $(MANDIR)/man$(MAN1)/des.$(MAN1); \ - cp des.h $(INCDIR)/des.h; \ - chmod 644 $(INCDIR)/des.h; \ + cp des_crypt.man $(DESTDIR)$(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \ + cp des.man $(DESTDIR)$(MANDIR)/man$(MAN1)/des.$(MAN1); \ + cp des.h $(DESTDIR)$(INCDIR)/des.h; \ fi # DO NOT DELETE THIS LINE -- make depend depends on it. diff -ruN freeswan-1.8.orig/pluto/Makefile freeswan-1.8/pluto/Makefile --- freeswan-1.8.orig/pluto/Makefile Thu Oct 26 01:58:15 2000 +++ freeswan-1.8/pluto/Makefile Tue Dec 12 19:09:07 2000 @@ -19,10 +19,10 @@ CC = gcc # directory in which to install programs -BINDIR=/usr/local/lib/ipsec +BINDIR=/usr/lib/ipsec # directory in which to install man pages -MANTREE=/usr/local/man +MANTREE=/usr/share/man FMANDIR=$(MANTREE)/man5 PMANDIR=$(MANTREE)/man8 @@ -37,7 +37,7 @@ # -O on Linux makes gcc coredump when compiling sha1.c # -Wundef is nice but RHL5.2 compiler doesn't support it -CFLAGS = -g -Wall -W -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast \ +CFLAGS = $(OPT_FLAGS) -Wall -W -Wmissing-prototypes -Wpointer-arith -Wbad-function-cast \ -Wcast-qual -Wmissing-declarations -Wwrite-strings -Wstrict-prototypes # where to find klips headers and FreeS/WAN headers @@ -76,7 +76,7 @@ CPPFLAGS = $(HDRDIRS) $(BYTE_ORDER) \ -DPLUTO -DKLIPS -DDODGE_DH_MISSING_ZERO_BUG \ - -DDEBUG -DGCC_LINT + -DDEBUG -DGCC_LINT -DSHARED_SECRETS_FILE='"/etc/freeswan/ipsec.secrets"' ALLFLAGS = $(CPPFLAGS) $(CFLAGS) diff -ruN freeswan-1.8.orig/utils/Makefile freeswan-1.8/utils/Makefile --- freeswan-1.8.orig/utils/Makefile Thu Oct 26 01:57:22 2000 +++ freeswan-1.8/utils/Makefile Tue Dec 12 19:10:13 2000 @@ -14,13 +14,13 @@ # RCSID $Id$ # pathnames, subject to overrides from main Makefile -PUBDIR=/usr/local/sbin -PRIVDIR=/usr/local/lib/ipsec -REALPRIVDIR=/usr/local/lib/ipsec +PUBDIR=/usr/sbin +PRIVDIR=/usr/lib/ipsec +REALPRIVDIR=/usr/lib/ipsec RCDIR=/etc/rc.d/init.d REALRCDIR=/etc/rc.d/init.d -CONFDIR=/etc -MANTREE=/usr/local/man +CONFDIR=/etc/freeswan +MANTREE=/usr/share/man FMANDIR=$(MANTREE)/man5 CMANDIR=$(MANTREE)/man8