From 63a6cf4a31d6f270d1c9025e15bdd749bc7e33e3 Mon Sep 17 00:00:00 2001
From: Cecil Hugh Watson <knoppmyth@gmail.com>
Date: Sat, 4 Sep 2010 15:52:11 -0700
Subject: db:Bumped/Updated for LinHES 7.

---
 abs/core-testing/db/PKGBUILD   | 36 +++++++++++++++++++++---------------
 abs/core-testing/db/db.install | 30 +++---------------------------
 2 files changed, 24 insertions(+), 42 deletions(-)

diff --git a/abs/core-testing/db/PKGBUILD b/abs/core-testing/db/PKGBUILD
index e41aeac..cc149a7 100644
--- a/abs/core-testing/db/PKGBUILD
+++ b/abs/core-testing/db/PKGBUILD
@@ -1,27 +1,33 @@
-# $Id: PKGBUILD 3741 2008-06-30 20:07:01Z andyrtr $
-# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# $Id: PKGBUILD 76949 2010-04-09 08:14:30Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: Andreas Radke <andyrtr@archlinux.org>
 
 pkgname=db
-pkgver=4.7.25
-pkgrel=10
+pkgver=4.8.26
+_basever=4.8.26
+pkgrel=2
 pkgdesc="The Berkeley DB embedded database system"
-arch=(i686 x86_64)
-license=('custom')
+arch=('i686' 'x86_64')
 url="http://www.oracle.com/technology/software/products/berkeley-db/index.html"
-groups=('base')
-depends=('gcc-libs' 'coreutils')
-options=('!libtool')
-source=(http://download-uk.oracle.com/berkeley-db/db-$pkgver.tar.gz)
-install=(db.install)
-md5sums=('ec2b87e833779681a0c3a814aa71359e')
+license=('custom')
+depends=('gcc-libs' 'sh')
+conflicts=('db4')
+options=('!libtool' 'force')
+install=db.install
+source=(http://download-uk.oracle.com/berkeley-db/db-${_basever}.tar.gz)
+md5sums=('3476bac9ec0f3c40729c8a404151d5e3')
 
 build() {
-  cd ${srcdir}/$pkgname-$pkgver/build_unix
+  cd ${srcdir}/$pkgname-${_basever}/build_unix
   ../dist/configure --prefix=/usr --enable-compat185 \
     --enable-shared --enable-static --enable-cxx
   make LIBSO_LIBS=-lpthread || return 1
+}
+
+package() {
+  cd ${srcdir}/$pkgname-${_basever}/build_unix
   make DESTDIR=${pkgdir} install
   rm -rf ${pkgdir}/usr/docs
-  mkdir -p ${pkgdir}/usr/share/licenses/${pkgname}
-  install -m644 ${srcdir}/${pkgname}-${pkgver}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+  install -Dm644 ${srcdir}/${pkgname}-${_basever}/LICENSE \
+    ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
 }
diff --git a/abs/core-testing/db/db.install b/abs/core-testing/db/db.install
index 7c97ea0..eeda804 100644
--- a/abs/core-testing/db/db.install
+++ b/abs/core-testing/db/db.install
@@ -1,29 +1,5 @@
-# This is a default template for a post-install scriptlet.  You can
-# remove any functions you don't need (and this header).
-
-# arg 1:  the new package version
-# arg 2:  the old package version
-pre_upgrade() {
-  /bin/true
-}
-
-# arg 1:  the new package version
-# arg 2:  the old package version
 post_upgrade() {
-  echo "ATTENTION DB PACKAGE:"
-  echo  "Please consider to run db_upgrade on Berkeley DB databases with a major db version number update."
-}
-
-# arg 1:  the old package version
-pre_remove() {
-  /bin/true
-}
-
-# arg 1:  the old package version
-post_remove() {
-  /bin/true
+  if [ "$(vercmp $2 4.8)" -lt 0 ]; then
+    echo " >> Major version update. Consider running db_upgrade on Berkeley DB databases."
+  fi
 }
-
-op=$1
-shift
-$op $*
\ No newline at end of file
-- 
cgit v0.12

