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.

100 lines
2.6 KiB

  1. #
  2. # Copyright (C) 2008-2016 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:=tor
  9. PKG_VERSION:=0.2.7.6
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://www.torproject.org/dist \
  13. https://archive.torproject.org/tor-package-archive
  14. PKG_MD5SUM:=cc19107b57136a68e8c563bf2d35b072
  15. PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de>
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/tor/Default
  20. SECTION:=net
  21. CATEGORY:=Network
  22. URL:=https://www.torproject.org/
  23. USERID:=tor=52:tor=52
  24. endef
  25. define Package/tor/Default/description
  26. Tor is a toolset for a wide range of organizations and people that want to
  27. improve their safety and security on the Internet. Using Tor can help you
  28. anonymize web browsing and publishing, instant messaging, IRC, SSH, and
  29. more. Tor also provides a platform on which software developers can build
  30. new applications with built-in anonymity, safety, and privacy features.
  31. endef
  32. define Package/tor
  33. $(call Package/tor/Default)
  34. TITLE:=An anonymous Internet communication system
  35. DEPENDS:=+libevent2 +libopenssl +libpthread +librt
  36. endef
  37. define Package/tor/description
  38. $(call Package/tor/Default/description)
  39. This package contains the tor daemon.
  40. endef
  41. define Package/tor-geoip
  42. $(call Package/tor/Default)
  43. TITLE:=GeoIP db for tor
  44. DEPENDS:=+tor
  45. endef
  46. define Package/tor-geoip/description
  47. $(call Package/tor/Default/description)
  48. This package contains a GeoIP database mapping IP addresses to countries.
  49. endef
  50. define Package/tor/conffiles
  51. /etc/tor/torrc
  52. endef
  53. CONFIGURE_ARGS += \
  54. --with-libevent-dir="$(STAGING_DIR)/usr" \
  55. --with-ssl-dir="$(STAGING_DIR)/usr" \
  56. --disable-asciidoc \
  57. --disable-seccomp
  58. ifneq ($(CONFIG_SSP_SUPPORT),y)
  59. CONFIGURE_ARGS += \
  60. --disable-gcc-hardening
  61. MAKE_FLAGS += \
  62. CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
  63. else
  64. MAKE_FLAGS += \
  65. CFLAGS="$(TARGET_CFLAGS) -fPIC -std=gnu99"
  66. endif
  67. CONFIGURE_VARS += \
  68. CROSS_COMPILE="yes"
  69. define Package/tor/install
  70. $(INSTALL_DIR) $(1)/usr/sbin
  71. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tor $(1)/usr/sbin/
  72. $(INSTALL_DIR) $(1)/etc/init.d
  73. $(INSTALL_BIN) ./files/tor.init $(1)/etc/init.d/tor
  74. $(INSTALL_DIR) $(1)/etc/tor
  75. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/tor/torrc.sample $(1)/etc/tor/torrc
  76. endef
  77. define Package/tor-geoip/install
  78. $(INSTALL_DIR) $(1)/usr/share/tor
  79. $(CP) $(PKG_INSTALL_DIR)/usr/share/tor/geoip $(1)/usr/share/tor/
  80. endef
  81. $(eval $(call BuildPackage,tor))
  82. $(eval $(call BuildPackage,tor-geoip))