46 lines
1.4 KiB
Bash
46 lines
1.4 KiB
Bash
# Template file for 'tor'
|
|
pkgname=tor
|
|
version=0.4.8.12
|
|
revision=1
|
|
build_style=gnu-configure
|
|
configure_args="--enable-gpl"
|
|
hostmakedepends="pkg-config"
|
|
makedepends="libcap-devel libevent-devel libscrypt-devel libseccomp-devel liblzma-devel zlib-devel libzstd-devel"
|
|
depends="ca-certificates"
|
|
checkdepends="coccinelle python3"
|
|
short_desc="Anonymizing overlay network"
|
|
maintainer="Daniel Eyßer <daniel.eysser@gmail.com>"
|
|
license="BSD-3-Clause, GPL-3.0-only"
|
|
homepage="https://www.torproject.org/"
|
|
changelog="https://gitlab.torproject.org/tpo/core/tor/-/raw/main/ChangeLog"
|
|
distfiles="https://dist.torproject.org/tor-${version}.tar.gz"
|
|
checksum=ca7cc735d98e3747b58f2f3cc14f804dd789fa0fb333a84dcb6bd70adbb8c874
|
|
|
|
case "${XBPS_TARGET_MACHINE}" in
|
|
# Tests just don't work here
|
|
x86_64-musl) make_check=no ;;
|
|
esac
|
|
|
|
conf_files="/etc/tor/torrc"
|
|
system_accounts="tor"
|
|
tor_homedir="/var/lib/tor"
|
|
make_dirs="/var/lib/tor 0700 tor tor"
|
|
|
|
pre_configure() {
|
|
# ensure convenient config
|
|
printf '%s\n' \
|
|
"## On startup, setuid to this user and setgid to their primary group." \
|
|
"## Can not be changed while tor is running." \
|
|
"User tor" >> src/config/torrc.sample.in
|
|
vsed -i src/config/torrc.sample.in \
|
|
-e 's:#Log notice syslog:Log notice syslog:' \
|
|
-e "s:#DataDirectory :DataDirectory :"
|
|
}
|
|
|
|
post_install() {
|
|
mv ${DESTDIR}/etc/tor/torrc.sample ${DESTDIR}/etc/tor/torrc
|
|
vlicense LICENSE
|
|
vdoc doc/torrc_format.txt
|
|
vsv tor
|
|
}
|