[packages/Firebird] Rel 3; try to improve fb_config for x32

arekm arekm at pld-linux.org
Fri Nov 22 19:36:23 CET 2024


commit b11108a6ee9f0a834c2800b281f09a09356c1997
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Nov 22 19:16:57 2024 +0100

    Rel 3; try to improve fb_config for x32

 Firebird.spec |  2 +-
 fb_config     | 28 ++++++++++++++++++++++------
 2 files changed, 23 insertions(+), 7 deletions(-)
---
diff --git a/Firebird.spec b/Firebird.spec
index 3c25cf7..5944976 100644
--- a/Firebird.spec
+++ b/Firebird.spec
@@ -16,7 +16,7 @@ Summary(de.UTF-8):	Firebird - relationalen Open-Source- Datenbankmanagementsyste
 Summary(pl.UTF-8):	Firebird - serwer baz danych SQL oraz narzędzia klienckie
 Name:		Firebird
 Version:	5.0.0.1306
-Release:	2
+Release:	3
 License:	Interbase Public License 1.0, Initial Developer's Public License 1.0
 Group:		Applications/Databases
 Source0:	https://github.com/FirebirdSQL/firebird/releases/download/v5.0.0/%{name}-%{version}-0-source.tar.xz
diff --git a/fb_config b/fb_config
index 34254de..4029ea7 100755
--- a/fb_config
+++ b/fb_config
@@ -3,19 +3,35 @@
 set -e
 ARCH=$(uname -m)
 
+LIB_DIRS=
+
 case "$ARCH" in
     x86_64 | sparc64 | s390x | ppc64 | aarch64)
-        LIB_DIR=/usr/lib64/interbase/bin
-        SECONDARY_LIB_DIR=/usr/lib/interbase/bin
+	if [ "$(getconf LONG_BIT)" -eq "32" ]; then
+	    LIB_DIRS="$LIB_DIRS /usr/libx32/interbase/bin"
+	else
+	    LIB_DIRS="$LIB_DIRS /usr/lib64/interbase/bin"
+	fi
         ;;
     *)
-        LIB_DIR=/usr/lib/interbase/bin
-        SECONDARY_LIB_DIR=/usr/lib64/interbase/bin
+        LIB_DIRS="$LIB_DIRS /usr/lib/interbase/bin"
         ;;
 esac
 
-if [ ! -x "$LIB_DIR"/fb_config ]; then
-    LIB_DIR=$SECONDARY_LIB_DIR
+# just fallback to all alternatives
+LIB_DIRS="$LIB_DIRS /usr/lib64/interbase/bin /usr/libx32/interbase/bin /usr/lib/interbase/bin"
+
+LIB_DIR=""
+for dir in $LIB_DIRS; do
+    if [ -x "${dir}/fb_config" ]; then
+	LIB_DIR="$dir"
+	break
+    fi
+done
+
+if [ -z "$LIB_DIR" ]; then
+    echo "$0: Unable to find fb_config" >&2
+    exit 1
 fi
 
 exec "$LIB_DIR"/fb_config "$@"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/Firebird.git/commitdiff/b11108a6ee9f0a834c2800b281f09a09356c1997



More information about the pld-cvs-commit mailing list