mongodb.mk 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. ################################################################################
  2. #
  3. # mongodb
  4. #
  5. ################################################################################
  6. MONGODB_VERSION_BASE = 3.3.4
  7. MONGODB_VERSION = r$(MONGODB_VERSION_BASE)
  8. MONGODB_SITE = $(call github,mongodb,mongo,$(MONGODB_VERSION))
  9. MONGODB_LICENSE = AGPL-3.0, Apache-2.0
  10. MONGODB_LICENSE_FILES = GNU-AGPL-3.0.txt APACHE-2.0.txt
  11. MONGODB_DEPENDENCIES = host-scons
  12. MONGODB_SCONS_TARGETS = mongod mongos
  13. MONGODB_SCONS_ENV = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \
  14. -j"$(PARALLEL_JOBS)"
  15. MONGODB_SCONS_OPTS = --disable-warnings-as-errors
  16. # need to pass mongo version when not building from git repo
  17. MONGODB_SCONS_OPTS += MONGO_VERSION=$(MONGODB_VERSION_BASE)-
  18. # WiredTiger database storage engine only supported on 64 bits
  19. ifeq ($(BR2_ARCH_IS_64),y)
  20. MONGODB_SCONS_OPTS += --wiredtiger=on
  21. else
  22. MONGODB_SCONS_OPTS += --wiredtiger=off
  23. endif
  24. # JavaScript scripting engine and tcmalloc supported only on
  25. # x86/x86-64 systems. Mongo target is a shell interface that
  26. # depends on the javascript engine, so it will also only be
  27. # built on x86/x86-64 systems.
  28. ifeq ($(BR2_i386)$(BR2_x86_64),y)
  29. MONGODB_SCONS_OPTS += --js-engine=mozjs --allocator=tcmalloc
  30. MONGODB_SCONS_TARGETS += mongo
  31. else
  32. MONGODB_SCONS_OPTS += --js-engine=none --allocator=system
  33. endif
  34. ifeq ($(BR2_PACKAGE_OPENSSL),y)
  35. MONGODB_DEPENDENCIES += openssl
  36. MONGODB_SCONS_OPTS += --ssl=SSL
  37. endif
  38. define MONGODB_BUILD_CMDS
  39. (cd $(@D); \
  40. $(SCONS) \
  41. $(MONGODB_SCONS_ENV) \
  42. $(MONGODB_SCONS_OPTS) \
  43. $(MONGODB_SCONS_TARGETS))
  44. endef
  45. define MONGODB_INSTALL_TARGET_CMDS
  46. (cd $(@D); \
  47. $(SCONS) \
  48. $(MONGODB_SCONS_ENV) \
  49. $(MONGODB_SCONS_OPTS) \
  50. --prefix=$(TARGET_DIR)/usr \
  51. install)
  52. endef
  53. $(eval $(generic-package))