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.

98 lines
2.4 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=lmdb
  3. PKG_VERSION:=0.9.24
  4. PKG_RELEASE:=3
  5. PKG_SOURCE:=LMDB_$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://codeload.github.com/LMDB/lmdb/tar.gz/LMDB_$(PKG_VERSION)?
  7. PKG_HASH:=44602436c52c29d4f301f55f6fd8115f945469b868348e3cddaf91ab2473ea26
  8. PKG_BUILD_DIR:=$(BUILD_DIR)/lmdb-LMDB_$(PKG_VERSION)
  9. PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
  10. PKG_LICENSE:=OLDAP-2.8
  11. PKG_LICENSE_FILES:=LICENSE
  12. PKG_INSTALL:=1
  13. include $(INCLUDE_DIR)/package.mk
  14. MAKE_PATH:=libraries/liblmdb
  15. define Package/lmdb/Default
  16. SECTION:=libs
  17. CATEGORY:=Libraries
  18. TITLE:=Lightning Memory-Mapped Database
  19. URL:=https://symas.com/lmdb/
  20. endef
  21. define Package/lmdb
  22. $(call Package/lmdb/Default)
  23. TITLE+= shared library
  24. endef
  25. define Package/lmdb/description
  26. LMDB is an ultra-fast, ultra-compact key-value
  27. embedded data store developed for the OpenLDAP Project.
  28. endef
  29. define Package/lmdb-utils
  30. $(call Package/lmdb/Default)
  31. TITLE+= utils
  32. MDEPENDS+= lmdb
  33. endef
  34. define Package/lmdb-utils/description
  35. LMDB environment status and copy tool
  36. endef
  37. define Package/lmdb-test
  38. $(call Package/lmdb/Default)
  39. TITLE+= test
  40. MDEPENDS+= lmdb
  41. endef
  42. define Package/lmdb-test/description
  43. LMDB test application
  44. endef
  45. define Build/Prepare
  46. $(call Build/Prepare/Default)
  47. $(SED) 's,%%PKG_VERSION%%,$(PKG_VERSION),g' $(PKG_BUILD_DIR)/liblmdb.pc
  48. endef
  49. define Build/Compile
  50. $(MAKE) -C "$(PKG_BUILD_DIR)/$(MAKE_PATH)/" \
  51. CC="$(TARGET_CC)" \
  52. CFLAGS+="$(TARGET_CFLAGS)" \
  53. LDFLAGS+="$(TARGET_LDFLAGS) $(if $(CONFIG_USE_GLIBC),-lpthread)" \
  54. FPIC="$(FPIC)" \
  55. AR="$(TARGET_AR)"
  56. endef
  57. define Build/InstallDev
  58. $(INSTALL_DIR) $(1)/usr/include
  59. $(INSTALL_DIR) $(1)/usr/lib
  60. $(CP) $(PKG_BUILD_DIR)/$(MAKE_PATH)/lmdb.h $(1)/usr/include
  61. $(CP) $(PKG_BUILD_DIR)/$(MAKE_PATH)/liblmdb.{a,so} $(1)/usr/lib
  62. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
  63. $(CP) $(PKG_BUILD_DIR)/liblmdb.pc $(1)/usr/lib/pkgconfig/lmdb.pc
  64. endef
  65. define Package/lmdb/install
  66. $(INSTALL_DIR) $(1)/usr/lib
  67. $(CP) $(PKG_INSTALL_DIR)/usr/local/lib/*.so $(1)/usr/lib
  68. endef
  69. define Package/lmdb-utils/install
  70. $(INSTALL_DIR) $(1)/usr/bin
  71. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/mdb_{stat,copy,dump,load} $(1)/usr/bin
  72. endef
  73. define Package/lmdb-test/install
  74. $(INSTALL_DIR) $(1)/usr/bin
  75. $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(MAKE_PATH)/mtest $(1)/usr/bin
  76. endef
  77. $(eval $(call BuildPackage,lmdb))
  78. $(eval $(call BuildPackage,lmdb-utils))
  79. $(eval $(call BuildPackage,lmdb-test))