updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / db4.5 / PKGBUILD
blob56791d6f3e80798defc1e5b5e3680aab274beec6
1 # Maintainer: Oleg Smirnov <oleg.smirnov@gmail.com>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
3 pkgname=db4.5
4 pkgver=4.5.20
5 pkgrel=5
6 pkgdesc="The Berkeley DB embedded database system 4.5"
7 arch=('i686' 'x86_64')
8 license=('custom')
9 url="http://www.oracle.com/technology/software/products/berkeley-db/index.html"
10 depends=('gcc-libs')
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')
16 build() {
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
21   cd build_unix
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"
33   for i in *; do
34     mv ${i} db4.5_${i/db_/} || return 1
35   done
36   install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
37   install -m644 "${srcdir}/db-${pkgver}/LICENSE" \
38       "${pkgdir}/usr/share/licenses/${pkgname}/" || return 1