PORTNAME=	arti
DISTVERSION=	0.4.0
PORTREVISION=	1
CATEGORIES=	security

MAINTAINER=	cs@FreeBSD.org
COMMENT=	Implementation of Tor, in Rust

LICENSE=	MIT

USES=		cargo sqlite ssl
USE_RC_SUBR=	arti
#GROUPS=		_arti
#USERS=		_arti
#SUB_LIST=	USER="${USERS}" GROUP="${GROUPS}"
#PLIST_SUB=	USER="${USERS}" GROUP="${GROUPS}"
USE_GITLAB=	yes
GL_SITE=	https://gitlab.torproject.org
GL_ACCOUNT=	tpo/core
GL_COMMIT=	4326aa1de9875ea399c3a608c0320bbe4b214a42
CARGO_FEATURES=	tokio rustls
CARGO_INSTALL=	no
CARGO_CRATES=	addr2line-0.17.0 \
		adler-1.0.2 \
		aes-0.8.1 \
		ahash-0.7.6 \
		aho-corasick-0.7.18 \
		ansi_term-0.12.1 \
		anyhow-1.0.57 \
		arrayref-0.3.6 \
		async-broadcast-0.4.0 \
		async-channel-1.6.1 \
		async-compression-0.3.14 \
		async-ctrlc-1.2.0 \
		async-executor-1.4.1 \
		async-global-executor-2.0.4 \
		async-io-1.7.0 \
		async-lock-2.5.0 \
		async-mutex-1.4.0 \
		async-native-tls-0.4.0 \
		async-process-1.4.0 \
		async-rustls-0.2.0 \
		async-std-1.11.0 \
		async-task-4.2.0 \
		async-trait-0.1.53 \
		async_executors-0.6.0 \
		asynchronous-codec-0.6.0 \
		atomic-0.5.1 \
		atomic-waker-1.0.0 \
		atty-0.2.14 \
		autocfg-0.1.8 \
		autocfg-1.1.0 \
		backtrace-0.3.65 \
		base64-0.13.0 \
		base64ct-1.1.1 \
		bitflags-1.3.2 \
		blanket-0.2.0 \
		block-buffer-0.9.0 \
		block-buffer-0.10.2 \
		blocking-1.2.0 \
		bounded-vec-deque-0.1.1 \
		bumpalo-3.9.1 \
		byteorder-1.4.3 \
		bytes-1.1.0 \
		cache-padded-1.2.0 \
		cc-1.0.73 \
		cfg-if-0.1.10 \
		cfg-if-1.0.0 \
		cipher-0.4.3 \
		clap-2.34.0 \
		coarsetime-0.1.22 \
		concurrent-queue-1.2.2 \
		config-0.13.1 \
		const-oid-0.6.2 \
		convert_case-0.4.0 \
		core-foundation-0.9.3 \
		core-foundation-sys-0.8.3 \
		cpufeatures-0.2.2 \
		crc32fast-1.3.2 \
		crossbeam-channel-0.5.4 \
		crossbeam-queue-0.3.5 \
		crossbeam-utils-0.8.8 \
		crypto-bigint-0.2.11 \
		crypto-common-0.1.3 \
		ctor-0.1.22 \
		ctr-0.9.1 \
		ctrlc-3.2.2 \
		curve25519-dalek-3.2.1 \
		darling-0.14.1 \
		darling_core-0.14.1 \
		darling_macro-0.14.1 \
		data-encoding-2.3.2 \
		der-0.4.5 \
		derive_builder_core_fork_arti-0.11.2 \
		derive_builder_fork_arti-0.11.2 \
		derive_builder_macro_fork_arti-0.11.2 \
		derive_more-0.99.17 \
		digest-0.9.0 \
		digest-0.10.3 \
		directories-4.0.1 \
		dirs-4.0.0 \
		dirs-next-2.0.0 \
		dirs-sys-0.3.7 \
		dirs-sys-next-0.1.2 \
		displaydoc-0.2.3 \
		downcast-rs-1.2.0 \
		dyn-clone-1.0.5 \
		easy-parallel-3.2.0 \
		ed25519-1.5.2 \
		ed25519-dalek-1.0.1 \
		educe-0.4.19 \
		either-1.6.1 \
		enum-as-inner-0.4.0 \
		enum-ordinalize-3.1.11 \
		env_logger-0.5.13 \
		event-listener-2.5.2 \
		fallible-iterator-0.2.0 \
		fallible-streaming-iterator-0.1.9 \
		fastrand-1.7.0 \
		filetime-0.2.16 \
		flate2-1.0.23 \
		float-cmp-0.9.0 \
		float-ord-0.3.2 \
		float_eq-0.7.0 \
		fluid-let-1.0.0 \
		fnv-1.0.7 \
		foreign-types-0.3.2 \
		foreign-types-shared-0.1.1 \
		form_urlencoded-1.0.1 \
		fsevent-0.4.0 \
		fsevent-sys-2.0.1 \
		fslock-0.2.1 \
		fuchsia-zircon-0.3.3 \
		fuchsia-zircon-sys-0.3.3 \
		futures-0.3.21 \
		futures-await-test-0.3.0 \
		futures-await-test-macro-0.3.0 \
		futures-channel-0.3.21 \
		futures-core-0.3.21 \
		futures-executor-0.3.21 \
		futures-io-0.3.21 \
		futures-lite-1.12.0 \
		futures-macro-0.3.21 \
		futures-sink-0.3.21 \
		futures-task-0.3.21 \
		futures-util-0.3.21 \
		generic-array-0.14.5 \
		getrandom-0.1.16 \
		getrandom-0.2.6 \
		gimli-0.26.1 \
		gloo-timers-0.2.4 \
		hashbrown-0.11.2 \
		hashlink-0.7.0 \
		heck-0.4.0 \
		hermit-abi-0.1.19 \
		hex-0.4.3 \
		hex-literal-0.3.4 \
		hkdf-0.12.3 \
		hmac-0.12.1 \
		http-0.2.7 \
		http-body-0.4.5 \
		httparse-1.7.1 \
		httpdate-1.0.2 \
		humantime-1.3.0 \
		humantime-2.1.0 \
		humantime-serde-1.1.1 \
		hyper-0.14.18 \
		ident_case-1.0.1 \
		idna-0.2.3 \
		inotify-0.7.1 \
		inotify-sys-0.1.5 \
		inout-0.1.3 \
		instant-0.1.12 \
		iovec-0.1.4 \
		ipnet-2.5.0 \
		itertools-0.10.3 \
		itoa-1.0.2 \
		jobserver-0.1.24 \
		js-sys-0.3.57 \
		keccak-0.1.2 \
		kernel32-sys-0.2.2 \
		kv-log-macro-1.0.7 \
		lazy_static-1.4.0 \
		lazycell-1.3.0 \
		libc-0.2.126 \
		libm-0.2.2 \
		libsqlite3-sys-0.24.2 \
		lock_api-0.4.7 \
		log-0.4.17 \
		lzma-sys-0.1.17 \
		matchers-0.1.0 \
		matches-0.1.9 \
		memchr-2.5.0 \
		memmap2-0.5.3 \
		merlin-2.0.1 \
		minimal-lexical-0.2.1 \
		miniz_oxide-0.5.1 \
		mio-0.6.23 \
		mio-0.8.3 \
		mio-extras-2.0.6 \
		miow-0.2.2 \
		native-tls-0.2.10 \
		net2-0.2.37 \
		nix-0.24.1 \
		nom-7.1.1 \
		notify-4.0.17 \
		num-bigint-0.4.3 \
		num-bigint-dig-0.7.0 \
		num-integer-0.1.45 \
		num-iter-0.1.43 \
		num-traits-0.2.15 \
		num_cpus-1.13.1 \
		num_threads-0.1.6 \
		object-0.28.4 \
		once_cell-1.12.0 \
		opaque-debug-0.3.0 \
		openssl-0.10.40 \
		openssl-macros-0.1.0 \
		openssl-probe-0.1.5 \
		openssl-src-111.20.0+1.1.1o \
		openssl-sys-0.9.73 \
		parking-2.0.0 \
		parking_lot-0.11.2 \
		parking_lot-0.12.0 \
		parking_lot_core-0.8.5 \
		parking_lot_core-0.9.3 \
		paste-1.0.7 \
		pathdiff-0.2.1 \
		pem-0.8.3 \
		pem-rfc7468-0.2.4 \
		percent-encoding-2.1.0 \
		phf-0.10.1 \
		phf_generator-0.10.0 \
		phf_macros-0.10.0 \
		phf_shared-0.10.0 \
		pin-project-1.0.10 \
		pin-project-internal-1.0.10 \
		pin-project-lite-0.2.9 \
		pin-utils-0.1.0 \
		pkcs1-0.2.4 \
		pkcs8-0.7.6 \
		pkg-config-0.3.25 \
		polling-2.2.0 \
		postage-0.5.0 \
		ppv-lite86-0.2.16 \
		proc-macro-error-1.0.4 \
		proc-macro-error-attr-1.0.4 \
		proc-macro-hack-0.5.19 \
		proc-macro2-1.0.39 \
		quick-error-1.2.3 \
		quickcheck-1.0.3 \
		quote-1.0.18 \
		rand-0.7.3 \
		rand-0.8.5 \
		rand_chacha-0.2.2 \
		rand_chacha-0.3.1 \
		rand_core-0.5.1 \
		rand_core-0.6.3 \
		rand_hc-0.2.0 \
		redox_syscall-0.2.13 \
		redox_users-0.4.3 \
		regex-1.5.6 \
		regex-automata-0.1.10 \
		regex-syntax-0.6.26 \
		remove_dir_all-0.5.3 \
		retain_mut-0.1.9 \
		ring-0.16.20 \
		rlimit-0.8.3 \
		rmp-0.8.11 \
		rmp-serde-1.1.0 \
		rsa-0.5.0 \
		rusqlite-0.27.0 \
		rustc-demangle-0.1.21 \
		rustc_version-0.4.0 \
		rustls-0.19.1 \
		rustversion-1.0.6 \
		ryu-1.0.10 \
		same-file-1.0.6 \
		sanitize-filename-0.4.0 \
		schannel-0.1.20 \
		scopeguard-1.1.0 \
		sct-0.6.1 \
		security-framework-2.6.1 \
		security-framework-sys-2.6.1 \
		semver-1.0.9 \
		serde-1.0.137 \
		serde_derive-1.0.137 \
		serde_ignored-0.1.3 \
		serde_json-1.0.81 \
		serde_test-1.0.137 \
		serial_test-0.6.0 \
		serial_test_derive-0.6.0 \
		sha-1-0.10.0 \
		sha2-0.9.9 \
		sha2-0.10.2 \
		sha3-0.10.1 \
		sharded-slab-0.1.4 \
		shellexpand-fork-2.1.1 \
		signal-hook-0.3.14 \
		signal-hook-registry-1.4.0 \
		signature-1.5.0 \
		simple_asn1-0.6.1 \
		siphasher-0.3.10 \
		slab-0.4.6 \
		smallvec-1.8.0 \
		socket2-0.4.4 \
		spin-0.5.2 \
		spki-0.4.1 \
		static_assertions-1.1.0 \
		strsim-0.8.0 \
		strsim-0.10.0 \
		strum-0.24.0 \
		strum_macros-0.24.0 \
		subtle-2.4.1 \
		syn-1.0.95 \
		synstructure-0.12.6 \
		tempfile-3.3.0 \
		termcolor-1.1.3 \
		test-cert-gen-0.8.0 \
		textwrap-0.11.0 \
		thiserror-1.0.31 \
		thiserror-impl-1.0.31 \
		thread_local-1.1.4 \
		time-0.3.9 \
		time-macros-0.2.4 \
		tinystr-0.6.0 \
		tinyvec-1.6.0 \
		tinyvec_macros-0.1.0 \
		tls-api-0.8.0 \
		tls-api-native-tls-0.8.0 \
		tls-api-test-0.8.0 \
		tokio-1.18.2 \
		tokio-macros-1.7.0 \
		tokio-socks-0.5.1 \
		tokio-util-0.7.2 \
		toml-0.5.9 \
		tower-service-0.3.1 \
		tracing-0.1.34 \
		tracing-appender-0.2.2 \
		tracing-attributes-0.1.21 \
		tracing-core-0.1.26 \
		tracing-journald-0.3.0 \
		tracing-log-0.1.3 \
		tracing-subscriber-0.3.11 \
		tracing-test-0.2.1 \
		tracing-test-macro-0.2.1 \
		trust-dns-proto-0.21.2 \
		try-lock-0.2.3 \
		typenum-1.15.0 \
		unicode-bidi-0.3.8 \
		unicode-ident-1.0.0 \
		unicode-normalization-0.1.19 \
		unicode-width-0.1.9 \
		unicode-xid-0.2.3 \
		untrusted-0.6.2 \
		untrusted-0.7.1 \
		url-2.2.2 \
		users-0.11.0 \
		valuable-0.1.0 \
		value-bag-1.0.0-alpha.9 \
		vcpkg-0.2.15 \
		vec_map-0.8.2 \
		version_check-0.9.4 \
		visibility-0.0.1 \
		visible-0.0.1 \
		void-1.0.2 \
		waker-fn-1.1.0 \
		walkdir-2.3.2 \
		want-0.3.0 \
		wasi-0.9.0+wasi-snapshot-preview1 \
		wasi-0.10.2+wasi-snapshot-preview1 \
		wasi-0.11.0+wasi-snapshot-preview1 \
		wasm-bindgen-0.2.80 \
		wasm-bindgen-backend-0.2.80 \
		wasm-bindgen-futures-0.4.30 \
		wasm-bindgen-macro-0.2.80 \
		wasm-bindgen-macro-support-0.2.80 \
		wasm-bindgen-shared-0.2.80 \
		weak-table-0.3.2 \
		web-sys-0.3.57 \
		webpki-0.21.4 \
		webpki-0.22.0 \
		wepoll-ffi-0.1.2 \
		winapi-0.2.8 \
		winapi-0.3.9 \
		winapi-build-0.1.1 \
		winapi-i686-pc-windows-gnu-0.4.0 \
		winapi-util-0.1.5 \
		winapi-x86_64-pc-windows-gnu-0.4.0 \
		windows-sys-0.36.1 \
		windows_aarch64_msvc-0.36.1 \
		windows_i686_gnu-0.36.1 \
		windows_i686_msvc-0.36.1 \
		windows_x86_64_gnu-0.36.1 \
		windows_x86_64_msvc-0.36.1 \
		ws2_32-sys-0.2.1 \
		x25519-dalek-1.2.0 \
		x509-signature-0.5.0 \
		xz2-0.1.6 \
		zeroize-1.3.0 \
		zeroize_derive-1.3.2 \
		zstd-0.11.2+zstd.1.5.2 \
		zstd-safe-5.0.2+zstd.1.5.2 \
		zstd-sys-2.0.1+zstd.1.5.2

do-install:
	${INSTALL_SCRIPT} ${CARGO_TARGET_DIR}/${CARGO_BUILD_TARGET}/*/arti ${STAGEDIR}${PREFIX}/bin/arti

post-install:
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/arti
	@${MKDIR} ${STAGEDIR}${ETCDIR} ${STAGEDIR}/var/log/arti ${STAGEDIR}/var/run/arti ${STAGEDIR}/var/db/arti
	${INSTALL_DATA} ${WRKSRC}/crates/arti/src/arti-example-config.toml ${STAGEDIR}${ETCDIR}/arti.toml.sample

.include <bsd.port.mk>
