# Contributor: Sam Dodrill # Maintainer: Sam Dodrill pkgname=tor pkgver=0.2.8.7 pkgrel=0 pkgdesc="Anonymous network connectivity" url="https://www.torproject.org" arch="all" license="BSD" pkgusers="tor" depends="" makedepends="linux-headers bash libevent-dev openssl-dev ca-certificates" install="$pkgname.pre-install" subpackages="$pkgname-doc" source="https://www.torproject.org/dist/$pkgname-$pkgver.tar.gz tor.initd tor.confd" builddir="$srcdir/$pkgname-$pkgver" build() { cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --enable-transparent \ || return 1 make || return 1 } package() { cd "$builddir" make DESTDIR="$pkgdir" install || return 1 # Uncomment logging to file. sed -Ei 's/^#*(Log notice file.*)/\1/' \ "$pkgdir"/etc/tor/torrc.sample || return 1 install -dm755 -o $pkgusers \ "$pkgdir"/var/lib/$pkgname \ "$pkgdir"/var/log/$pkgname || return 1 install -m755 -D "$srcdir"/$pkgname.initd \ "$pkgdir"/etc/init.d/$pkgname || return 1 install -m644 -D "$srcdir"/$pkgname.confd \ "$pkgdir"/etc/conf.d/$pkgname || return 1 } md5sums="59771fe2d098893fe955edfb8b13401f tor-0.2.8.7.tar.gz fb939d073a7a51e9814c10d1aabec0ce tor.initd e05a796ffc4981c22c167de11fa36ef9 tor.confd" sha256sums="ae44e2b699e82db7ff318432fd558dfa941ad154e4055f16d208514951742fc6 tor-0.2.8.7.tar.gz 04800394384a6ce4cad13bb1ffb8650a7ce799a574d897c0166180c19dd34f88 tor.initd 41d780f291847e19f632428bbf27c3f289414afd237546d2974da1b75384c25c tor.confd" sha512sums="79156110804497509564d53a806dc8237e97755556bbaaed83d0f6a3470942a480e53693a7192996bad2b33fe1f77f60eb45e8122af9bfdc4a8f12b943cbc660 tor-0.2.8.7.tar.gz 8dd2f56697b730881fa7e67088b0860a753fb7c3dad9eb3d2af6eb7b9cfa10aaaf01628e65cb139d423bdb97075b4b5fa72e44ffc80ea3f810ceff6429ec3d2a tor.initd 9028ac41e3acdf4405095addb69537e87edecafaec840296ac27a5a8992fe132dc822e4e4abb8826f76460c438da2719dea17859690d03e17198a82086a3d660 tor.confd"