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
:=ca7cc735d98e3747b58f2f3cc14f804dd789fa0fb333a84dcb6bd70adbb8c874
18 PKG_MAINTAINER
:=Hauke Mehrtens
<hauke@hauke-m.de
> \
19 Peter Wagner
<tripolar@gmx.at
>
20 PKG_LICENSE
:=BSD-3-Clause
21 PKG_LICENSE_FILES
:=LICENSE
22 PKG_CPE_ID
:=cpe
:/a
:torproject
:tor
27 PKG_BUILD_FLAGS
:=gc-sections lto
29 include $(INCLUDE_DIR
)/package.mk
31 define Package
/tor
/Default
34 URL
:=https
://www.torproject.org
/
36 DEPENDS
:=+libevent2
+libopenssl
+libpthread
+librt
+zlib
+libcap
37 TITLE
:=Tor routing daemon
40 define Package
/tor
/Default
/description
41 Tor is a toolset for a wide range of organizations and people that want to
42 improve their safety and security on the Internet. Using Tor can help you
43 anonymize web browsing and publishing
, instant messaging
, IRC
, SSH
, and
44 more. Tor also provides a platform on which software developers can build
45 new applications with built-in anonymity
, safety
, and privacy features.
49 $(call Package
/tor
/Default
)
56 define Package
/tor
/description
57 $(call Package
/tor
/Default
/description
)
59 This package contains the full tor daemon.
63 define Package
/tor-basic
64 $(call Package
/tor
/Default
)
65 TITLE
+= (no bridge
/relay support
)
69 define Package
/tor-basic
/description
70 $(call Package
/tor
/Default
/description
)
72 This package contains the basic tor daemon
, without bridge
/relay support.
76 define Package
/tor-gencert
77 $(call Package
/tor
/Default
)
78 TITLE
:=Tor certificate generation
82 define Package
/tor-gencert
/description
83 $(call Package
/tor
/Default
/description
)
85 Generate certs and keys for Tor directory authorities.
89 define Package
/tor-resolve
90 $(call Package
/tor
/Default
)
91 TITLE
:=tor hostname resolve
95 define Package
/tor-resolve
/description
96 $(call Package
/tor
/Default
/description
)
98 Resolve a hostname to an IP address via tor.
102 define Package
/tor-geoip
103 $(call Package
/tor
/Default
)
104 TITLE
:=GeoIP db for tor
108 define Package
/tor-geoip
/description
109 $(call Package
/tor
/Default
/description
)
111 This package contains a GeoIP database mapping IP addresses to countries.
115 define Package
/tor
/conffiles
117 /var
/lib
/tor
/fingerprint
122 Package
/tor-basic
/conffiles
= $(Package
/tor
/conffiles
)
125 --with-libevent-dir
="$(STAGING_DIR)/usr" \
126 --with-openssl-dir
="$(STAGING_DIR)/usr" \
127 --with-zlib-dir
="$(STAGING_DIR)/usr" \
129 --disable-html-manual \
132 --disable-libscrypt \
133 --disable-unittests \
136 --with-tor-user
=tor \
137 --with-tor-group
=tor \
140 ifeq ($(BUILD_VARIANT
),basic
)
141 CONFIGURE_ARGS
+= --disable-module-relay
145 TARGET_CFLAGS
+= $(if
$(CONFIG_OPENSSL_ENGINE
),,-DDISABLE_ENGINES
)
148 CROSS_COMPILE
="yes" \
149 ac_cv_func_mallinfo
=no
151 define Package
/tor
/install
152 $(INSTALL_DIR
) $(1)/usr
/sbin
153 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/tor
$(1)/usr
/sbin
/
154 $(INSTALL_DIR
) $(1)/etc
/init.d
155 $(INSTALL_BIN
) .
/files
/tor.init
$(1)/etc
/init.d
/tor
156 $(INSTALL_DIR
) $(1)/etc
/tor
157 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/tor
/torrc.sample
$(1)/etc
/tor
/torrc
158 $(INSTALL_DIR
) $(1)/etc
/config
159 $(INSTALL_CONF
) .
/files
/tor.conf
$(1)/etc
/config
/tor
162 Package
/tor-basic
/install = $(Package
/tor
/install)
164 define Package
/tor-gencert
/install
165 $(INSTALL_DIR
) $(1)/usr
/sbin
166 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/tor-gencert
$(1)/usr
/sbin
/
169 define Package
/tor-resolve
/install
170 $(INSTALL_DIR
) $(1)/usr
/sbin
171 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/tor-resolve
$(1)/usr
/sbin
/
174 define Package
/tor-geoip
/install
175 $(INSTALL_DIR
) $(1)/usr
/share
/tor
177 $(PKG_INSTALL_DIR
)/usr
/share
/tor
/geoip \
178 $(PKG_INSTALL_DIR
)/usr
/share
/tor
/geoip6 \
182 $(eval
$(call BuildPackage
,tor
))
183 $(eval
$(call BuildPackage
,tor-basic
))
184 $(eval
$(call BuildPackage
,tor-gencert
))
185 $(eval
$(call BuildPackage
,tor-resolve
))
186 $(eval
$(call BuildPackage
,tor-geoip
))