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.

62 lines
1.7 KiB

  1. #
  2. # Copyright (C) 2017-2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
  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:=torsocks
  9. PKG_VERSION:=2.3.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_URL:=https://people.torproject.org/~dgoulet/torsocks/
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_HASH:=b9f1b981d6b3fd4e1820de1eee325f8a7038c84765d5a6cd9af12571d5cc3622
  14. PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
  15. PKG_LICENSE:=GPLv2
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_FIXUP:=autoreconf
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/torsocks
  22. SECTION:=net
  23. CATEGORY:=Network
  24. SUBMENU:=IP Addresses and Names
  25. TITLE:=torsocks
  26. URL:=https://trac.torproject.org/projects/tor/wiki/doc/torsocks
  27. DEPENDS:=+tor
  28. endef
  29. define Package/torsocks/description
  30. Torsocks allows you to use most applications in a safe way with Tor.
  31. It ensures that DNS requests are handled safely and explicitly rejects any traffic other than TCP from the application you're using.
  32. endef
  33. define Build/Configure
  34. $(call Build/Configure/Default)
  35. ifeq ($(CONFIG_USE_UCLIBC),y)
  36. find $(PKG_BUILD_DIR) -name 'Makefile' -exec sed -i 's|--param ssp-buffer-size=1 -fstack-protector-all||' \{\} \+
  37. endif
  38. endef
  39. define Package/conffiles
  40. /etc/tor/torsocks.conf
  41. endef
  42. define Package/torsocks/install
  43. $(INSTALL_DIR) $(1)/etc/tor/
  44. $(CP) $(PKG_INSTALL_DIR)/etc/tor/torsocks.conf $(1)/etc/tor/
  45. $(INSTALL_DIR) $(1)/usr/lib/torsocks
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib/torsocks/libtorsocks.so* $(1)/usr/lib/torsocks/
  47. $(INSTALL_DIR) $(1)/usr/bin
  48. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/torsocks $(1)/usr/bin/
  49. endef
  50. $(eval $(call BuildPackage,torsocks))