# $Id: PKGBUILD 79370 2012-11-03 16:57:39Z lfleischer $ # Maintainer: Lukas Fleischer # Contributor: simo pkgname=tor pkgver=0.2.2.39 pkgrel=2 pkgdesc='Anonymizing overlay network.' arch=('i686' 'x86_64') url='http://www.torproject.org/' license=('BSD') depends=('openssl' 'libevent' 'tsocks' 'bash') makedepends=('ca-certificates') backup=('etc/tor/torrc' 'etc/tor/torrc-dist' 'etc/tor/tor-tsocks.conf' 'etc/conf.d/tor') install='tor.install' source=("http://www.torproject.org/dist/${pkgname}-${pkgver}.tar.gz"{,.asc} 'torrc' 'tor' 'tor.conf.d' 'tor.service') md5sums=('9157a1f02fcda9d7d2c5744176373abd' '7944de0693fccf65fe0e3ea6712887b6' '56c75d4e8a66f34167d31e38c43793dd' 'f8e6868a389877346e7eebaacd1078bb' '5c7c6834064b3530c442def6079ac3aa' '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" mv "${pkgdir}/etc/tor/torrc.sample" "${pkgdir}/etc/tor/torrc-dist" install -Dm0644 "${srcdir}/torrc" "${pkgdir}/etc/tor/torrc" install -Dm0755 "${srcdir}/tor" "${pkgdir}/etc/rc.d/tor" install -Dm0644 "${srcdir}/tor.conf.d" "${pkgdir}/etc/conf.d/tor" install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" install -Dm0644 "${srcdir}/tor.service" "${pkgdir}/usr/lib/systemd/system/tor.service" }