archrelease: copy trunk to staging-x86_64
[arch-packages.git] / db5.3 / trunk / PKGBUILD
blob5b70c58b49cc96e6592d71658defa62c4438002c
1 # Maintainer: Frederik Schwan <freswa at archlinux dot org>
2 # Contributor: Stéphane Gaudreault <stephane@archlinux.org>
3 # Contributor: Allan McRae <allan@archlinux.org>
4 # Contributor: Andreas Radke <andyrtr@archlinux.org>
6 pkgname=db5.3
7 pkgver=5.3.28
8 pkgrel=3
9 pkgdesc="The Berkeley DB embedded database system v5.3"
10 arch=(x86_64)
11 url='https://www.oracle.com/technology/software/products/berkeley-db/index.html'
12 license=(custom:sleepycat)
13 depends=(gcc-libs sh)
14 source=(
15   https://download.oracle.com/berkeley-db/db-${pkgver}.tar.gz
16   db-5.3.21-memp_stat-upstream-fix.patch
17   db-5.3.21-mutex_leak.patch
18   db-5.3.28-lemon_hash.patch
19   db-5.3.28_cve-2019-2708.patch
20   db-5.3.28-mmap-high-cpu-usage.patch
21   db-5.3.28-atomic_compare_exchange.patch
23 b2sums=('5b77a4ec0945fa96ce6c2b452fb4b029295e037fa64d5ff8dcb3b5e01ee3501fd75d9a73b8f5fa54d8907717d93546fbb5348ee70119e877fa2f17d301ecf50d'
24         'cfbb212c60c0e75c0d8c1cdbee9bcf0be9aec718ab462f779d5b880a4f976de1423279adde20159eef067be95d0d725eaa0cb950d0a8aaae720de78b94299e72'
25         'ba917cf9b69de39337b7141bf145153ae89849921c79b4d2f40734feefe2c0007abcc8c85ed776227875c5102354d8f61069fcee12c7db3b45c4ccabc6993760'
26         '682539a382f4423ad4404ad2aa446356d97485a7883a26d31cc2061611b138f20e39d941c575b8997538c4dd609e3e0343505759bba3b89c669ad1830cac1fbf'
27         'bc72ba9703cdbabbece3480fd36c22fca26f270cc4b8c66f8f19799b5120010dfdf53772a94374e45d38b25bb8a271d29ea84318aa8bc847a88940d52ee22a8f'
28         'bc50b556653a4e33073ed4cbaf716035f0840af2659bb4d6ef900621f92515d9490a698cec70546bd3aededa02b264fcd6e6cba3c4e6412125d2d587094f872d'
29         'c32c5236d5f1c9c112e5c6d7aee8d1d67e4f80c3826020ba71d864649bd12f2402a6d68334cfbf1bc17c920878bf64296d884436608a5b3fb9a27ba1fd4d9c75')
31 # All Patches retrieved from Fedora
32 prepare() {
33   cd db-${pkgver}
34   # memp_stat fix provided by upstream
35   patch -Np1 -i ../db-5.3.21-memp_stat-upstream-fix.patch
36   # fix for mutexes not being released provided by upstream
37   patch -Np1 -i ../db-5.3.21-mutex_leak.patch
38   # fix for overflowing hash variable inside bundled lemon
39   patch -Np1 -i ../db-5.3.28-lemon_hash.patch
40   # cve-2019-2708 fixed by mmuzila
41   patch -Np1 -i ../db-5.3.28_cve-2019-2708.patch
42   # Prevents high CPU usage
43   patch -Np1 -i ../db-5.3.28-mmap-high-cpu-usage.patch
44   # gcc fix
45   patch -Np1 -i ../db-5.3.28-atomic_compare_exchange.patch
49 build() {
50   cd db-${pkgver}/build_unix
51   ../dist/configure \
52     --prefix=/usr \
53     --bindir=/usr/bin/db5.3 \
54     --includedir=/usr/include/db5.3 \
55     --enable-compat185 \
56     --enable-shared \
57     --enable-static \
58     --enable-cxx \
59     --enable-dbm \
60     --enable-stl
61   make LIBSO_LIBS=-lpthread
64 package() {
65   make -C db-${pkgver}/build_unix DESTDIR="${pkgdir}" install
66   install -Dm644 db-${pkgver}/LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
67   rm "${pkgdir}"/usr/lib/libdb.so
68   rm "${pkgdir}"/usr/lib/libdb_cxx.so
69   rm "${pkgdir}"/usr/lib/libdb_stl.so
70   rm -r "${pkgdir}"/usr/docs