tor.mk 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. ################################################################################
  2. #
  3. # tor
  4. #
  5. ################################################################################
  6. TOR_VERSION = 0.4.8.13
  7. TOR_SITE = https://dist.torproject.org
  8. TOR_LICENSE = BSD-3-Clause
  9. TOR_LICENSE_FILES = LICENSE
  10. TOR_CPE_ID_VENDOR = torproject
  11. TOR_SELINUX_MODULES = tor
  12. TOR_DEPENDENCIES = libevent openssl zlib
  13. TOR_CONF_OPTS = \
  14. --disable-gcc-hardening \
  15. --disable-unittests \
  16. --with-libevent-dir=$(STAGING_DIR)/usr \
  17. --with-openssl-dir=$(STAGING_DIR)/usr \
  18. --with-zlib-dir=$(STAGING_DIR)/usr
  19. ifeq ($(BR2_STATIC_LIBS),y)
  20. TOR_CONF_OPTS += \
  21. --enable-static-libevent \
  22. --enable-static-openssl \
  23. --enable-static-tor \
  24. --enable-static-zlib
  25. endif
  26. ifeq ($(BR2_PACKAGE_LIBCAP),y)
  27. TOR_DEPENDENCIES += libcap
  28. endif
  29. ifeq ($(BR2_PACKAGE_SYSTEMD),y)
  30. TOR_CONF_OPTS += --enable-systemd
  31. TOR_DEPENDENCIES += host-pkgconf systemd
  32. else
  33. TOR_CONF_OPTS += --disable-systemd
  34. endif
  35. ifeq ($(BR2_PACKAGE_XZ),y)
  36. TOR_CONF_OPTS += --enable-lzma
  37. TOR_DEPENDENCIES += host-pkgconf xz
  38. else
  39. TOR_CONF_OPTS += --disable-lzma
  40. endif
  41. ifeq ($(BR2_PACKAGE_ZSTD),y)
  42. TOR_CONF_OPTS += --enable-zstd
  43. TOR_DEPENDENCIES += host-pkgconf zstd
  44. else
  45. TOR_CONF_OPTS += --disable-zstd
  46. endif
  47. ifeq ($(BR2_arm)$(BR2_armeb)$(BR2_i386)$(BR2_x86_64)$(BR2_PACKAGE_LIBSECCOMP),yy)
  48. TOR_CONF_OPTS += --enable-seccomp
  49. TOR_DEPENDENCIES += libseccomp
  50. else
  51. TOR_CONF_OPTS += --disable-seccomp
  52. endif
  53. # uses gnu extensions
  54. TOR_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
  55. ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
  56. TOR_LIBS += -latomic
  57. endif
  58. ifeq ($(BR2_STATIC_LIBS),y)
  59. TOR_LIBS += -lz
  60. endif
  61. TOR_CONF_ENV += LIBS="$(TOR_LIBS)"
  62. define TOR_INSTALL_CONF
  63. $(INSTALL) -D -m 644 $(@D)/src/config/torrc.minimal \
  64. $(TARGET_DIR)/etc/tor/torrc
  65. endef
  66. TOR_POST_INSTALL_TARGET_HOOKS += TOR_INSTALL_CONF
  67. $(eval $(autotools-package))