blob: fb1b18c181ba08d600d745edf323812e741d07a1 [file] [log] [blame]
Patrick Williams213cb262021-08-07 19:21:33 -05001# SPDX-FileCopyrightText: 2017-2019 Volker Krause <vkrause@kde.org>
2# SPDX-FileCopyrightText: 2019 Hannah Kiekens <hannahkiekens@gmail.com>
3#
4# SPDX-License-Identifier: MIT
5
6SUMMARY = "Lightning Memory-Mapped Database (LMDB)"
7HOMEPAGE = "https://symas.com/lightning-memory-mapped-database/"
8LICENSE = "OLDAP-2.8"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972"
10
11SRC_URI = "git://github.com/LMDB/lmdb.git;nobranch=1 \
12 file://run-ptest \
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050013 file://0001-Makefile-use-libprefix-instead-of-libdir.patch \
14 "
Patrick Williams213cb262021-08-07 19:21:33 -050015
Andrew Geissler5199d832021-09-24 16:47:35 -050016SRCREV = "8ad7be2510414b9506ec9f9e24f24d04d9b04a1a"
Patrick Williams213cb262021-08-07 19:21:33 -050017
18inherit base ptest
19
20S = "${WORKDIR}/git/libraries/liblmdb"
21
22LDFLAGS += "-Wl,-soname,lib${PN}.so.${PV}"
23
24do_compile() {
25 oe_runmake CC="${CC}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}"
26}
27
28do_install() {
29 oe_runmake CC="${CC}" DESTDIR="${D}" prefix="${prefix}" libprefix="${libdir}" manprefix="${mandir}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}" install
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050030 cd ${D}${libdir}
Patrick Williams213cb262021-08-07 19:21:33 -050031 ln -s liblmdb.so.${PV} liblmdb.so
32 rm liblmdb.a
33}
34
35do_install_ptest() {
36 install -d ${D}${PTEST_PATH}/tests
37 for test in mtest mtest2 mtest3 mtest4 mtest5 mdb_stat; do
38 install -m 755 ${S}/$test ${D}${PTEST_PATH}/tests
39 done
40}