[meta-oe,hardknott] lmdb: add recipe

Submitted by Sakib Sajal on July 29, 2021, 6:21 p.m. | Patch ID: 179994

Details

Message ID 20210729182156.16834-1-sakib.sajal@windriver.com
State New
Headers show

Commit Message

Sakib Sajal July 29, 2021, 6:21 p.m.
lmdb provides a high-performance embedded transactional
database in the form of a key-value store.

Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-dbs/lmdb/files/run-ptest | 25 +++++++++++++++
 meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb  | 39 ++++++++++++++++++++++++
 2 files changed, 64 insertions(+)
 create mode 100644 meta-oe/recipes-dbs/lmdb/files/run-ptest
 create mode 100644 meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb

Patch hide | download patch | download mbox

diff --git a/meta-oe/recipes-dbs/lmdb/files/run-ptest b/meta-oe/recipes-dbs/lmdb/files/run-ptest
new file mode 100644
index 000000000..a6a7549b9
--- /dev/null
+++ b/meta-oe/recipes-dbs/lmdb/files/run-ptest
@@ -0,0 +1,25 @@ 
+#!/bin/sh
+
+cd tests
+
+retval=0
+for t in mtest*
+do
+    mkdir testdb
+    ./$t > /dev/null && ./mdb_stat testdb > /dev/null
+    if [ $? -ne 0 ]; then
+            echo "FAIL: $t"
+            retval=$(( ${retval} + 1))
+    else
+            echo "PASS: $t"
+    fi
+    rm -rf testdb
+done
+
+if [ $retval -eq 0 ] ; then
+    echo "PASS: lmdb"
+else
+    echo "FAIL: lmdb"
+fi
+
+exit $retval
\ No newline at end of file
diff --git a/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb
new file mode 100644
index 000000000..0746da141
--- /dev/null
+++ b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb
@@ -0,0 +1,39 @@ 
+# SPDX-FileCopyrightText: 2017-2019 Volker Krause <vkrause@kde.org>
+# SPDX-FileCopyrightText: 2019 Hannah Kiekens <hannahkiekens@gmail.com>
+#
+# SPDX-License-Identifier: MIT
+
+SUMMARY = "Lightning Memory-Mapped Database (LMDB)"
+HOMEPAGE = "https://symas.com/lightning-memory-mapped-database/"
+LICENSE = "OLDAP-2.8"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972"
+
+SRC_URI = "git://github.com/LMDB/lmdb.git;nobranch=1 \
+           file://run-ptest \
+"
+
+SRCREV = "LMDB_${PV}"
+
+inherit base ptest
+
+S = "${WORKDIR}/git/libraries/liblmdb"
+
+LDFLAGS += "-Wl,-soname,lib${PN}.so.${PV}"
+
+do_compile() {
+    oe_runmake CC="${CC}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}"
+}
+
+do_install() {
+    oe_runmake CC="${CC}" DESTDIR="${D}" prefix="${prefix}" libprefix="${libdir}" manprefix="${mandir}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}" install
+    cd ${D}/${libdir}
+    ln -s liblmdb.so.${PV} liblmdb.so
+    rm liblmdb.a
+}
+
+do_install_ptest() {
+    install -d ${D}${PTEST_PATH}/tests
+    for test in mtest mtest2 mtest3 mtest4 mtest5 mdb_stat; do
+        install -m 755 ${S}/$test ${D}${PTEST_PATH}/tests
+    done
+}

Comments

Armin Kuster July 30, 2021, 1:45 p.m.
On 7/29/21 11:21 AM, Sakib Sajal wrote:
> lmdb provides a high-performance embedded transactional
> database in the form of a key-value store.
>
> Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Adding a new package to a stable branch is not allowed per process.

Your request is denied.

- Armin
> ---
>  meta-oe/recipes-dbs/lmdb/files/run-ptest | 25 +++++++++++++++
>  meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb  | 39 ++++++++++++++++++++++++
>  2 files changed, 64 insertions(+)
>  create mode 100644 meta-oe/recipes-dbs/lmdb/files/run-ptest
>  create mode 100644 meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb
>
> diff --git a/meta-oe/recipes-dbs/lmdb/files/run-ptest b/meta-oe/recipes-dbs/lmdb/files/run-ptest
> new file mode 100644
> index 000000000..a6a7549b9
> --- /dev/null
> +++ b/meta-oe/recipes-dbs/lmdb/files/run-ptest
> @@ -0,0 +1,25 @@
> +#!/bin/sh
> +
> +cd tests
> +
> +retval=0
> +for t in mtest*
> +do
> +    mkdir testdb
> +    ./$t > /dev/null && ./mdb_stat testdb > /dev/null
> +    if [ $? -ne 0 ]; then
> +            echo "FAIL: $t"
> +            retval=$(( ${retval} + 1))
> +    else
> +            echo "PASS: $t"
> +    fi
> +    rm -rf testdb
> +done
> +
> +if [ $retval -eq 0 ] ; then
> +    echo "PASS: lmdb"
> +else
> +    echo "FAIL: lmdb"
> +fi
> +
> +exit $retval
> \ No newline at end of file
> diff --git a/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb
> new file mode 100644
> index 000000000..0746da141
> --- /dev/null
> +++ b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb
> @@ -0,0 +1,39 @@
> +# SPDX-FileCopyrightText: 2017-2019 Volker Krause <vkrause@kde.org>
> +# SPDX-FileCopyrightText: 2019 Hannah Kiekens <hannahkiekens@gmail.com>
> +#
> +# SPDX-License-Identifier: MIT
> +
> +SUMMARY = "Lightning Memory-Mapped Database (LMDB)"
> +HOMEPAGE = "https://symas.com/lightning-memory-mapped-database/"
> +LICENSE = "OLDAP-2.8"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972"
> +
> +SRC_URI = "git://github.com/LMDB/lmdb.git;nobranch=1 \
> +           file://run-ptest \
> +"
> +
> +SRCREV = "LMDB_${PV}"
> +
> +inherit base ptest
> +
> +S = "${WORKDIR}/git/libraries/liblmdb"
> +
> +LDFLAGS += "-Wl,-soname,lib${PN}.so.${PV}"
> +
> +do_compile() {
> +    oe_runmake CC="${CC}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}"
> +}
> +
> +do_install() {
> +    oe_runmake CC="${CC}" DESTDIR="${D}" prefix="${prefix}" libprefix="${libdir}" manprefix="${mandir}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}" install
> +    cd ${D}/${libdir}
> +    ln -s liblmdb.so.${PV} liblmdb.so
> +    rm liblmdb.a
> +}
> +
> +do_install_ptest() {
> +    install -d ${D}${PTEST_PATH}/tests
> +    for test in mtest mtest2 mtest3 mtest4 mtest5 mdb_stat; do
> +        install -m 755 ${S}/$test ${D}${PTEST_PATH}/tests
> +    done
> +}
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#92410): https://lists.openembedded.org/g/openembedded-devel/message/92410
Mute This Topic: https://lists.openembedded.org/mt/84534310/3617530
Group Owner: openembedded-devel+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-
Sakib Sajal July 30, 2021, 3:52 p.m.
On 2021-07-30 9:45 a.m., Armin Kuster wrote:
> [Please note: This e-mail is from an EXTERNAL e-mail address]
>
> On 7/29/21 11:21 AM, Sakib Sajal wrote:
>> lmdb provides a high-performance embedded transactional
>> database in the form of a key-value store.
>>
>> Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Adding a new package to a stable branch is not allowed per process.
>
> Your request is denied.
>
> - Armin

Thanks for the information.

Sakib

>> ---
>>   meta-oe/recipes-dbs/lmdb/files/run-ptest | 25 +++++++++++++++
>>   meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb  | 39 ++++++++++++++++++++++++
>>   2 files changed, 64 insertions(+)
>>   create mode 100644 meta-oe/recipes-dbs/lmdb/files/run-ptest
>>   create mode 100644 meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb
>>
>> diff --git a/meta-oe/recipes-dbs/lmdb/files/run-ptest b/meta-oe/recipes-dbs/lmdb/files/run-ptest
>> new file mode 100644
>> index 000000000..a6a7549b9
>> --- /dev/null
>> +++ b/meta-oe/recipes-dbs/lmdb/files/run-ptest
>> @@ -0,0 +1,25 @@
>> +#!/bin/sh
>> +
>> +cd tests
>> +
>> +retval=0
>> +for t in mtest*
>> +do
>> +    mkdir testdb
>> +    ./$t > /dev/null && ./mdb_stat testdb > /dev/null
>> +    if [ $? -ne 0 ]; then
>> +            echo "FAIL: $t"
>> +            retval=$(( ${retval} + 1))
>> +    else
>> +            echo "PASS: $t"
>> +    fi
>> +    rm -rf testdb
>> +done
>> +
>> +if [ $retval -eq 0 ] ; then
>> +    echo "PASS: lmdb"
>> +else
>> +    echo "FAIL: lmdb"
>> +fi
>> +
>> +exit $retval
>> \ No newline at end of file
>> diff --git a/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb
>> new file mode 100644
>> index 000000000..0746da141
>> --- /dev/null
>> +++ b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb
>> @@ -0,0 +1,39 @@
>> +# SPDX-FileCopyrightText: 2017-2019 Volker Krause <vkrause@kde.org>
>> +# SPDX-FileCopyrightText: 2019 Hannah Kiekens <hannahkiekens@gmail.com>
>> +#
>> +# SPDX-License-Identifier: MIT
>> +
>> +SUMMARY = "Lightning Memory-Mapped Database (LMDB)"
>> +HOMEPAGE = "https://symas.com/lightning-memory-mapped-database/"
>> +LICENSE = "OLDAP-2.8"
>> +LIC_FILES_CHKSUM = "file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972"
>> +
>> +SRC_URI = "git://github.com/LMDB/lmdb.git;nobranch=1 \
>> +           file://run-ptest \
>> +"
>> +
>> +SRCREV = "LMDB_${PV}"
>> +
>> +inherit base ptest
>> +
>> +S = "${WORKDIR}/git/libraries/liblmdb"
>> +
>> +LDFLAGS += "-Wl,-soname,lib${PN}.so.${PV}"
>> +
>> +do_compile() {
>> +    oe_runmake CC="${CC}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}"
>> +}
>> +
>> +do_install() {
>> +    oe_runmake CC="${CC}" DESTDIR="${D}" prefix="${prefix}" libprefix="${libdir}" manprefix="${mandir}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}" install
>> +    cd ${D}/${libdir}
>> +    ln -s liblmdb.so.${PV} liblmdb.so
>> +    rm liblmdb.a
>> +}
>> +
>> +do_install_ptest() {
>> +    install -d ${D}${PTEST_PATH}/tests
>> +    for test in mtest mtest2 mtest3 mtest4 mtest5 mdb_stat; do
>> +        install -m 755 ${S}/$test ${D}${PTEST_PATH}/tests
>> +    done
>> +}
>>
>>
>>
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#92414): https://lists.openembedded.org/g/openembedded-devel/message/92414
Mute This Topic: https://lists.openembedded.org/mt/84534310/3617530
Group Owner: openembedded-devel+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-