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