From 808e68e140bf8d23d809bee4c87482c772257366 Mon Sep 17 00:00:00 2001 From: Jan Pavlinec Date: Fri, 1 Feb 2019 01:18:47 +0100 Subject: [PATCH] torsocks: add new package Signed-off-by: Jan Pavlinec --- net/torsocks/Makefile | 62 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 net/torsocks/Makefile diff --git a/net/torsocks/Makefile b/net/torsocks/Makefile new file mode 100644 index 0000000000..7cd1323962 --- /dev/null +++ b/net/torsocks/Makefile @@ -0,0 +1,62 @@ +# +# Copyright (C) 2017-2019 CZ.NIC, z. s. p. o. (https://www.nic.cz/) +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=torsocks +PKG_VERSION:=2.3.0 +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=https://people.torproject.org/~dgoulet/torsocks/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_HASH:=b9f1b981d6b3fd4e1820de1eee325f8a7038c84765d5a6cd9af12571d5cc3622 + +PKG_MAINTAINER:=Jan Pavlinec +PKG_LICENSE:=GPLv2 +PKG_LICENSE_FILES:=LICENSE + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk + +define Package/torsocks + SECTION:=net + CATEGORY:=Network + SUBMENU:=IP Addresses and Names + TITLE:=torsocks + URL:=https://trac.torproject.org/projects/tor/wiki/doc/torsocks + DEPENDS:=+tor +endef + +define Package/torsocks/description + Torsocks allows you to use most applications in a safe way with Tor. + It ensures that DNS requests are handled safely and explicitly rejects any traffic other than TCP from the application you're using. +endef + +define Build/Configure + $(call Build/Configure/Default) +ifeq ($(CONFIG_USE_UCLIBC),y) + find $(PKG_BUILD_DIR) -name 'Makefile' -exec sed -i 's|--param ssp-buffer-size=1 -fstack-protector-all||' \{\} \+ +endif +endef + +define Package/conffiles +/etc/tor/torsocks.conf +endef + +define Package/torsocks/install + $(INSTALL_DIR) $(1)/etc/tor/ + $(CP) $(PKG_INSTALL_DIR)/etc/tor/torsocks.conf $(1)/etc/tor/ + $(INSTALL_DIR) $(1)/usr/lib/torsocks + $(CP) $(PKG_INSTALL_DIR)/usr/lib/torsocks/libtorsocks.so* $(1)/usr/lib/torsocks/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/torsocks $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,torsocks)) -- 2.30.2