aboutsummaryrefslogtreecommitdiff
path: root/package/lua-lyaml/lua-lyaml.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/lua-lyaml/lua-lyaml.mk')
-rw-r--r--package/lua-lyaml/lua-lyaml.mk33
1 files changed, 33 insertions, 0 deletions
diff --git a/package/lua-lyaml/lua-lyaml.mk b/package/lua-lyaml/lua-lyaml.mk
new file mode 100644
index 0000000000..c88a438d5e
--- /dev/null
+++ b/package/lua-lyaml/lua-lyaml.mk
@@ -0,0 +1,33 @@
+################################################################################
+#
+# lua-lyaml
+#
+################################################################################
+
+LUA_LYAML_VERSION = 6.2.4
+LUA_LYAML_NAME_UPSTREAM = lyaml
+LUA_LYAML_SITE = $(call github,gvvaughan,$(LUA_LYAML_NAME_UPSTREAM),v$(LUA_LYAML_VERSION))
+LUA_LYAML_LICENSE = MIT
+LUA_LYAML_LICENSE_FILES = LICENSE
+LUA_LYAML_DEPENDENCIES = libyaml luainterpreter host-lua
+
+define LUA_LYAML_BUILD_CMDS
+ (cd $(@D); \
+ $(LUA_RUN) build-aux/luke \
+ version="'$(LUA_LYAML_VERSION)'" \
+ CC="$(TARGET_CC)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LUA_INCDIR=$(STAGING_DIR)/usr/include \
+ YAML_DIR=$(STAGING_DIR)/usr \
+ )
+endef
+
+define LUA_LYAML_INSTALL_TARGET_CMDS
+ (cd $(@D); \
+ $(LUA_RUN) build-aux/luke install \
+ INST_LIBDIR="$(TARGET_DIR)/usr/lib/lua/$(LUAINTERPRETER_ABIVER)" \
+ INST_LUADIR="$(TARGET_DIR)/usr/share/lua/$(LUAINTERPRETER_ABIVER)" \
+ )
+endef
+
+$(eval $(generic-package))