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.

57 lines
1.4 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.5
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=lsqlite3_fsl09y.zip
  12. PKG_SOURCE_URL:=http://lua.sqlite.org/index.cgi/zip/
  13. PKG_HASH:=d38402aa7640055d260c1246c36e6d6d31b425a25a805431f13695694466b722
  14. PKG_LICENSE:=MIT
  15. PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/$(basename $(PKG_SOURCE))
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/lsqlite3
  19. SUBMENU:=Lua
  20. SECTION:=lang
  21. CATEGORY:=Languages
  22. TITLE:=Lua wrapper for the SQLite3 library
  23. URL:=http://lua.sqlite.org
  24. DEPENDS:= +lua +libsqlite3
  25. endef
  26. define Package/lsqlite3/description
  27. LuaSQLite3 is a thin wrapper around the public domain SQLite3 database engine.
  28. endef
  29. TARGET_CFLAGS += $(FPIC) -std=gnu99
  30. TARGET_CPPFLAGS += -DLUA_USE_LINUX
  31. TARGET_LDFLAGS += -lsqlite3 -lpthread
  32. define Build/Compile
  33. $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) \
  34. -c $(PKG_BUILD_DIR)/lsqlite3.c \
  35. -o $(PKG_BUILD_DIR)/lsqlite3.o \
  36. -DLSQLITE_VERSION=\"$(PKG_VERSION)\"
  37. $(TARGET_CC) $(TARGET_LDFLAGS) -shared \
  38. $(PKG_BUILD_DIR)/lsqlite3.o \
  39. -o $(PKG_BUILD_DIR)/lsqlite3.so
  40. endef
  41. define Package/lsqlite3/install
  42. $(INSTALL_DIR) $(1)/usr/lib/lua
  43. $(CP) $(PKG_BUILD_DIR)/*.so $(1)/usr/lib/lua/
  44. endef
  45. $(eval $(call BuildPackage,lsqlite3))