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.

88 lines
2.5 KiB

  1. #
  2. # Copyright (C) 2007-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:=libzdb
  9. PKG_VERSION:=3.2
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://www.tildeslash.com/libzdb/dist/
  13. PKG_HASH:=005ddf4b29c6db622e16303298c2f914dfd82590111cea7cfd09b4acf46cf4f2
  14. PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
  15. PKG_LICENSE:=GPL-3.0-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_BUILD_DEPENDS:=libzdb/host
  20. include $(INCLUDE_DIR)/uclibc++.mk
  21. include $(INCLUDE_DIR)/package.mk
  22. # libzdb needs to find iconv when linking to libmariadb
  23. include $(INCLUDE_DIR)/nls.mk
  24. include $(INCLUDE_DIR)/host-build.mk
  25. define Package/libzdb
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. TITLE:=A thread-safe multi database connection pool library
  29. URL:=https://www.tildeslash.com/libzdb/
  30. DEPENDS:=+libsqlite3 +libpq +libmysqlclient +zlib +libpthread +libopenssl
  31. endef
  32. define Package/libzdb/description
  33. zdb is a database library with thread-safe connection pooling. The library can connect
  34. transparently to multiple database systems. It has zero runtime configuration and connections
  35. are specified via a URL scheme. A modern object-oriented API is provided.
  36. zdb supports MySQL, PostgreSQL, SQLite, and Oracle.
  37. NOTE: This package does not include Oracle support.
  38. endef
  39. CONFIGURE_ARGS += \
  40. --disable-profiling \
  41. --enable-optimized \
  42. --enable-protected \
  43. --enable-sqliteunlock \
  44. --enable-openssl
  45. CONFIGURE_VARS += \
  46. libzdb_cv_setjmp_available=yes \
  47. libzdb_cv_vsnprintf_c11_conformant=yes
  48. define Hooks/HostConfigure/Pre
  49. endef
  50. define Host/Configure
  51. endef
  52. define Host/Compile
  53. $(HOSTCC) $(HOST_BUILD_DIR)/tools/filterh/lex.yy.c -o $(HOST_BUILD_DIR)/tools/bin/filterh
  54. endef
  55. define Host/Install
  56. $(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
  57. $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/bin/filterh $(STAGING_DIR_HOSTPKG)/bin/
  58. endef
  59. define Build/InstallDev
  60. $(INSTALL_DIR) $(1)/usr/include/zdb
  61. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  62. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/zdb/* $(1)/usr/include/
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzdb* $(1)/usr/lib/
  64. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/zdb.pc $(1)/usr/lib/pkgconfig
  65. endef
  66. define Package/libzdb/install
  67. $(INSTALL_DIR) $(1)/usr/lib
  68. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzdb.so* $(1)/usr/lib/
  69. endef
  70. $(eval $(call HostBuild))
  71. $(eval $(call BuildPackage,libzdb))