All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/2] package/lmdb: new package
@ 2024-04-04 16:29 Francois Perrad
  2024-04-04 16:29 ` [Buildroot] [PATCH v2 2/2] package/lua-lightningmdb: " Francois Perrad
  2024-05-10 20:07 ` [Buildroot] [PATCH v2 1/2] package/lmdb: " Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Francois Perrad @ 2024-04-04 16:29 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 DEVELOPERS             |  1 +
 package/Config.in      |  1 +
 package/lmdb/Config.in | 13 +++++++++++++
 package/lmdb/lmdb.hash |  3 +++
 package/lmdb/lmdb.mk   | 32 ++++++++++++++++++++++++++++++++
 5 files changed, 50 insertions(+)
 create mode 100644 package/lmdb/Config.in
 create mode 100644 package/lmdb/lmdb.hash
 create mode 100644 package/lmdb/lmdb.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index f6fc30137..cae94eef8 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1127,6 +1127,7 @@ F:	package/libwpe/
 F:	package/linenoise/
 F:	package/ljlinenoise/
 F:	package/lua-inotify/
+F:	package/lmdb/
 F:	package/lpeg/
 F:	package/lpty/
 F:	package/lrandom/
diff --git a/package/Config.in b/package/Config.in
index 33039331f..d8862c4cc 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1587,6 +1587,7 @@ menu "Database"
 	source "package/libodb-mysql/Config.in"
 	source "package/libodb-pgsql/Config.in"
 	source "package/libpqxx/Config.in"
+	source "package/lmdb/Config.in"
 	source "package/mariadb/Config.in"
 	source "package/mongodb/Config.in"
 	source "package/postgresql/Config.in"
diff --git a/package/lmdb/Config.in b/package/lmdb/Config.in
new file mode 100644
index 000000000..f4ae9f310
--- /dev/null
+++ b/package/lmdb/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_LMDB
+	bool "lmdb"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	help
+	  OpenLDAP Lightning Memory-Mapped Database
+
+	  LMDB is compact, fast, powerful, and robust and implements
+	  a simplified variant of the BerkeleyDB (BDB) API.
+
+	  https://symas.com/lmdb/
+
+comment "lmdb needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/lmdb/lmdb.hash b/package/lmdb/lmdb.hash
new file mode 100644
index 000000000..d72c66aac
--- /dev/null
+++ b/package/lmdb/lmdb.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  dd70a8c67807b3b8532b3e987b0a4e998962ecc28643e1af5ec77696b081c9b0  lmdb-0.9.31.tar.gz
+sha256  310fe25c858a9515fc8c8d7d1f24a67c9496f84a91e0a0e41ea9975b1371e569  libraries/liblmdb/LICENSE
diff --git a/package/lmdb/lmdb.mk b/package/lmdb/lmdb.mk
new file mode 100644
index 000000000..dafe7332c
--- /dev/null
+++ b/package/lmdb/lmdb.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# lmdb
+#
+################################################################################
+
+LMDB_VERSION = 0.9.31
+LMDB_SITE = $(call github,LMDB,lmdb,LMDB_$(LMDB_VERSION))
+LMDB_LICENSE = OLDAP-2.8
+LMDB_LICENSE_FILES = libraries/liblmdb/LICENSE
+LMDB_INSTALL_STAGING = YES
+
+define LMDB_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/libraries/liblmdb \
+		XCFLAGS="$(TARGET_CFLAGS)"
+endef
+
+define LMDB_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libraries/liblmdb \
+		DESTDIR="$(STAGING_DIR)" \
+		prefix=/usr \
+		install
+endef
+
+define LMDB_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libraries/liblmdb \
+		DESTDIR="$(TARGET_DIR)" \
+		prefix=/usr \
+		install
+endef
+
+$(eval $(generic-package))
-- 
2.40.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-10 20:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-04 16:29 [Buildroot] [PATCH v2 1/2] package/lmdb: new package Francois Perrad
2024-04-04 16:29 ` [Buildroot] [PATCH v2 2/2] package/lua-lightningmdb: " Francois Perrad
2024-05-10 20:07 ` [Buildroot] [PATCH v2 1/2] package/lmdb: " Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.