desktop/tor/PKGBUILD
2017-12-11 00:32:15 +00:00

57 lines
1.5 KiB
Bash

pkgname=tor
pkgver=0.3.1.9
pkgrel=1
pkgdesc="Anonymizing overlay network"
arch=('x86_64')
url="http://www.torproject.org/"
license=('BSD')
depends=('openssl' 'libevent' 'torsocks' 'bash' 'libseccomp')
makedepends=('ca-certificates')
backup=('etc/tor/torrc' 'etc/tor/torrc-dist')
conflicts=('vidalia') # to enforce removal of unsupported software, not really conflicts
categories=('network')
install=$pkgname.install
option=('!docs' '!emptydirs')
source=("http://www.torproject.org/dist/"${srcdir}/${pkgname}-${pkgver}".tar.gz"{,.asc}
'torrc')
md5sums=('585e62d086ae7df7cd873f735d726118'
'SKIP'
'173621ad48f0052b95eb9786a1c0302c')
validpgpkeys=('B35BF85BF19489D04E28C33C21194EBB165733EA'
'2133BC600AB133E1D826D173FE43009C4607B1FB')
build() {
cd $pkgname-$pkgver
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-systemd
make
}
check() {
cd $pkgname-$pkgver
make test
make check
}
package() {
cd $pkgname-$pkgver
make DESTDIR=$pkgdir install
install -dm0700 $pkgdir/var/lib/tor
# Install config files
install -Dm0644 ../torrc $pkgdir/etc/tor/torrc
# install -Dm0644 ../tor.conf.d $pkgdir/etc/conf.d/tor
# Install systemd service file
sed -i 's/WatchdogSec=1m/#WatchdogSec=1m/g' contrib/dist/tor.service
install -Dm0644 contrib/dist/tor.service $pkgdir/usr/lib/systemd/system/tor.service
# Install license
install -Dm0644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
}