You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.6 KiB

  1. #
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=lsqlite3
  9. PKG_VERSION:=0.9.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
  12. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  13. PKG_SOURCE_URL:=http://lua.sqlite.org/index.cgi/zip/lsqlite3_fsl09w.zip
  14. PKG_MD5SUM:=8e16ef4fda82eb73295bf2f1050d14f1
  15. PKG_LICENSE:=MIT
  16. PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_NAME)_fsl09w.zip
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/lsqlite3
  20. SUBMENU:=Lua
  21. SECTION:=lang
  22. CATEGORY:=Languages
  23. TITLE:=Lua wrapper for the SQLite3 library
  24. URL:=http://lua.sqlite.org
  25. DEPENDS:= +lua +libsqlite3
  26. endef
  27. define Package/lsqlite3/description
  28. LuaSQLite3 is a thin wrapper around the public domain SQLite3 database engine.
  29. endef
  30. TARGET_CFLAGS += $(FPIC) -std=gnu99
  31. TARGET_CPPFLAGS += -DLUA_USE_LINUX
  32. TARGET_LDFLAGS += -llua -lsqlite3 -lpthread
  33. define Build/Compile
  34. $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \
  35. -c $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.c \
  36. -o $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.o \
  37. -DSQLITE_VERSION="$(PKG_VERSION)"
  38. $(TARGET_CC) $(TARGET_LDFLAGS) -shared \
  39. $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.o \
  40. -o $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/lsqlite3.so
  41. endef
  42. define Package/lsqlite3/install
  43. $(INSTALL_DIR) $(1)/usr/lib/lua
  44. $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/*.so $(1)/usr/lib/lua/
  45. endef
  46. $(eval $(call BuildPackage,lsqlite3))