# Maintainer: UtG # contributor Giuseppe CalĂ  pkgname=tor pkgver=0.2.4.21 pkgrel=1 pkgdesc="Anonymizing overlay network" arch=('x86_64') url="http://www.torproject.org/" license=('BSD') depends=('openssl' 'libevent' 'tsocks' 'bash') backup=('etc/tor/torrc' 'etc/tor/torrc-dist' 'etc/tor/tor-tsocks.conf') categories=('network') install=${pkgname}.install option=('!docs' '!emptydirs') source=("http://www.torproject.org/dist/${pkgname}-${pkgver}.tar.gz" 'torrc' 'tor.conf.d' 'tor.service') md5sums=('bde981d10e8faf1e171ef1ebbb7b398a' 'bb7b85a70c2997a3e05f023c97768f5e' 'f656f3e93f0c2ed46464d9b784876dbc' '98901f7dfa85b352b806ba7b0d66b7d0') build() { cd "${srcdir}/${pkgname}-${pkgver}" ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var make } package() { cd "${srcdir}/${pkgname}-${pkgver}" make DESTDIR="${pkgdir}" install install -dm0700 "${pkgdir}/var/lib/tor" # Install config files mv "${pkgdir}/etc/tor/torrc.sample" "${pkgdir}/etc/tor/torrc-dist" install -Dm0644 "${srcdir}/torrc" "${pkgdir}/etc/tor/torrc" install -Dm0644 "${srcdir}/tor.conf.d" "${pkgdir}/etc/conf.d/tor" # Install systemd service file install -Dm0644 "${srcdir}/tor.service" "${pkgdir}/usr/lib/systemd/system/tor.service" # Install license install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" }