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.

158 lines
4.0 KiB

  1. #
  2. # Copyright (C) 2009-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. include $(INCLUDE_DIR)/uclibc++.mk
  9. BASE_VERSION:=4.7.25
  10. PKG_NAME:=db47
  11. PKG_VERSION:=$(BASE_VERSION).4.NC
  12. PKG_RELEASE:=2
  13. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/db-$(BASE_VERSION).NC
  14. PKG_SOURCE:=db-$(BASE_VERSION).NC.tar.gz
  15. PKG_SOURCE_URL:=http://download.oracle.com/berkeley-db/
  16. PKG_MD5SUM:=073ab7f20d24b3872a51ca762f5090e7
  17. PKG_MAINTAINER:=Marcel Denia <naoir@gmx.net>
  18. PKG_LICENSE:=Sleepycat
  19. PKG_LICENSE_FILES:=LICENSE
  20. PKG_FIXUP:=autoreconf
  21. PKG_LIBTOOL_PATHS:=. build_unix
  22. PKG_BUILD_PARALLEL:=1
  23. include $(INCLUDE_DIR)/package.mk
  24. define Package/libdb47/Default
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. DEPENDS:=+libxml2
  28. PROVIDES:=libdb47
  29. URL:=http://www.oracle.com/us/products/database/berkeley-db
  30. endef
  31. define Package/libdb47/Default/description
  32. Berkeley DB library (4.7).
  33. endef
  34. define Package/libdb47
  35. $(call Package/libdb47/Default)
  36. VARIANT:=small
  37. TITLE:=Berkeley DB library (4.7) (without statistics etc. support)
  38. endef
  39. define Package/libdb47/description
  40. $(call Package/libdb47/Default/description)
  41. This package is not built with statistics etc. support.
  42. endef
  43. define Package/libdb47-full
  44. $(call Package/libdb47/Default)
  45. VARIANT:=full
  46. TITLE:=Berkeley DB library (4.7) (with statistics etc. support)
  47. endef
  48. define Package/libdb47-full/description
  49. $(call Package/libdb47/Default/description)
  50. This package is built with statistics etc. support.
  51. endef
  52. define Package/libdb47xx/Default
  53. SECTION:=libs
  54. CATEGORY:=Libraries
  55. DEPENDS:=+libdb47 $(CXX_DEPENDS)
  56. URL:=http://www.oracle.com/us/products/database/berkeley-db
  57. endef
  58. define Package/libdb47xx/Default/description
  59. Berkeley DB library (4.7). C++ wrapper.
  60. endef
  61. define Package/libdb47xx
  62. $(call Package/libdb47xx/Default)
  63. VARIANT:=small
  64. TITLE:=Berkeley DB library (4.7) for C++ (without statistics etc. support)
  65. endef
  66. define Package/libdb47xx/description
  67. $(call Package/libdb47xx/Default/description)
  68. This package is not built with statistics etc. support.
  69. endef
  70. define Package/libdb47xx-full
  71. $(call Package/libdb47xx/Default)
  72. VARIANT:=full
  73. TITLE:=Berkeley DB library (4.7) for C++ (with statistics etc. support)
  74. endef
  75. define Package/libdb47xx-full/description
  76. $(call Package/libdb47xx/Default/description)
  77. This package is built with statistics etc. support.
  78. endef
  79. CONFIGURE_PATH = build_unix
  80. CONFIGURE_CMD = ../dist/configure
  81. CONFIGURE_ARGS += \
  82. --enable-shared \
  83. --enable-static \
  84. --disable-java \
  85. --with-mutex=UNIX/fcntl \
  86. --disable-tcl \
  87. --disable-rpc \
  88. --enable-compat185 \
  89. --disable-debug \
  90. --enable-cryptography \
  91. $(if $(CONFIG_PACKAGE_libdb47xx),--enable-cxx,--disable-cxx)
  92. ifeq ($(BUILD_VARIANT),small)
  93. CONFIGURE_ARGS += --enable-smallbuild
  94. endif
  95. TARGET_CFLAGS += $(FPIC)
  96. define Build/Compile
  97. +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/build_unix \
  98. DESTDIR="$(PKG_INSTALL_DIR)" all
  99. $(MAKE) -C $(PKG_BUILD_DIR)/build_unix \
  100. DESTDIR="$(PKG_INSTALL_DIR)" install
  101. endef
  102. define Package/libdb47/install
  103. $(INSTALL_DIR) $(1)/usr/lib
  104. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb-*.so $(1)/usr/lib/
  105. endef
  106. define Package/libdb47-full/install
  107. $(INSTALL_DIR) $(1)/usr/lib
  108. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb-*.so $(1)/usr/lib/
  109. endef
  110. define Package/libdb47xx/install
  111. $(INSTALL_DIR) $(1)/usr/lib
  112. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb_cxx-*.so $(1)/usr/lib/
  113. endef
  114. define Package/libdb47xx-full/install
  115. $(INSTALL_DIR) $(1)/usr/lib
  116. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb_cxx-*.so $(1)/usr/lib/
  117. endef
  118. define Build/InstallDev
  119. $(INSTALL_DIR) $(1)/usr/include
  120. $(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(1)/usr/include/
  121. $(CP) $(PKG_INSTALL_DIR)/usr/include/db_cxx.h $(1)/usr/include/
  122. $(INSTALL_DIR) $(1)/usr/lib/
  123. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(1)/usr/lib
  124. endef
  125. $(eval $(call BuildPackage,libdb47))
  126. $(eval $(call BuildPackage,libdb47-full))
  127. $(eval $(call BuildPackage,libdb47xx))
  128. $(eval $(call BuildPackage,libdb47xx-full))