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.

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