jobextra/tor/PKGBUILD-arch

88 lines
3.3 KiB
Plaintext

# Maintainer: Lukas Fleischer <lfleischer@archlinux.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.8.10
pkgrel=1
pkgdesc='Anonymizing overlay network.'
arch=('x86_64')
url='https://www.torproject.org/download/tor/'
license=("BSD-3-Clause" "LGPL-3.0-only" "MIT")
depends=(
'bash'
'libcap.so'
'libcrypto.so'
'libevent'
'liblzma.so'
'libseccomp.so'
'libssl.so'
'libsystemd.so'
'libz.so'
'libzstd.so'
)
optdepends=('torsocks: for torify')
makedepends=('ca-certificates' 'systemd')
backup=('etc/tor/torrc')
source=("https://dist.torproject.org/${pkgname}-${pkgver}.tar.gz"{,.sha256sum{,.asc}}
'torrc.patch'
'tor.sysusers'
'tor.tmpfiles'
'tor.service')
sha256sums=('e628b4fab70edb4727715b23cf2931375a9f7685ac08f2c59ea498a178463a86'
'68eb49abb3f8aba6d417699cb333bf6cc944e8276cbf9b237402e23ff298bc83'
'SKIP'
'c5c082fd1cda30c95c40043d5be96926fa81e5388a97534373bf0ce100191ade'
'04eec05b4e61efccc58c5da657363f0c1059d7f122cb15c32331a201af2d7f94'
'07bedb17660a3673b31b0005b6505065c90b32f2c6b28b969241da675560f926'
'6354475c4ee4de0c1204ccc6ae20dea8e812f83f3134ee2d665592a2cfe327e5')
b2sums=('ef470664d85e019f6cac2366e934d5dc31b8ae92f121a2b4c8c95f8267abce5ce4413d30a24affa40a069d587212364ae5a7c3cd114488e50a535f01c54c6e77'
'1410a5e7e486c7c33b6b217a53d250bc3e1d76c87e74ad29f6c6a67cbdacb3627521cc8936f7e8e8d72c3333078cede222d13c825b8d66df7c1d50721043f89e'
'SKIP'
'98baf96cdac36072086f48bf4701cede6cf31eee207f4a1a4cfc81b483ba53b991082aaf4ed638e50dfd67fb006bbd915af97943ab658df29dfa51ea4aa77dd2'
'9053da53926f2120ac57b6c1442238f5bbd89bf9270347c4e00b721b39939bebc6adfcf814a9d7289dfd14d085d91c193529305336db93190da5b7f586a031df'
'5d55d9a7e42b6ce78b8ab985bab37afe8f0bacddb5abd895c4a490adb8f98b9422f90b40066fef05ecf37b7b21e80aadc615c4b7f6e12b05581304113a1b1f1d'
'79d35290cd40e407d3102366d585d37e3b50b41e30b7046f8b1c6a7ee199137701b3c5c4e63f5967d6185b66d675b71157d1ef673648162921323732bb0546cf')
validpgpkeys=(
'2133BC600AB133E1D826D173FE43009C4607B1FB' # Nick Mathewson
'B74417EDDF22AC9F9E90F49142E86A2A11F48D36' # David Goulet
'1C1BC007A9F607AA8152C040BEA7B180B1491921' # Alexander Færøy
)
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 \
--enable-gpl
make
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
mv "${pkgdir}"/etc/tor/torrc{.sample,}
# install arch custom files
install -Dm 644 "${srcdir}"/*.service -t "${pkgdir}"/usr/lib/systemd/system
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: