From 75ae1d98902671bf9c1a48ee371c1fa313e0a953 Mon Sep 17 00:00:00 2001 From: skidder Date: Thu, 29 Jan 2004 06:32:09 +0000 Subject: [PATCH] Fix some packaging issues with non-x86 Linux ports. Prepare AMD64 port for public testing --- builds/install/arch-specific/linux/Makefile.in | 18 ++++++++++++------ .../linux/classic/makeInstallImage.sh.in | 10 +++++----- .../linux/classic/postinstall.sh.in | 10 +++++----- .../linux/classic/preinstall.sh.in | 4 ++-- .../linux/super/makeInstallImage.sh.in | 8 ++++---- .../arch-specific/linux/super/preinstall.sh.in | 2 +- .../arch-specific/linux/super/rpmfiles.txt.in | 8 ++++---- configure.in | 8 +++++++- 8 files changed, 40 insertions(+), 28 deletions(-) diff --git a/builds/install/arch-specific/linux/Makefile.in b/builds/install/arch-specific/linux/Makefile.in index 57d0a01c89..3d535ad6a8 100644 --- a/builds/install/arch-specific/linux/Makefile.in +++ b/builds/install/arch-specific/linux/Makefile.in @@ -27,7 +27,7 @@ # Contributor(s): # # -# $Id: Makefile.in,v 1.2 2003-12-30 02:06:13 skidder Exp $ +# $Id: Makefile.in,v 1.3 2004-01-29 06:32:01 skidder Exp $ # ROOT=.. @@ -49,7 +49,7 @@ export -n FIREBIRD export -n INTERBASE .PHONY: install dist packages tarfile rpmfile -.PHONY: buildTarDir buildImageDir +.PHONY: buildTarDir buildImageDir buildRoot buildDebugInfo # Some of these targets are run from the root tree of the build. # those need to know where the install subdirectory is kept. @@ -130,8 +130,10 @@ $(DebugFile) : buildImageDir # # 28-Dec-2003. Nickolay Samofatov -buildImageDir: +buildRoot: (cd $(GEN_ROOT); ./install/makeInstallImage.sh) + +buildDebugInfo: buildRoot mkdir -p $(GEN_ROOT)/$(DebugDir) for x in `(cd $(GEN_ROOT)/buildroot; find)`; do \ FIL=$(GEN_ROOT)/buildroot/$$x; \ @@ -154,11 +156,15 @@ buildImageDir: fi; \ done # Work around GDB 6.0 bug - mkdir -p $(GEN_ROOT)/$(DebugDir)/usr/lib/.debug + mkdir -p $(GEN_ROOT)/$(DebugDir)@libdir@/.debug for x in `ls $(GEN_ROOT)/$(DebugDir)@prefix@/lib/.debug`; do \ - ln -f -s @prefix@/lib/.debug/`basename $$x` $(GEN_ROOT)/$(DebugDir)/usr/lib/.debug; \ + ln -f -s @prefix@/lib/.debug/`basename $$x` $(GEN_ROOT)/$(DebugDir)@libdir@/.debug; \ done +# Use this line if you don't want to use separate debug info +#buildImageDir: buildRoot +buildImageDir: buildDebugInfo + buildTarDir: buildImageDir mkdir -p $(GEN_ROOT)/$(TarDir) @@ -179,7 +185,7 @@ rpmfile: $(RPMFile) $(RPMFile) : $(GEN_ROOT)/install/rpmscript buildImageDir rpmbuild --define='_topdir @BUILD_ROOT_DIR@/gen/RPM' -bb $(GEN_ROOT)/install/rpmscript # rpmbuild -bb --buildroot `pwd`/buildroot $(GEN_ROOT)/rpmscript - cp @BUILD_ROOT_DIR@/gen/RPM/RPMS/i686/$(RPMFile) $(GEN_ROOT) + cp @BUILD_ROOT_DIR@/gen/RPM/RPMS/@CPU_TYPE@/$(RPMFile) $(GEN_ROOT) .PHONY: $(GEN_ROOT)/install/rpmscript diff --git a/builds/install/arch-specific/linux/classic/makeInstallImage.sh.in b/builds/install/arch-specific/linux/classic/makeInstallImage.sh.in index 734e4eec56..ec1ad466df 100644 --- a/builds/install/arch-specific/linux/classic/makeInstallImage.sh.in +++ b/builds/install/arch-specific/linux/classic/makeInstallImage.sh.in @@ -30,7 +30,7 @@ # Contributor(s): # # -# $Id: makeInstallImage.sh.in,v 1.4 2003-10-28 17:58:10 skidder Exp $ +# $Id: makeInstallImage.sh.in,v 1.5 2004-01-29 06:32:06 skidder Exp $ # # Script to copy install files from the build/transport area @@ -99,7 +99,7 @@ copyFiles() { # mkdir $TargetDir/var/adm/fillup-templates # mkdir -p $TargetDir/usr/sbin - mkdir -p $TargetDir/usr/lib + mkdir -p $TargetDir@libdir@ mkdir -p $TargetDir/usr/include cp -f $BuiltFBDir/bin/fb_inet_server $DestDir/bin/fb_inet_server @@ -188,14 +188,14 @@ copyFiles() { echo "#" >> $DestDir/aliases.conf -# Create links from /usr/lib to install area. +# Create links from @libdir@ to install area. origDir=`pwd` cd $DestDir for i in lib/libfb*.so*; do ln -s ../../$FBRootDir/$i $origDir/$TargetDir/usr/$i; done cd $origDir - #ln -s ../../$FBRootDir/lib/libgds.a $TargetDir/usr/lib/libgds.a - ln -s ../../$FBRootDir/lib/libib_util.so $TargetDir/usr/lib/libib_util.so + #ln -s ../../$FBRootDir/lib/libgds.a $TargetDir@libdir@/libgds.a + ln -s ../../$FBRootDir/lib/libib_util.so $TargetDir@libdir@/libib_util.so diff --git a/builds/install/arch-specific/linux/classic/postinstall.sh.in b/builds/install/arch-specific/linux/classic/postinstall.sh.in index 62662ac472..931be284e6 100644 --- a/builds/install/arch-specific/linux/classic/postinstall.sh.in +++ b/builds/install/arch-specific/linux/classic/postinstall.sh.in @@ -31,7 +31,7 @@ # Contributor(s): # # -# $Id: postinstall.sh.in,v 1.6 2003-10-31 16:42:48 skidder Exp $ +# $Id: postinstall.sh.in,v 1.7 2004-01-29 06:32:06 skidder Exp $ # # The post install script for Firebird Classic @@ -625,14 +625,14 @@ createLinksForBackCompatibility() { # to ensure it loads the fb equivalent. Eventually these should be # optional and in a seperate rpm install. MOD 7-Nov-2002. - if [ ! -e /usr/lib/libgds.so ] + if [ ! -e @libdir@/libgds.so ] then - ln -s $FBRootDir/lib/libfbembed.so /usr/lib/libgds.so + ln -s $FBRootDir/lib/libfbembed.so @libdir@/libgds.so fi - if [ ! -e /usr/lib/libgds.so.0 ] + if [ ! -e @libdir@/libgds.so.0 ] then - ln -s $FBRootDir/lib/libfbembed.so /usr/lib/libgds.so.0 + ln -s $FBRootDir/lib/libfbembed.so @libdir@/libgds.so.0 fi diff --git a/builds/install/arch-specific/linux/classic/preinstall.sh.in b/builds/install/arch-specific/linux/classic/preinstall.sh.in index 5242e3731c..8ac7f5d0c2 100644 --- a/builds/install/arch-specific/linux/classic/preinstall.sh.in +++ b/builds/install/arch-specific/linux/classic/preinstall.sh.in @@ -31,7 +31,7 @@ # Contributor(s): # # -# $Id: preinstall.sh.in,v 1.2 2003-10-28 17:58:10 skidder Exp $ +# $Id: preinstall.sh.in,v 1.3 2004-01-29 06:32:06 skidder Exp $ # @@ -211,7 +211,7 @@ archivePriorInstallSystemFilesX() { echo "--- Warning ----------------------------------------------" echo " The installation target directory: $FBRootDir" echo " Already contains a prior installation of Firebird." - echo " This and files found in /usr/include and /usr/lib will be" + echo " This and files found in /usr/include and @libdir@ will be" echo " archived in the file : ${ArchiveMainFile}" echo "" diff --git a/builds/install/arch-specific/linux/super/makeInstallImage.sh.in b/builds/install/arch-specific/linux/super/makeInstallImage.sh.in index 7db7118bcb..33de106853 100644 --- a/builds/install/arch-specific/linux/super/makeInstallImage.sh.in +++ b/builds/install/arch-specific/linux/super/makeInstallImage.sh.in @@ -30,7 +30,7 @@ # Contributor(s): # # -# $Id: makeInstallImage.sh.in,v 1.5 2003-10-27 18:00:44 alexpeshkoff Exp $ +# $Id: makeInstallImage.sh.in,v 1.6 2004-01-29 06:32:09 skidder Exp $ # # Script to copy install files from the build/transport area @@ -93,7 +93,7 @@ copyFiles() { mkdir $DestDir/UDF mkdir $DestDir/misc - mkdir -p $TargetDir/usr/lib + mkdir -p $TargetDir@libdir@ mkdir -p $TargetDir/usr/include # mkdir $TargetDir/var @@ -173,12 +173,12 @@ copyFiles() { echo "#" >> $DestDir/aliases.conf -# Create links from /usr/lib to install area. +# Create links from @libdir@ to install area. origDir=`pwd` cd $DestDir for i in lib/libfb*.so*; do ln -s ../../$FBRootDir/$i $origDir/$TargetDir/usr/$i; done cd $origDir - ln -s ../../$FBRootDir/lib/libib_util.so $TargetDir/usr/lib/libib_util.so + ln -s ../../$FBRootDir/lib/libib_util.so $TargetDir@libdir@/libib_util.so # link include files to /usr/include diff --git a/builds/install/arch-specific/linux/super/preinstall.sh.in b/builds/install/arch-specific/linux/super/preinstall.sh.in index e47526f8f5..56dfbc4c7c 100644 --- a/builds/install/arch-specific/linux/super/preinstall.sh.in +++ b/builds/install/arch-specific/linux/super/preinstall.sh.in @@ -137,7 +137,7 @@ archivePriorInstallSystemFiles() { echo "--- Warning ----------------------------------------------" echo " The installation target directory: $IBRootDir" echo " Already contains a prior installation of InterBase/Firebird." - echo " This and files found in /usr/include and /usr/lib will be" + echo " This and files found in /usr/include and @libdir@ will be" echo " archived in the file : ${ArchiveMainFile}" echo "" diff --git a/builds/install/arch-specific/linux/super/rpmfiles.txt.in b/builds/install/arch-specific/linux/super/rpmfiles.txt.in index 46c9959cc4..cbd2ee8072 100644 --- a/builds/install/arch-specific/linux/super/rpmfiles.txt.in +++ b/builds/install/arch-specific/linux/super/rpmfiles.txt.in @@ -1,9 +1,9 @@ @prefix@ -/usr/lib/libfbclient.so.1.5.0 -/usr/lib/libfbclient.so.1 -/usr/lib/libfbclient.so -/usr/lib/libib_util.so +@libdir@/libfbclient.so.2.0.0 +@libdir@/libfbclient.so.1 +@libdir@/libfbclient.so +@libdir@/libib_util.so /usr/include/gds.h /usr/include/ibase.h diff --git a/configure.in b/configure.in index 9689b826f2..9e4045530d 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.190 2004-01-12 04:58:09 skidder Exp $ +dnl $Id: configure.in,v 1.191 2004-01-29 06:31:49 skidder Exp $ dnl ############################# INITIALISATION ############################### @@ -30,6 +30,10 @@ dnl SHRLIB_EXT : suffix of shared library files RAW_DEVICES_FLG=Y INSTALL_PREFIX="" + +dnl Use /usr/lib for library links on most platforms except some 64-bit ones +libdir=/usr/lib + case "$target" in *-*-darwin*) MAKEFILE_PREFIX=darwin @@ -57,6 +61,8 @@ case "$target" in LOCK_MANAGER_FLG=Y EDITLINE_FLG=Y SHRLIB_EXT=so + libdir=/usr/lib64 + CPU_TYPE=amd64 ;; sparc*-*-linux-*)