xref: /OK3568_Linux_fs/buildroot/package/tor/tor.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# tor
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunTOR_VERSION = 0.4.6.8
8*4882a593SmuzhiyunTOR_SITE = https://dist.torproject.org
9*4882a593SmuzhiyunTOR_LICENSE = BSD-3-Clause
10*4882a593SmuzhiyunTOR_LICENSE_FILES = LICENSE
11*4882a593SmuzhiyunTOR_CPE_ID_VENDOR = torproject
12*4882a593SmuzhiyunTOR_SELINUX_MODULES = tor
13*4882a593SmuzhiyunTOR_DEPENDENCIES = libevent openssl zlib
14*4882a593SmuzhiyunTOR_AUTORECONF = YES
15*4882a593Smuzhiyun
16*4882a593SmuzhiyunTOR_CONF_OPTS = \
17*4882a593Smuzhiyun	--disable-gcc-hardening \
18*4882a593Smuzhiyun	--disable-unittests \
19*4882a593Smuzhiyun	--with-libevent-dir=$(STAGING_DIR)/usr \
20*4882a593Smuzhiyun	--with-openssl-dir=$(STAGING_DIR)/usr \
21*4882a593Smuzhiyun	--with-zlib-dir=$(STAGING_DIR)/usr
22*4882a593Smuzhiyun
23*4882a593Smuzhiyunifeq ($(BR2_STATIC_LIBS),y)
24*4882a593SmuzhiyunTOR_CONF_OPTS += \
25*4882a593Smuzhiyun	--enable-static-libevent \
26*4882a593Smuzhiyun	--enable-static-openssl \
27*4882a593Smuzhiyun	--enable-static-tor \
28*4882a593Smuzhiyun	--enable-static-zlib
29*4882a593Smuzhiyunendif
30*4882a593Smuzhiyun
31*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBCAP),y)
32*4882a593SmuzhiyunTOR_DEPENDENCIES += libcap
33*4882a593Smuzhiyunendif
34*4882a593Smuzhiyun
35*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_SYSTEMD),y)
36*4882a593SmuzhiyunTOR_CONF_OPTS += --enable-systemd
37*4882a593SmuzhiyunTOR_DEPENDENCIES += host-pkgconf systemd
38*4882a593Smuzhiyunelse
39*4882a593SmuzhiyunTOR_CONF_OPTS += --disable-systemd
40*4882a593Smuzhiyunendif
41*4882a593Smuzhiyun
42*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_XZ),y)
43*4882a593SmuzhiyunTOR_CONF_OPTS += --enable-lzma
44*4882a593SmuzhiyunTOR_DEPENDENCIES += host-pkgconf xz
45*4882a593Smuzhiyunelse
46*4882a593SmuzhiyunTOR_CONF_OPTS += --disable-lzma
47*4882a593Smuzhiyunendif
48*4882a593Smuzhiyun
49*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_ZSTD),y)
50*4882a593SmuzhiyunTOR_CONF_OPTS += --enable-zstd
51*4882a593SmuzhiyunTOR_DEPENDENCIES += host-pkgconf zstd
52*4882a593Smuzhiyunelse
53*4882a593SmuzhiyunTOR_CONF_OPTS += --disable-zstd
54*4882a593Smuzhiyunendif
55*4882a593Smuzhiyun
56*4882a593Smuzhiyunifeq ($(BR2_arm)$(BR2_armeb)$(BR2_i386)$(BR2_x86_64)$(BR2_PACKAGE_LIBSECCOMP),yy)
57*4882a593SmuzhiyunTOR_CONF_OPTS += --enable-seccomp
58*4882a593SmuzhiyunTOR_DEPENDENCIES += libseccomp
59*4882a593Smuzhiyunelse
60*4882a593SmuzhiyunTOR_CONF_OPTS += --disable-seccomp
61*4882a593Smuzhiyunendif
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun# uses gnu extensions
64*4882a593SmuzhiyunTOR_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
65*4882a593Smuzhiyun
66*4882a593Smuzhiyunifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
67*4882a593SmuzhiyunTOR_CONF_ENV += LIBS=-latomic
68*4882a593Smuzhiyunendif
69*4882a593Smuzhiyun
70*4882a593Smuzhiyundefine TOR_INSTALL_CONF
71*4882a593Smuzhiyun	$(INSTALL) -D -m 644 $(@D)/src/config/torrc.minimal \
72*4882a593Smuzhiyun		$(TARGET_DIR)/etc/tor/torrc
73*4882a593Smuzhiyunendef
74*4882a593Smuzhiyun
75*4882a593SmuzhiyunTOR_POST_INSTALL_TARGET_HOOKS += TOR_INSTALL_CONF
76*4882a593Smuzhiyun
77*4882a593Smuzhiyun$(eval $(autotools-package))
78