Skip to contentSkip to conversation

package/lua-lightningmdb: new package

Buildroot Thomas Petazzoni via buildroot 1 participant 1 message May 10, 2024

lore
Share & tools
lore
#0 lore raw

commit: https://git.buildroot.net/buildroot/commit/?id=9f841969867fcd14a204780dd03403b66731d9b2
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

---
 package/Config.in                                      |  1 +
 package/lua-lightningmdb/Config.in                     | 13 +++++++++++++
 package/lua-lightningmdb/lua-lightningmdb.hash         |  3 +++
 package/lua-lightningmdb/lua-lightningmdb.mk           | 14 ++++++++++++++
 support/testing/tests/package/test_lua_lightningmdb.py | 13 +++++++++++++
 5 files changed, 44 insertions(+)
package/Config.in +1 -0
index 14e016daf3..190b100609 100644
@@ -747,6 +747,7 @@ menu "Lua libraries/modules"
 	source "package/lua-iconv/Config.in"
 	source "package/lua-inotify/Config.in"
 	source "package/lua-lgdbm/Config.in"
+	source "package/lua-lightningmdb/Config.in"
 	source "package/lua-livr/Config.in"
 	source "package/lua-livr-extra/Config.in"
 	source "package/lua-lpeg-patterns/Config.in"
package/lua-lightningmdb/Config.in new file +13 -0
new file mode 100644
index 0000000000..cd08cfbe79
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_LUA_LIGHTNINGMDB
+	bool "lua-lightningmdb"
+	depends on !BR2_PACKAGE_LUAJIT
+	depends on BR2_TOOLCHAIN_HAS_THREADS # lmdb
+	select BR2_PACKAGE_LMDB
+	help
+	  A thin wrapper around OpenLDAP Lightning Memory-Mapped
+	  Database (LMDB).
+
+	  https://github.com/shmul/lightningmdb
+
+comment "lua-lightningmdb needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
package/lua-lightningmdb/lua-lightningmdb.hash new file +3 -0
new file mode 100644
index 0000000000..49ac7ea09c
@@ -0,0 +1,3 @@
+# computed by luarocks/buildroot
+sha256  d836709e8a1374eb8913f0e9787bb3f0fc4d49b29e01112691b619f7d1355f8c  lightningmdb-0.9.22.1-1.src.rock
+sha256  3d0562e11bc52bf45a735e1d60c6f8522886927a8bcfbe7dee219a61ec30b07a  lightningmdb-0.9.22.1-1/LICENSE
package/lua-lightningmdb/lua-lightningmdb.mk new file +14 -0
new file mode 100644
index 0000000000..f70cbc4b06
@@ -0,0 +1,14 @@
+################################################################################
+#
+# lua-lightningmdb
+#
+################################################################################
+
+LUA_LIGHTNINGMDB_VERSION = 0.9.22.1-1
+LUA_LIGHTNINGMDB_NAME_UPSTREAM = Lightningmdb
+LUA_LIGHTNINGMDB_SUBDIR = lightningmdb-$(LUA_LIGHTNINGMDB_VERSION)
+LUA_LIGHTNINGMDB_LICENSE = MIT
+LUA_LIGHTNINGMDB_LICENSE_FILES = $(LUA_LIGHTNINGMDB_SUBDIR)/LICENSE
+LUA_LIGHTNINGMDB_DEPENDENCIES = lmdb
+
+$(eval $(luarocks-package))
support/testing/tests/package/test_lua_lightningmdb.py new file +13 -0
new file mode 100644
index 0000000000..cc5b82043b
@@ -0,0 +1,13 @@
+from tests.package.test_lua import TestLuaBase
+
+
+class TestLuaLightningmdb(TestLuaBase):
+    config = TestLuaBase.config + \
+        """
+        BR2_PACKAGE_LUA=y
+        BR2_PACKAGE_LUA_LIGHTNINGMDB=y
+        """
+
+    def test_run(self):
+        self.login()
+        self.module_test("lightningmdb")

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot