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.

93 lines
2.4 KiB

  1. #
  2. # Copyright (C) 2007-2014 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:=libzdb
  9. PKG_VERSION:=3.0
  10. PKG_RELEASE:=1
  11. PKG_LICENSE:=GPL-3.0
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=http://www.tildeslash.com/libzdb/dist/
  14. PKG_MD5SUM:=3bb9efff10a1f3ebc5b76c1055c48635
  15. PKG_FIXUP:=autoreconf
  16. PKG_INSTALL:=1
  17. PKG_BUILD_DEPENDS:=libzdb/host
  18. include $(INCLUDE_DIR)/package.mk
  19. ifeq ($(CONFIG_USE_MUSL),n)
  20. LDFLAGS += -lnsl
  21. endif
  22. define Package/libzdb
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=A thread-safe multi database connection pool library
  26. MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
  27. URL:=http://www.tildeslash.com/libzdb/
  28. DEPENDS:=+libsqlite3 +libpq +libmysqlclient +zlib +libpthread +libopenssl
  29. endef
  30. define Package/libzdb/description
  31. zdb is a database library with thread-safe connection pooling. The library can connect
  32. transparently to multiple database systems. It has zero runtime configuration and connections
  33. are specified via a URL scheme. A modern object-oriented API is provided.
  34. zdb supports MySQL, PostgreSQL, SQLite, and Oracle.
  35. NOTE: This package does not include Oracle support.
  36. endef
  37. CONFIGURE_ARGS += --disable-profiling \
  38. --enable-optimized \
  39. --with-mysql \
  40. --with-postgresql \
  41. --with-sqlite \
  42. --enable-sqliteunlock \
  43. --enable-openssl
  44. TARGET_CPPFLAGS += -std=c99
  45. include $(INCLUDE_DIR)/host-build.mk
  46. define Hooks/HostConfigure/Pre
  47. endef
  48. define Host/Configure
  49. endef
  50. define Host/Compile
  51. $(HOSTCC) $(HOST_BUILD_DIR)/tools/filterh/lex.yy.c -o $(HOST_BUILD_DIR)/tools/bin/filterh
  52. endef
  53. define Host/Install
  54. $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
  55. $(CP) $(HOST_BUILD_DIR)/tools/bin/filterh $(STAGING_DIR_HOST)/bin/
  56. endef
  57. $(eval $(call HostBuild))
  58. define Build/Compile
  59. $(call Build/Compile/Default)
  60. endef
  61. define Build/InstallDev
  62. $(INSTALL_DIR) $(1)/usr/include/zdb
  63. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  64. $(CP) $(PKG_INSTALL_DIR)/usr/include/zdb/ $(1)/usr/include/
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzdb* $(1)/usr/lib/
  66. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/zdb.pc $(1)/usr/lib/pkgconfig
  67. endef
  68. define Package/libzdb/install
  69. $(INSTALL_DIR) $(1)/usr/lib
  70. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzdb.so* $(1)/usr/lib/
  71. endef
  72. $(eval $(call BuildPackage,libzdb))