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.

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