You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.2 KiB

# Maintainer: Nathan Owens <ndowens@artixlinux.org>
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: kpcyrd <kpcyrd[at]archlinux[dot]org>
# Contributor: Daniel Micay <danielmicay@gmail.com>
# Contributor: simo <simo@archlinux.org>
# Contributor: Sid Karunaratne
pkgname=tor
pkgver=0.4.7.8
pkgrel=1
pkgdesc='Anonymizing overlay network.'
arch=('x86_64')
url='https://www.torproject.org/download/tor/'
license=('BSD')
depends=('openssl' 'libevent' 'bash' 'libseccomp' 'zstd' 'libcap'
'libzstd.so' 'libseccomp.so' 'libcap.so')
optdepends=('torsocks: for torify')
makedepends=('ca-certificates')
backup=('etc/tor/torrc')
source=("https://dist.torproject.org/${pkgname}-${pkgver}.tar.gz"{,.sha256sum}
'torrc.patch'
'tor.sysusers'
'tor.tmpfiles')
b2sums=('40f6eab453d95a09e4531ce7cdb59715a21b84e1d0b1045d107add6a443fb7563a5747734b23e0e1dfda6490a5a7659f912e38c11cdb5fa635535dcff6169eeb'
'0fa1e094af83c74f46f87d0569a623bd3061b416f272d19326faf08ab6e9e926b14c2d46c99fba80d68f22188aa74c73e68477015e1c37382e4acb115d10a5a2'
'3359e138d823a77df2a42ce3fe8c6ecb4004e9ec191863db7857aceea7c136c78f09518b1a199dfd3215f5d61f1c060f4a0e2141c5bdb6b847af60fb6e9a81a7'
'9053da53926f2120ac57b6c1442238f5bbd89bf9270347c4e00b721b39939bebc6adfcf814a9d7289dfd14d085d91c193529305336db93190da5b7f586a031df'
'5d55d9a7e42b6ce78b8ab985bab37afe8f0bacddb5abd895c4a490adb8f98b9422f90b40066fef05ecf37b7b21e80aadc615c4b7f6e12b05581304113a1b1f1d')
prepare() {
# verify the signed sums match the expected source tarball
sha256sum -c ${pkgname}-${pkgver}.tar.gz.sha256sum
cd ${pkgname}-${pkgver}
# uncomment essential config sections in the torrc file
patch -Np1 < "${srcdir}/torrc.patch"
}
build() {
cd ${pkgname}-${pkgver}
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var
make
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
mv "${pkgdir}"/etc/tor/torrc{.sample,}
install -Dm 644 "${srcdir}"/tor.sysusers "${pkgdir}"/usr/lib/sysusers.d/tor.conf
install -Dm 644 "${srcdir}"/tor.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/tor.conf
install -Dm 644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}
}
# vim: ts=2 sw=2 et: