pkgname=db pkgver=5.3.28 pkgrel=8 pkgdesc="The Berkeley DB embedded database system" arch=('x86_64') url="https://www.oracle.com/technology/software/products/berkeley-db/index.html" license=('custom') depends=('gcc-libs' 'sh') options=('!libtool') source=("https://download.oracle.com/berkeley-db/db-${pkgver}.tar.gz" "https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-libs/db/files/db-5.1.29-rename-atomic-compare-exchange.patch") md5sums=('b99454564d5b4479750567031d66fe24' '7a5c4806a7f6cdda557b5d6303e7c489') prepare() { cd ${pkgname}-${pkgver} patch -p1 -i ${srcdir}/db-5.1.29-rename-atomic-compare-exchange.patch } build() { cd ${pkgname}-${pkgver}/build_unix ../dist/configure --prefix=/usr \ --enable-compat185 \ --enable-shared \ --enable-static \ --enable-cxx \ --enable-dbm make LIBSO_LIBS=-lpthread } package() { cd $pkgname-${pkgver}/build_unix make DESTDIR=${pkgdir} install rm -rf ${pkgdir}/usr/docs install -Dm644 ${srcdir}/${pkgname}-${pkgver}/LICENSE \ ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE }