package/lua-augeas: new package
PATCH v2 1/1 package/lua-augeas: new package
The lua-augeas package provides a Lua binding for augeas
https://github.com/ncopa/lua-augeas
Based on initial work from Nicolas Carrier <[email protected]>
---
Changes v1 -> v2:
- Used 'select' instead of 'depends on'
- Moved LUA_AUGEAS_SITE right after LUA_AUGEAS_VERSION
- Added comment related to LDFLAGS=$(LDFLAGS)
- Removed uneeded LUA_CFLAGS=""
- Call $(MAKE) instead of $(MAKE1)
DEVELOPERS | 6 ++++ package/Config.in | 1 + package/lua-augeas/Config.in | 13 ++++++++ package/lua-augeas/lua-augeas.hash | 3 ++ package/lua-augeas/lua-augeas.mk | 33 +++++++++++++++++++ .../testing/tests/package/test_lua_augeas.py | 27 +++++++++++++++ 6 files changed, 83 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
DEVELOPERS +6 -0
@@ -1148,6 +1148,10 @@ F: package/sysrepo/ N: Henrique Camargo <[email protected]> F: package/json-glib/ +N: Hervé Codina <[email protected]> +F: package/lua-augeas/ +F: support/testing/tests/package/test_lua_augeas.py + N: Hiroshi Kawashima <[email protected]> F: package/gauche/ F: package/gmrender-resurrect/
@@ -1980,10 +1984,12 @@ F: configs/galileo_defconfig N: Nicolas Carrier <[email protected]> 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
package/Config.in +1 -0
@@ -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"
package/lua-augeas/Config.in new file +13 -0
@@ -0,0 +1,13 @@ +config BR2_PACKAGE_LUA_AUGEAS + bool "lua-augeas" + depends on !BR2_arc + depends on BR2_USE_WCHAR + select BR2_PACKAGE_AUGEAS + help + Lua binding for augeas library + + https://github.com/ncopa/lua-augeas + +comment "lua-augeas needs a toolchain w/ wchar" + depends on !BR2_arc + depends on !BR2_USE_WCHAR
package/lua-augeas/lua-augeas.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally computed: +sha256 694fe887eebac27b558c9695042405f70a86382e92916094e7ba5f411673fbc1 lua-augeas-a6eace5116d1a711218a7c9086a4e3c4db88ee57.tar.gz +sha256 1f5c5ee5da981332b7f73cc5a59af660b03104279e2aa21b6b86890430c3eff0 COPYRIGHT
package/lua-augeas/lua-augeas.mk new file +33 -0
@@ -0,0 +1,33 @@ +################################################################################ +# +# lua-augeas +# +################################################################################ + +LUA_AUGEAS_VERSION = a6eace5116d1a711218a7c9086a4e3c4db88ee57 +LUA_AUGEAS_SITE = $(call github,ncopa,lua-augeas,$(LUA_AUGEAS_VERSION)) +LUA_AUGEAS_LICENSE = MIT +LUA_AUGEAS_LICENSE_FILES = COPYRIGHT +LUA_AUGEAS_DEPENDENCIES = luainterpreter augeas host-pkgconf + +# LDFLAGS=$(LDFLAGS) is present to pass LDFLAGS from environment to the command +# line. With LDFLAGS set in the command line, related ordinary asignment present +# in the makefile are ignored and so lua-augeas makefile cannot not add '-L/lib' +# to this value. +LUA_AUGEAS_CONF_OPTS= \ + PKGCONFIG="$(PKG_CONFIG_HOST_BINARY)" \ + LDFLAGS="$(LDFLAGS)" \ + LUA_VERSION="$(LUAINTERPRETER_ABIVER)" \ + INSTALL_CMOD="/usr/lib/lua/$(LUAINTERPRETER_ABIVER)" + +define LUA_AUGEAS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + $(LUA_AUGEAS_CONF_OPTS) all +endef + +define LUA_AUGEAS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + $(LUA_AUGEAS_CONF_OPTS) DESTDIR="$(TARGET_DIR)" install +endef + +$(eval $(generic-package))
support/testing/tests/package/test_lua_augeas.py new file +27 -0
@@ -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")
Signature · 6 lines
2.31.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Arnout Vandecappelle
AppliedQuoted 73 lines · Herve Codina
The lua-augeas package provides a Lua binding for augeas
https://github.com/ncopa/lua-augeas
Based on initial work from Nicolas Carrier <[email protected]>
Signed-off-by Herve Codina <[email protected]>---
Changes v1 -> v2:
- Used 'select' instead of 'depends on'
- MovedLUA_AUGEAS_SITEright afterLUA_AUGEAS_VERSION
- Added comment related to LDFLAGS=$(LDFLAGS)
- Removed uneeded LUA_CFLAGS=""
- Call $(MAKE) instead of $(MAKE1)DEVELOPERS | 6 ++++ package/Config.in | 1 + package/lua-augeas/Config.in | 13 ++++++++ package/lua-augeas/lua-augeas.hash | 3 ++ package/lua-augeas/lua-augeas.mk | 33 +++++++++++++++++++ .../testing/tests/package/test_lua_augeas.py | 27 +++++++++++++++ 6 files changed, 83 insertions(+)create mode 100644 package/lua-augeas/Config.in
create mode 100644 package/lua-augeas/lua-augeas.hash create mode 100644package/lua-augeas/lua-augeas.mkcreate mode 100644support/testing/tests/package/test_lua_augeas.pyDEVELOPERS +6
-0@@ -1148,6 +1148,10 @@ F: package/sysrepo/ N: Henrique Camargo <[email protected]> F: package/json-glib/ +N: Hervé Codina <[email protected]> +F: package/lua-augeas/ +F: support/testing/tests/package/test_lua_augeas.py + N: Hiroshi Kawashima <[email protected]> F: package/gauche/ F: package/gmrender-resurrect/@@ -1980,10 +1984,12 @@ F: configs/galileo_defconfig N: Nicolas Carrier <[email protected]> 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.pypackage/Config.in +1
-0@@ -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"package/lua-augeas/Config.in new file +0
-0
package/lua-augeas/Config.in line 4
Quoted 4 lines
package/lua-augeas/Config.in new file +4
-0@@ -0,0 +1,13 @@ +config BR2_PACKAGE_LUA_AUGEAS + bool "lua-augeas" + depends on !BR2_arc + depends on BR2_USE_WCHAR
I went out on a limb and assumed these two are from augeas and not from the
lua wrapper, so I added the corresponding comment.
Quoted 15 lines
package/lua-augeas/Config.in new file +9
-0+ select BR2_PACKAGE_AUGEAS + help + Lua binding for augeas library + + https://github.com/ncopa/lua-augeas + +comment "lua-augeas needs a toolchain w/ wchar" + depends on !BR2_arc + depends on !BR2_USE_WCHARpackage/lua-augeas/lua-augeas.hash new file +0
-0
package/lua-augeas/lua-augeas.hash line 2
Quoted 2 lines
package/lua-augeas/lua-augeas.hash new file +2
-0@@ -0,0 +1,3 @@ +# Locally computed: +sha256 694fe887eebac27b558c9695042405f70a86382e92916094e7ba5f411673fbc1 lua-augeas-a6eace5116d1a711218a7c9086a4e3c4db88ee57.tar.gz
Please use two spaces.
Applied to master with those two fixed, thanks.
Regards,
Arnout
Quoted 64 lines
package/lua-augeas/lua-augeas.hash new file +1
-0+sha256 1f5c5ee5da981332b7f73cc5a59af660b03104279e2aa21b6b86890430c3eff0 COPYRIGHTpackage/lua-augeas/lua-augeas.mk new file +33
-0@@ -0,0 +1,33 @@ +################################################################################ +# +# lua-augeas +# +################################################################################ + +LUA_AUGEAS_VERSION = a6eace5116d1a711218a7c9086a4e3c4db88ee57 +LUA_AUGEAS_SITE = $(call github,ncopa,lua-augeas,$(LUA_AUGEAS_VERSION)) +LUA_AUGEAS_LICENSE = MIT +LUA_AUGEAS_LICENSE_FILES = COPYRIGHT +LUA_AUGEAS_DEPENDENCIES = luainterpreter augeas host-pkgconf + +# LDFLAGS=$(LDFLAGS) is present to pass LDFLAGS from environment to the command +# line. With LDFLAGS set in the command line, related ordinary asignment present +# in the makefile are ignored and so lua-augeas makefile cannot not add '-L/lib' +# to this value. +LUA_AUGEAS_CONF_OPTS= \ + PKGCONFIG="$(PKG_CONFIG_HOST_BINARY)" \ + LDFLAGS="$(LDFLAGS)" \ + LUA_VERSION="$(LUAINTERPRETER_ABIVER)" \ + INSTALL_CMOD="/usr/lib/lua/$(LUAINTERPRETER_ABIVER)" + +define LUA_AUGEAS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + $(LUA_AUGEAS_CONF_OPTS) all +endef + +define LUA_AUGEAS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + $(LUA_AUGEAS_CONF_OPTS) DESTDIR="$(TARGET_DIR)" install +endef + +$(eval $(generic-package))support/testing/tests/package/test_lua_augeas.py new file +17
-0@@ -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):
support/testing/tests/package/test_lua_augeas.py line 27
Quoted 10 lines
support/testing/tests/package/test_lua_augeas.py new file +10
-0+ 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")
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot