[4/5] berkeley: Re-add 4.4 as compat package

Message ID 20200424102812.16820-4-michael.tremer@ipfire.org
State Accepted
Commit 77ed195189a9dfe5d846f7e939499cb18538538a
Headers
Series [1/5] BerkeleyDB: Update to 0.63 |

Commit Message

Michael Tremer April 24, 2020, 10:28 a.m. UTC
  We have loads of packages linked against the older
version which is difficult to update.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 config/rootfiles/common/berkeley-compat |  4 ++
 lfs/berkeley-compat                     | 83 +++++++++++++++++++++++++
 make.sh                                 |  1 +
 3 files changed, 88 insertions(+)
 create mode 100644 config/rootfiles/common/berkeley-compat
 create mode 100644 lfs/berkeley-compat
  

Patch

diff --git a/config/rootfiles/common/berkeley-compat b/config/rootfiles/common/berkeley-compat
new file mode 100644
index 000000000..1b149915c
--- /dev/null
+++ b/config/rootfiles/common/berkeley-compat
@@ -0,0 +1,4 @@ 
+usr/lib/libdb-4.4.so
+usr/lib/libdb-4.so
+usr/lib/libdb_cxx-4.4.so
+usr/lib/libdb_cxx-4.so
diff --git a/lfs/berkeley-compat b/lfs/berkeley-compat
new file mode 100644
index 000000000..9e148e53a
--- /dev/null
+++ b/lfs/berkeley-compat
@@ -0,0 +1,83 @@ 
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007-2018  IPFire Team  <info@ipfire.org>                     #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER        = 4.4.20
+
+THISAPP    = db-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_MD5 = d84dff288a19186b136b0daf7067ade3
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+md5 : $(subst %,%_MD5,$(objects))
+
+###############################################################################
+# Downloading, checking, md5sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+	@$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+	@$(LOAD)
+
+$(subst %,%_MD5,$(objects)) :
+	@$(MD5)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+	@$(PREBUILD)
+	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+	cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/db-4.4.20-fixes-1.patch
+	cd $(DIR_APP)/build_unix && ../dist/configure --prefix=/usr --enable-compat185 --enable-cxx
+	cd $(DIR_APP)/build_unix && make $(MAKETUNING)
+
+	# Install the libraries inly
+	cd $(DIR_APP)/build_unix && install -v -m 755 .libs/{libdb-4.4.so,libdb_cxx-4.4.so} /usr/lib/
+	ln -svf libdb-4.4.so /usr/lib/libdb-4.so
+	ln -svf libdb_cxx-4.4.so /usr/lib/libdb_cxx-4.so
+
+	@rm -rf $(DIR_APP)
+	@$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 636289cd4..9f05ee8ce 100755
--- a/make.sh
+++ b/make.sh
@@ -1084,6 +1084,7 @@  buildbase() {
 	lfsmake2 autoconf
 	lfsmake2 automake
 	lfsmake2 berkeley
+	lfsmake2 berkeley-compat
 	lfsmake2 coreutils
 	lfsmake2 iana-etc
 	lfsmake2 m4