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.

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