CGILUA_LICENSE = MIT
define CGILUA_INSTALL_TARGET_CMDS
- $(MAKE) -C $(@D) install LUA_DIR="$(TARGET_DIR)/usr/share/lua"
+ $(MAKE) PREFIX="$(TARGET_DIR)/usr" -C $(@D) install
endef
$(eval $(generic-package))
define COPAS_INSTALL_TARGET_CMDS
$(INSTALL) -m 0644 -D $(@D)/src/copas/copas.lua \
- $(TARGET_DIR)/usr/share/lua/copas.lua
+ $(TARGET_DIR)/usr/share/lua/5.1/copas.lua
endef
$(eval $(generic-package))
define COXPCALL_INSTALL_TARGET_CMDS
$(INSTALL) -m 0644 -D $(@D)/src/coxpcall.lua \
- $(TARGET_DIR)/usr/share/lua/coxpcall.lua
+ $(TARGET_DIR)/usr/share/lua/5.1/coxpcall.lua
endef
$(eval $(generic-package))
define LBASE64_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0755 $(@D)/base64.so \
- $(TARGET_DIR)/usr/lib/lua/base64.so
+ $(TARGET_DIR)/usr/lib/lua/5.1/base64.so
endef
$(eval $(generic-package))
LUA_EV_DEPENDENCIES = luainterpreter libev
LUA_EV_LICENSE = MIT
LUA_EV_LICENSE_FILES = README
-LUA_EV_CONF_OPT = -DINSTALL_CMOD="/usr/lib/lua"
+LUA_EV_CONF_OPT = -DINSTALL_CMOD="/usr/lib/lua/5.1"
$(eval $(cmake-package))
endef
define LUA_MSGPACK_NATIVE_INSTALL_TARGET_CMDS
- $(INSTALL) -m 755 -D $(@D)/msgpack.so $(TARGET_DIR)/usr/lib/lua/msgpack.so
+ $(INSTALL) -m 755 -D $(@D)/msgpack.so $(TARGET_DIR)/usr/lib/lua/5.1/msgpack.so
endef
$(eval $(generic-package))
Adjust installation location to /usr.
-Remove version in module paths.
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
===================================================================
--- a/etc/lua.pc
+++ b/etc/lua.pc
-@@ -8,13 +8,13 @@
+@@ -8,7 +8,7 @@
R= 5.1.5
# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
INSTALL_BIN= ${prefix}/bin
INSTALL_INC= ${prefix}/include
INSTALL_LIB= ${prefix}/lib
- INSTALL_MAN= ${prefix}/man/man1
--INSTALL_LMOD= ${prefix}/share/lua/${V}
--INSTALL_CMOD= ${prefix}/lib/lua/${V}
-+INSTALL_LMOD= ${prefix}/share/lua
-+INSTALL_CMOD= ${prefix}/lib/lua
-
- # canonical vars
- exec_prefix=${prefix}
Index: b/src/luaconf.h
===================================================================
--- a/src/luaconf.h
+++ b/src/luaconf.h
-@@ -94,9 +94,9 @@
+@@ -94,7 +94,7 @@
".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
#else
-#define LUA_ROOT "/usr/local/"
--#define LUA_LDIR LUA_ROOT "share/lua/5.1/"
--#define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
+#define LUA_ROOT "/usr/"
-+#define LUA_LDIR LUA_ROOT "share/lua/"
-+#define LUA_CDIR LUA_ROOT "lib/lua/"
+ #define LUA_LDIR LUA_ROOT "share/lua/5.1/"
+ #define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
#define LUA_PATH_DEFAULT \
- "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \
- LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua"
LUABITOP_DEPENDENCIES = lua
define LUABITOP_BUILD_CMDS
- $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
+ $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) INCLUDES="-I$(STAGING_DIR)/usr/include"
endef
define LUABITOP_INSTALL_TARGET_CMDS
- mkdir -p $(TARGET_DIR)/usr/lib/lua
- $(INSTALL) -p $(@D)/bit.so $(TARGET_DIR)/usr/lib/lua
+ $(INSTALL) -p $(@D)/bit.so $(TARGET_DIR)/usr/lib/lua/5.1
endef
$(eval $(generic-package))
endef
define LUACJSON_INSTALL_TARGET_CMDS
- install -D -m 0644 $(@D)/cjson.so $(TARGET_DIR)/usr/lib/lua/cjson.so
+ $(MAKE) DESTDIR="$(TARGET_DIR)" PREFIX="/usr" -C $(@D) install
endef
$(eval $(generic-package))
LUAEXPAT_MFLAGS += LUA_VERSION_NUM=501
-LUAEXPAT_MFLAGS += LUA_INC=$(STAGING_DIR)/usr/include/lua
+LUAEXPAT_MFLAGS += LUA_INC=$(STAGING_DIR)/usr/include
LUAEXPAT_MFLAGS += EXPAT_INC=$(STAGING_DIR)/usr/include
LUAEXPAT_MFLAGS += LIBNAME=lxp.so
LUAEXPAT_MFLAGS += LIB_OPTION="-shared -fPIC $(TARGET_CFLAGS)"
endef
define LUAEXPAT_INSTALL_TARGET_CMDS
- $(INSTALL) -D $(@D)/src/lxp.so $(TARGET_DIR)/usr/lib/lua/lxp.so
- $(INSTALL) -D -m 0644 $(@D)/src/lxp/lom.lua $(TARGET_DIR)/usr/share/lua/lxp/lom.lua
+ $(INSTALL) -D $(@D)/src/lxp.so $(TARGET_DIR)/usr/lib/lua/5.1/lxp.so
+ $(INSTALL) -D -m 0644 $(@D)/src/lxp/lom.lua $(TARGET_DIR)/usr/share/lua/5.1/lxp/lom.lua
endef
$(eval $(generic-package))
define LUAEXPATUTILS_INSTALL_TARGET_CMDS
$(INSTALL) -m 0644 -D $(@D)/lua/doc.lua \
- $(TARGET_DIR)/usr/share/lua/lxp/doc.lua
+ $(TARGET_DIR)/usr/share/lua/5.1/lxp/doc.lua
endef
$(eval $(generic-package))
endef
define LUAFILESYSTEM_INSTALL_TARGET_CMDS
- $(INSTALL) -D $(@D)/src/lfs.so $(TARGET_DIR)/usr/lib/lua/lfs.so
+ $(INSTALL) -D $(@D)/src/lfs.so $(TARGET_DIR)/usr/lib/lua/5.1/lfs.so
endef
$(eval $(generic-package))
+++ /dev/null
-Adjust installation location to /usr
-
-Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/src/luaconf.h
-===================================================================
---- a/src/luaconf.h
-+++ b/src/luaconf.h
-@@ -26,9 +26,9 @@
- ** Note to distribution maintainers: do NOT patch the following line!
- ** Please read ../doc/install.html#distro and pass PREFIX=/usr instead.
- */
--#define LUA_ROOT "/usr/local/"
--#define LUA_LDIR LUA_ROOT "share/lua/5.1/"
--#define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
-+#define LUA_ROOT "/usr/"
-+#define LUA_LDIR LUA_ROOT "share/lua/"
-+#define LUA_CDIR LUA_ROOT "lib/lua/"
- #ifdef LUA_XROOT
- #define LUA_JDIR LUA_XROOT "share/luajit-2.0.0/"
- #define LUA_XPATH \
LUAPOSIX_LICENSE = MIT
LUAPOSIX_LICENSE_FILES = COPYING
LUAPOSIX_DEPENDENCIES = luainterpreter host-lua
-LUAPOSIX_CONF_OPT = --libdir="/usr/lib/lua" --datarootdir="/usr/share/lua"
+LUAPOSIX_CONF_OPT = --libdir="/usr/lib/lua/5.1" --datarootdir="/usr/share/lua/5.1"
ifeq ($(BR2_PACKAGE_NCURSES),y)
LUAPOSIX_DEPENDENCIES += ncurses
endef
define LUASEC_INSTALL_TARGET_CMDS
- mkdir -p $(TARGET_DIR)/usr/share/lua
- mkdir -p $(TARGET_DIR)/usr/lib/lua
$(MAKE) -C $(@D) \
- LUAPATH="$(TARGET_DIR)/usr/share/lua" \
- LUACPATH="$(TARGET_DIR)/usr/lib/lua" install
+ LUAPATH="$(TARGET_DIR)/usr/share/lua/5.1" \
+ LUACPATH="$(TARGET_DIR)/usr/lib/lua/5.1" install
endef
$(eval $(generic-package))
define LUASOCKET_INSTALL_TARGET_CMDS
$(MAKE) -C $(@D) -f makefile \
- INSTALL_TOP_SHARE="$(TARGET_DIR)/usr/share/lua" \
- INSTALL_TOP_LIB="$(TARGET_DIR)/usr/lib/lua" install
+ INSTALL_TOP_SHARE="$(TARGET_DIR)/usr/share/lua/5.1" \
+ INSTALL_TOP_LIB="$(TARGET_DIR)/usr/lib/lua/5.1" install
endef
$(eval $(generic-package))
endef
define LUASQL_INSTALL_TARGET_CMDS
- $(MAKE) -C $(@D) $(LUASQL_MAKE_FLAGS) PREFIX=/usr \
- LUA_DIR="$(TARGET_DIR)/usr/share/lua" \
- LUA_LIBDIR="$(TARGET_DIR)/usr/lib/lua" install
+ $(MAKE) -C $(@D) $(LUASQL_MAKE_FLAGS) \
+ PREFIX="$(TARGET_DIR)/usr" install
endef
$(eval $(generic-package))
define ORBIT_INSTALL_TARGET_CMDS
$(MAKE) -C $(@D) \
- LUA_DIR=$(TARGET_DIR)/usr/share/lua/ \
+ LUA_DIR=$(TARGET_DIR)/usr/share/lua/5.1/ \
BIN_DIR=$(TARGET_DIR)/usr/bin \
install
endef
endef
define RINGS_INSTALL_TARGET_CMDS
- $(MAKE) -C $(@D) LUA_LIBDIR="$(TARGET_DIR)/usr/lib/lua" \
- LUA_DIR="$(TARGET_DIR)/usr/share/lua" install
+ $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)/usr" install
endef
$(eval $(generic-package))
WSAPI_LICENSE = MIT
define WSAPI_INSTALL_TARGET_CMDS
- mkdir -p $(TARGET_DIR)/usr/share/lua/wsapi
+ mkdir -p $(TARGET_DIR)/usr/share/lua/5.1/wsapi
$(INSTALL) -m 0644 -D $(@D)/src/wsapi/*.lua \
- $(TARGET_DIR)/usr/share/lua/wsapi
+ $(TARGET_DIR)/usr/share/lua/5.1/wsapi
endef
$(eval $(generic-package))
XAVANTE_LICENSE = MIT
define XAVANTE_INSTALL_TARGET_CMDS
- $(MAKE) -C $(@D) PREFIX=/usr \
- LUA_DIR="$(TARGET_DIR)/usr/share/lua" \
- LUA_LIBDIR="$(TARGET_DIR)/usr/lib/lua" install
+ $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)/usr" install
endef
$(eval $(generic-package))