File openswan_01_build-paths.dif of Package openswan
diff -Nur openswan-2.6.37-orig//Makefile.inc openswan-2.6.37/Makefile.inc
--- openswan-2.6.37-orig//Makefile.inc 2011-12-09 09:56:42.000000000 +0100
+++ openswan-2.6.37/Makefile.inc 2011-12-09 10:03:03.000000000 +0100
@@ -54,8 +54,10 @@
# it; DESTDIR itself should never appear in any other Makefile.
DESTDIR?=
+LIBD=lib
+
# "local" part of tree, used in building other pathnames
-INC_USRLOCAL=/usr/local
+INC_USRLOCAL=/usr
# 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*
@@ -64,7 +66,7 @@
# BINDIR is where sub-commands get put, FINALBINDIR is where the "ipsec"
# command will look for them when it is run. Also called LIBEXECDIR.
-FINALLIBEXECDIR?=$(INC_USRLOCAL)/libexec/ipsec
+FINALLIBEXECDIR?=$(INC_USRLOCAL)/$(LIBD)/ipsec
LIBEXECDIR=$(DESTDIR)$(FINALBINDIR)
FINALBINDIR=${FINALLIBEXECDIR}
@@ -82,7 +84,7 @@
# where the appropriate manpage tree is located
# location within INC_USRLOCAL
-INC_MANDIR=man
+INC_MANDIR=share/man
# the full pathname
MANTREE=$(DESTDIR)$(INC_USRLOCAL)/$(INC_MANDIR)
# all relevant subdirectories of MANTREE
@@ -99,7 +101,7 @@
CONFDDIR?=$(DESTDIR)$(FINALCONFDDIR)
# sample configuration files go into
-INC_DOCDIR?=share/doc
+INC_DOCDIR?=share/doc/packages
FINALEXAMPLECONFDIR?=${INC_USRLOCAL}/${INC_DOCDIR}/openswan
EXAMPLECONFDIR?=${DESTDIR}${FINALEXAMPLECONFDIR}
@@ -117,9 +119,9 @@
# will finally go: the first directory in INC_RCDIRS which exists gets them.
# If none of those exists (or INC_RCDIRS is empty), INC_RCDEFAULT gets them.
# With a non-null DESTDIR, INC_RCDEFAULT will be used unless one of the
-# INC_RCDIRS directories has been pre-created under DESTDIR.
-INC_RCDIRS?=/etc/rc.d/init.d /etc/rc.d /etc/init.d /sbin/init.d
-INC_RCDEFAULT?=/etc/rc.d/init.d
+# INC_RCDIRS directories has been pre-created under DESTDIR.
+INC_RCDIRS?=/etc/init.d /etc/rc.d/init.d /etc/rc.d /sbin/init.d
+INC_RCDEFAULT?=/etc/init.d
# RCDIR is where boot/shutdown scripts go; FINALRCDIR is where they think
# will finally be (so utils/Makefile can create a symlink in BINDIR to the
diff -Nur openswan-2.6.37-orig//Makefile.top openswan-2.6.37/Makefile.top
--- openswan-2.6.37-orig//Makefile.top 2011-10-28 23:11:53.000000000 +0200
+++ openswan-2.6.37/Makefile.top 2011-12-09 10:04:45.000000000 +0100
@@ -41,7 +41,7 @@
install_file_list:
@for d in $(SUBDIRS) ; \
do \
- (cd $$d && $(MAKE) --no-print-directory srcdir=${OPENSWANSRCDIR}/$$d/ OPENSWANSRCDIR=${OPENSWANSRCDIR} install_file_list ) || exit 1; \
+ (cd $$d && $(MAKE) --no-print-directory LIBD=$(LIBD) srcdir=${OPENSWANSRCDIR}/$$d/ OPENSWANSRCDIR=${OPENSWANSRCDIR} install_file_list ) || exit 1; \
done;
# uninstall, as much as possible
@@ -86,13 +86,14 @@
ifneq ($(strip(${REGRESSRESULTS})),)
mkdir -p ${REGRESSRESULTS}
endif
- @for d in $(SUBDIRS); do (cd $$d && $(MAKE) DESTDIR=${DESTDIR} checkprograms || exit 1); done
+ @for d in $(SUBDIRS); do (cd $$d && $(MAKE) DESTDIR=${DESTDIR} LIBD=$(LIBD) checkprograms || exit 1); done
+
@for d in $(SUBDIRS); \
do \
echo ===================================; \
echo Now making check in $$d; \
echo ===================================; \
- ${MAKE} -C $$d DESTDIR=${DESTDIR} check ;\
+ ${MAKE} -C $$d DESTDIR=${DESTDIR} LIBD=$(LIBD) check ;\
done
ifneq ($(strip(${REGRESSRESULTS})),)
-perl testing/utils/regress-summarize-results.pl ${REGRESSRESULTS}