summaryrefslogtreecommitdiff
path: root/multilib/lib32-db/PKGBUILD
blob: 93be51e473d300f23c179dd892046e44ff4183ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# $Id: PKGBUILD 35318 2010-12-18 21:29:14Z heftig $
# Maintainer: Biru Ionut <biru.ionut at gmail.com>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>

_pkgbasename=db
pkgname=lib32-$_pkgbasename
pkgver=5.1.19
pkgrel=1
pkgdesc="The Berkeley DB embedded database system (32-bit)"
arch=('x86_64')
url="http://www.oracle.com/technology/software/products/berkeley-db/index.html"
license=('custom')
depends=('lib32-gcc-libs' $_pkgbasename)
makedepends=('gcc-multilib')
options=('!libtool')
source=(http://download-uk.oracle.com/berkeley-db/db-${pkgver}.tar.gz)
md5sums=('76fcbfeebfcd09ba0b4d96bfdf8d884d')

build() {
  cd ${srcdir}/$_pkgbasename-${pkgver}/build_unix

  export CC="gcc -m32"
  export CXX="g++ -m32"
  export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"

  ../dist/configure --prefix=/usr --enable-compat185 \
    --enable-shared --enable-static --enable-cxx --enable-dbm \
    --libdir=/usr/lib32  
  make LIBSO_LIBS=-lpthread
}

package() {
  cd ${srcdir}/${_pkgbasename}-${pkgver}/build_unix
  make DESTDIR=${pkgdir} install

  rm -rf "${pkgdir}"/usr/{docs,include,share,bin}
  mkdir -p "$pkgdir/usr/share/licenses"
  ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
}