1 # Maintainer: Oleg Smirnov <oleg.smirnov@gmail.com>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
6 pkgdesc="The Berkeley DB embedded database system 4.5"
9 url="http://www.oracle.com/technology/software/products/berkeley-db/index.html"
11 options=('!libtool' '!makeflags')
12 source=(http://download.oracle.com/berkeley-db/db-${pkgver}.tar.gz 'patch.4.5.20.1' 'patch.4.5.20.2')
13 md5sums=('b0f1c777708cb8e9d37fb47e7ed3312d'
14 'a571e239b9041d7990df287cbc59ad6f'
15 'b7a7086a067ba116f5a8464362c9a9a7')
17 cd "${srcdir}/db-${pkgver}"
18 patch -Np0 -i "${srcdir}/patch.4.5.20.1" || return 1
19 patch -Np0 -i "${srcdir}/patch.4.5.20.2" || return 1
22 ../dist/configure --prefix=/usr --enable-compat185 \
23 --enable-shared --disable-static --enable-cxx || return 1
24 make LIBSO_LIBS=-lpthread || return 1
25 make prefix="${pkgdir}/usr" \
26 includedir="${pkgdir}/usr/include/db4.5" install || return 1
28 rm -rf "${pkgdir}/usr/docs"
29 rm -f "${pkgdir}/usr/lib"/libdb{,_cxx}.so
30 rm -f "${pkgdir}/usr/lib"/libdb{,_cxx}-4.so
32 cd "${pkgdir}/usr/bin"
34 mv ${i} db4.5_${i/db_/} || return 1
36 install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
37 install -m644 "${srcdir}/db-${pkgver}/LICENSE" \
38 "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1