All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/lua-augeas: new package
@ 2021-10-01 12:53 Herve Codina
  2021-10-01 13:26 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Herve Codina @ 2021-10-01 12:53 UTC (permalink / raw)
  To: buildroot; +Cc: Herve Codina, Thomas Petazzoni

The lua-augeas package provides a Lua binding for augeas

https://github.com/ncopa/lua-augeas

Based on initial work from Nicolas Carrier <nicolas.carrier@orolia.com>

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
 DEVELOPERS                                    |  6 ++++
 package/Config.in                             |  1 +
 package/lua-augeas/Config.in                  | 10 +++++++
 package/lua-augeas/lua-augeas.hash            |  3 ++
 package/lua-augeas/lua-augeas.mk              | 30 +++++++++++++++++++
 .../testing/tests/package/test_lua_augeas.py  | 27 +++++++++++++++++
 6 files changed, 77 insertions(+)
 create mode 100644 package/lua-augeas/Config.in
 create mode 100644 package/lua-augeas/lua-augeas.hash
 create mode 100644 package/lua-augeas/lua-augeas.mk
 create mode 100644 support/testing/tests/package/test_lua_augeas.py

diff --git a/DEVELOPERS b/DEVELOPERS
index 1f977190ab..81b84f8e3d 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1148,6 +1148,10 @@ F:	package/sysrepo/
 N:	Henrique Camargo <henrique@henriquecamargo.com>
 F:	package/json-glib/
 
+N:	Hervé Codina <herve.codina@bootlin.com>
+F:	package/lua-augeas/
+F:	support/testing/tests/package/test_lua_augeas.py
+
 N:	Hiroshi Kawashima <kei-k@ca2.so-net.ne.jp>
 F:	package/gauche/
 F:	package/gmrender-resurrect/
@@ -1980,10 +1984,12 @@ F:	configs/galileo_defconfig
 
 N:	Nicolas Carrier <nicolas.carrier@orolia.com>
 F:	package/bmap-tools/
+F:	package/lua-augeas/
 F:	package/php-xdebug/
 F:	package/python-augeas/
 F:	package/python-flask-expects-json/
 F:	package/python-git/
+F:	support/testing/tests/package/test_lua_augeas.py
 F:	support/testing/tests/package/sample_bmap_tools.sh
 F:	support/testing/tests/package/sample_python_augeas.py
 F:	support/testing/tests/package/sample_python_flask_expects_json.py
diff --git a/package/Config.in b/package/Config.in
index 2f83c87582..d4743fb9d1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -659,6 +659,7 @@ menu "Lua libraries/modules"
 	source "package/lpty/Config.in"
 	source "package/lrandom/Config.in"
 	source "package/lsqlite3/Config.in"
+	source "package/lua-augeas/Config.in"
 	source "package/lua-basexx/Config.in"
 	source "package/lua-binaryheap/Config.in"
 	source "package/lua-bit32/Config.in"
diff --git a/package/lua-augeas/Config.in b/package/lua-augeas/Config.in
new file mode 100644
index 0000000000..ed07da5426
--- /dev/null
+++ b/package/lua-augeas/Config.in
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_LUA_AUGEAS
+	bool "lua-augeas"
+	depends on BR2_PACKAGE_AUGEAS
+	help
+	  Lua binding for augeas library
+
+	  https://github.com/ncopa/lua-augeas
+
+comment "lua-augeas needs augeas"
+	depends on !BR2_PACKAGE_AUGEAS
\ No newline at end of file
diff --git a/package/lua-augeas/lua-augeas.hash b/package/lua-augeas/lua-augeas.hash
new file mode 100644
index 0000000000..8497c48dc6
--- /dev/null
+++ b/package/lua-augeas/lua-augeas.hash
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256 694fe887eebac27b558c9695042405f70a86382e92916094e7ba5f411673fbc1  lua-augeas-a6eace5116d1a711218a7c9086a4e3c4db88ee57.tar.gz
+sha256 1f5c5ee5da981332b7f73cc5a59af660b03104279e2aa21b6b86890430c3eff0  COPYRIGHT
diff --git a/package/lua-augeas/lua-augeas.mk b/package/lua-augeas/lua-augeas.mk
new file mode 100644
index 0000000000..e1cecd7351
--- /dev/null
+++ b/package/lua-augeas/lua-augeas.mk
@@ -0,0 +1,30 @@
+################################################################################
+#
+# lua-augeas
+#
+################################################################################
+
+LUA_AUGEAS_VERSION = a6eace5116d1a711218a7c9086a4e3c4db88ee57
+LUA_AUGEAS_LICENSE = MIT
+LUA_AUGEAS_LICENSE_FILES = COPYRIGHT
+LUA_AUGEAS_SITE = $(call github,ncopa,lua-augeas,$(LUA_AUGEAS_VERSION))
+LUA_AUGEAS_DEPENDENCIES = luainterpreter augeas host-pkgconf
+
+LUA_AUGEAS_CONF_OPTS= \
+	PKGCONFIG="$(PKG_CONFIG_HOST_BINARY)" \
+	LDFLAGS="$(LDFLAGS)" \
+	LUA_VERSION="$(LUAINTERPRETER_ABIVER)" \
+	INSTALL_CMOD="/usr/lib/lua/$(LUAINTERPRETER_ABIVER)" \
+	LUA_CFLAGS=""
+
+define LUA_AUGEAS_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D) \
+		$(LUA_AUGEAS_CONF_OPTS) all
+endef
+
+define LUA_AUGEAS_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D) \
+		$(LUA_AUGEAS_CONF_OPTS) DESTDIR="$(TARGET_DIR)" install
+endef
+
+$(eval $(generic-package))
diff --git a/support/testing/tests/package/test_lua_augeas.py b/support/testing/tests/package/test_lua_augeas.py
new file mode 100644
index 0000000000..2a612b6d32
--- /dev/null
+++ b/support/testing/tests/package/test_lua_augeas.py
@@ -0,0 +1,27 @@
+from tests.package.test_lua import TestLuaBase
+
+
+class TestLuaLuaAugeas(TestLuaBase):
+    config = TestLuaBase.config + \
+        """
+        BR2_PACKAGE_LUA=y
+        BR2_PACKAGE_AUGEAS=y
+        BR2_PACKAGE_LUA_AUGEAS=y
+        """
+
+    def test_run(self):
+        self.login()
+        self.module_test("augeas")
+
+
+class TestLuajitLuaAugeas(TestLuaBase):
+    config = TestLuaBase.config + \
+        """
+        BR2_PACKAGE_LUAJIT=y
+        BR2_PACKAGE_AUGEAS=y
+        BR2_PACKAGE_LUA_AUGEAS=y
+        """
+
+    def test_run(self):
+        self.login()
+        self.module_test("augeas")
-- 
2.31.1

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

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

end of thread, other threads:[~2021-10-04  8:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01 12:53 [Buildroot] [PATCH 1/1] package/lua-augeas: new package Herve Codina
2021-10-01 13:26 ` Thomas Petazzoni
2021-10-01 16:35   ` Herve Codina
2021-10-03 10:30     ` Arnout Vandecappelle
2021-10-04  8:14       ` Herve Codina

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.