| 1 |
package=tor_linux |
| 2 |
$(package)_version=0.4.8.16 |
| 3 |
$(package)_download_path=https://dist.torproject.org/ |
| 4 |
$(package)_file_name=tor-$($(package)_version).tar.gz |
| 5 |
$(package)_sha256_hash=6540dd377a120fb8e7d27530aa3b7ff72a0fa5b4f670fe1d64c987c1cfd390cb |
| 6 |
$(package)_dependencies=libevent openssl zlib |
| 7 |
|
| 8 |
define $(package)_set_vars |
| 9 |
$(package)_config_opts=--disable-asciidoc --disable-manpage --disable-html-manual --disable-system-torrc |
| 10 |
$(package)_config_opts+=--disable-module-relay --disable-lzma --disable-zstd |
| 11 |
$(package)_config_opts+=--with-libevent-dir=$(host_prefix) --with-openssl-dir=$(host_prefix) |
| 12 |
$(package)_config_opts+=--with-zlib-dir=$(host_prefix) --disable-tool-name-check --enable-fatal-warnings |
| 13 |
$(package)_config_opts+=--prefix=$(host_prefix) |
| 14 |
$(package)_config_opts_x86_64+=--enable-static-tor |
| 15 |
$(package)_cflags+=-O2 |
| 16 |
$(package)_cxxflags+=-O2 |
| 17 |
$(package)_ldflags+=$(guix_ldflags) |
| 18 |
endef |
| 19 |
|
| 20 |
define $(package)_preprocess_cmds |
| 21 |
rm -rf doc/man |
| 22 |
endef |
| 23 |
|
| 24 |
define $(package)_config_cmds |
| 25 |
$($(package)_autoconf) $($(package)_config_opts) |
| 26 |
endef |
| 27 |
|
| 28 |
define $(package)_build_cmds |
| 29 |
$(MAKE) |
| 30 |
endef |
| 31 |
|
| 32 |
define $(package)_stage_cmds |
| 33 |
$(MAKE) DESTDIR=$($(package)_staging_dir) install |
| 34 |
endef |
| 35 |
|
| 36 |
define $(package)_postprocess_cmds |
| 37 |
$(host_toolchain)strip -s -D bin/tor && \ |
| 38 |
mkdir $($(package)_staging_prefix_dir)/Tor/ && \ |
| 39 |
cp bin/tor $($(package)_staging_prefix_dir)/Tor |
| 40 |
endef |