mirror of https://github.com/openwrt/packages.git
lua-lsqlite3: add build VARIANT for Lua5.3
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>pull/21924/head
parent
c2d7f6a02d
commit
9b38508b86
|
@ -18,27 +18,46 @@ PKG_HASH:=d38402aa7640055d260c1246c36e6d6d31b425a25a805431f13695694466b722
|
|||
PKG_LICENSE:=MIT
|
||||
PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(basename $(PKG_SOURCE))
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/lsqlite3-$(BUILD_VARIANT)/$(basename $(PKG_SOURCE))
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/lsqlite3
|
||||
define Package/lsqlite3/default
|
||||
SUBMENU:=Lua
|
||||
SECTION:=lang
|
||||
CATEGORY:=Languages
|
||||
TITLE:=Lua wrapper for the SQLite3 library
|
||||
URL:=http://lua.sqlite.org
|
||||
DEPENDS:= +lua +libsqlite3
|
||||
DEPENDS:=+libsqlite3
|
||||
endef
|
||||
|
||||
define Package/lsqlite3/description
|
||||
define Package/lsqlite3
|
||||
$(Package/lsqlite3/default)
|
||||
DEPENDS+=+liblua
|
||||
VARIANT:=lua-51
|
||||
endef
|
||||
|
||||
define Package/lsqlite3-lua5.3
|
||||
$(Package/lsqlite3/default)
|
||||
DEPENDS+=+liblua5.3
|
||||
VARIANT:=lua-53
|
||||
endef
|
||||
|
||||
define Package/lsqlite3/default/description
|
||||
LuaSQLite3 is a thin wrapper around the public domain SQLite3 database engine.
|
||||
endef
|
||||
|
||||
Package/lsqlite3/description = $(Package/lsqlite3/default/description)
|
||||
Package/lsqlite3-lua5.3/description = $(Package/lsqlite3/default/description)
|
||||
|
||||
TARGET_CFLAGS += $(FPIC) -std=gnu99
|
||||
TARGET_CPPFLAGS += -DLUA_USE_LINUX
|
||||
TARGET_LDFLAGS += -lsqlite3 -lpthread
|
||||
|
||||
ifeq ($(BUILD_VARIANT),lua-53)
|
||||
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/lua5.3
|
||||
endif
|
||||
|
||||
define Build/Compile
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \
|
||||
-c $(PKG_BUILD_DIR)/lsqlite3.c \
|
||||
|
@ -54,4 +73,10 @@ define Package/lsqlite3/install
|
|||
$(CP) $(PKG_BUILD_DIR)/*.so $(1)/usr/lib/lua/
|
||||
endef
|
||||
|
||||
define Package/lsqlite3-lua5.3/install
|
||||
$(INSTALL_DIR) $(1)/usr/local/lib/lua/5.3
|
||||
$(CP) $(PKG_BUILD_DIR)/*.so $(1)/usr/local/lib/lua/5.3
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,lsqlite3))
|
||||
$(eval $(call BuildPackage,lsqlite3-lua5.3))
|
||||
|
|
Loading…
Reference in New Issue