87 lines
3.7 KiB
Bash
87 lines
3.7 KiB
Bash
#!/usr/bin/bash
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
|
|
# Website : https://pozol.eu
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
pkgname=db5.3
|
|
pkgver=5.3.28
|
|
pkgrel=02
|
|
pkgdesc="The Berkeley DB embedded database system v5.3"
|
|
arch=(x86_64)
|
|
url='https://www.oracle.com/technology/software/products/berkeley-db/index.html'
|
|
depends=(gcc-libs sh)
|
|
source=(
|
|
https://download.oracle.com/berkeley-db/db-${pkgver}.tar.gz
|
|
db-5.3.21-memp_stat-upstream-fix.patch
|
|
db-5.3.21-mutex_leak.patch
|
|
db-5.3.28-lemon_hash.patch
|
|
db-5.3.28_cve-2019-2708.patch
|
|
db-5.3.28-mmap-high-cpu-usage.patch
|
|
db-5.3.28-atomic_compare_exchange.patch
|
|
)
|
|
|
|
# All Patches retrieved from Fedora
|
|
prepare() {
|
|
cd db-${pkgver}
|
|
# memp_stat fix provided by upstream
|
|
patch -Np1 -i ../db-5.3.21-memp_stat-upstream-fix.patch
|
|
# fix for mutexes not being released provided by upstream
|
|
patch -Np1 -i ../db-5.3.21-mutex_leak.patch
|
|
# fix for overflowing hash variable inside bundled lemon
|
|
patch -Np1 -i ../db-5.3.28-lemon_hash.patch
|
|
# cve-2019-2708 fixed by mmuzila
|
|
patch -Np1 -i ../db-5.3.28_cve-2019-2708.patch
|
|
# Prevents high CPU usage
|
|
patch -Np1 -i ../db-5.3.28-mmap-high-cpu-usage.patch
|
|
# gcc fix
|
|
patch -Np1 -i ../db-5.3.28-atomic_compare_exchange.patch
|
|
}
|
|
|
|
|
|
build() {
|
|
cd db-${pkgver}/build_unix
|
|
../dist/configure \
|
|
--prefix=/usr \
|
|
--bindir=/usr/bin/db5.3 \
|
|
--includedir=/usr/include/db5.3 \
|
|
--enable-compat185 \
|
|
--enable-shared \
|
|
--enable-static \
|
|
--enable-cxx \
|
|
--enable-dbm \
|
|
--enable-stl
|
|
make LIBSO_LIBS=-lpthread
|
|
}
|
|
|
|
package() {
|
|
make -C db-${pkgver}/build_unix DESTDIR="${pkgdir}" install
|
|
install -Dm644 db-${pkgver}/LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
|
|
rm "${pkgdir}"/usr/lib/libdb.so
|
|
rm "${pkgdir}"/usr/lib/libdb_cxx.so
|
|
rm "${pkgdir}"/usr/lib/libdb_stl.so
|
|
rm -r "${pkgdir}"/usr/docs
|
|
}
|
|
|
|
#---- license gpg-key sha256sums ----
|
|
|
|
license=(custom:sleepycat)
|
|
|
|
b2sums=('5b77a4ec0945fa96ce6c2b452fb4b029295e037fa64d5ff8dcb3b5e01ee3501fd75d9a73b8f5fa54d8907717d93546fbb5348ee70119e877fa2f17d301ecf50d'
|
|
'cfbb212c60c0e75c0d8c1cdbee9bcf0be9aec718ab462f779d5b880a4f976de1423279adde20159eef067be95d0d725eaa0cb950d0a8aaae720de78b94299e72'
|
|
'ba917cf9b69de39337b7141bf145153ae89849921c79b4d2f40734feefe2c0007abcc8c85ed776227875c5102354d8f61069fcee12c7db3b45c4ccabc6993760'
|
|
'682539a382f4423ad4404ad2aa446356d97485a7883a26d31cc2061611b138f20e39d941c575b8997538c4dd609e3e0343505759bba3b89c669ad1830cac1fbf'
|
|
'bc72ba9703cdbabbece3480fd36c22fca26f270cc4b8c66f8f19799b5120010dfdf53772a94374e45d38b25bb8a271d29ea84318aa8bc847a88940d52ee22a8f'
|
|
'bc50b556653a4e33073ed4cbaf716035f0840af2659bb4d6ef900621f92515d9490a698cec70546bd3aededa02b264fcd6e6cba3c4e6412125d2d587094f872d'
|
|
'c32c5236d5f1c9c112e5c6d7aee8d1d67e4f80c3826020ba71d864649bd12f2402a6d68334cfbf1bc17c920878bf64296d884436608a5b3fb9a27ba1fd4d9c75')
|
|
|
|
sha256sums=(e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628 # db-5.3.28.tar.gz
|
|
80714b9fc9f15f83452e85849897e53526685c5f611cb156decc48ebcac4009d # db-5.3.21-memp_stat-upstream-fix.patch
|
|
0bba53c23da0c15eae7ddf409e0c70f25946d7bcd5565ffcf9df1fadbff3e308 # db-5.3.21-mutex_leak.patch
|
|
285e210c4e722b6644f0c7de43fa0ef324881875d3c083aa7b6cad0ed666e8e4 # db-5.3.28-lemon_hash.patch
|
|
f538d843acf0708b4a2d15678dfc6ee53b1e4e52a6c6a782dfc1a058395952c6 # db-5.3.28_cve-2019-2708.patch
|
|
45b76375ffab07882df57999a492463e7bed36c25edf3b1d2d5dbca8c11c93ac # db-5.3.28-mmap-high-cpu-usage.patch
|
|
eb58b5764e16c6f81df8ff80964ef2e071ca5cbb9e24d37f45a831107afb68cc) # db-5.3.28-atomic_compare_exchange.patch
|
|
|
|
|