2 # Copyright (C) 2008-2019 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://dist.torproject.org
/ \
16 https
://archive.torproject.org
/tor-package-archive
17 PKG_HASH
:=2079172cce034556f110048e26083ce9bea751f3154b0ad2809751815b11ea9d
18 PKG_MAINTAINER
:=Hauke Mehrtens
<hauke@hauke-m.de
> \
19 Peter Wagner
<tripolar@gmx.at
>
20 PKG_LICENSE_FILES
:=LICENSE
21 PKG_CPE_ID
:=cpe
:/a
:torproject
:tor
26 PKG_BUILD_FLAGS
:=gc-sections lto
28 include $(INCLUDE_DIR
)/package.mk
30 define Package
/tor
/Default
33 URL
:=https
://www.torproject.org
/
35 DEPENDS
:=+libevent2
+libopenssl
+libpthread
+librt
+zlib
+libcap
36 TITLE
:=Tor routing daemon
39 define Package
/tor
/Default
/description
40 Tor is a toolset for a wide range of organizations and people that want to
41 improve their safety and security on the Internet. Using Tor can help you
42 anonymize web browsing and publishing
, instant messaging
, IRC
, SSH
, and
43 more. Tor also provides a platform on which software developers can build
44 new applications with built-in anonymity
, safety
, and privacy features.
48 $(call Package
/tor
/Default
)
55 define Package
/tor
/description
56 $(call Package
/tor
/Default
/description
)
58 This package contains the full tor daemon.
62 define Package
/tor-basic
63 $(call Package
/tor
/Default
)
64 TITLE
+= (no bridge
/relay support
)
68 define Package
/tor-basic
/description
69 $(call Package
/tor
/Default
/description
)
71 This package contains the basic tor daemon
, without bridge
/relay support.
75 define Package
/tor-gencert
76 $(call Package
/tor
/Default
)
77 TITLE
:=Tor certificate generation
81 define Package
/tor-gencert
/description
82 $(call Package
/tor
/Default
/description
)
84 Generate certs and keys for Tor directory authorities.
88 define Package
/tor-resolve
89 $(call Package
/tor
/Default
)
90 TITLE
:=tor hostname resolve
94 define Package
/tor-resolve
/description
95 $(call Package
/tor
/Default
/description
)
97 Resolve a hostname to an IP address via tor.
101 define Package
/tor-geoip
102 $(call Package
/tor
/Default
)
103 TITLE
:=GeoIP db for tor
107 define Package
/tor-geoip
/description
108 $(call Package
/tor
/Default
/description
)
110 This package contains a GeoIP database mapping IP addresses to countries.
114 define Package
/tor
/conffiles
116 /var
/lib
/tor
/fingerprint
121 Package
/tor-basic
/conffiles
= $(Package
/tor
/conffiles
)
124 --with-libevent-dir
="$(STAGING_DIR)/usr" \
125 --with-openssl-dir
="$(STAGING_DIR)/usr" \
126 --with-zlib-dir
="$(STAGING_DIR)/usr" \
128 --disable-html-manual \
131 --disable-libscrypt \
132 --disable-unittests \
135 --with-tor-user
=tor \
136 --with-tor-group
=tor \
139 ifeq ($(BUILD_VARIANT
),basic
)
140 CONFIGURE_ARGS
+= --disable-module-relay
144 TARGET_CFLAGS
+= $(if
$(CONFIG_OPENSSL_ENGINE
),,-DDISABLE_ENGINES
)
147 CROSS_COMPILE
="yes" \
148 ac_cv_func_mallinfo
=no
150 define Package
/tor
/install
151 $(INSTALL_DIR
) $(1)/usr
/sbin
152 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/tor
$(1)/usr
/sbin
/
153 $(INSTALL_DIR
) $(1)/etc
/init.d
154 $(INSTALL_BIN
) .
/files
/tor.init
$(1)/etc
/init.d
/tor
155 $(INSTALL_DIR
) $(1)/etc
/tor
156 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/tor
/torrc.sample
$(1)/etc
/tor
/torrc
157 $(INSTALL_DIR
) $(1)/etc
/config
158 $(INSTALL_CONF
) .
/files
/tor.conf
$(1)/etc
/config
/tor
161 Package
/tor-basic
/install = $(Package
/tor
/install)
163 define Package
/tor-gencert
/install
164 $(INSTALL_DIR
) $(1)/usr
/sbin
165 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/tor-gencert
$(1)/usr
/sbin
/
168 define Package
/tor-resolve
/install
169 $(INSTALL_DIR
) $(1)/usr
/sbin
170 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/tor-resolve
$(1)/usr
/sbin
/
173 define Package
/tor-geoip
/install
174 $(INSTALL_DIR
) $(1)/usr
/share
/tor
176 $(PKG_INSTALL_DIR
)/usr
/share
/tor
/geoip \
177 $(PKG_INSTALL_DIR
)/usr
/share
/tor
/geoip6 \
181 $(eval
$(call BuildPackage
,tor
))
182 $(eval
$(call BuildPackage
,tor-basic
))
183 $(eval
$(call BuildPackage
,tor-gencert
))
184 $(eval
$(call BuildPackage
,tor-resolve
))
185 $(eval
$(call BuildPackage
,tor-geoip
))