summaryrefslogtreecommitdiff
path: root/community/tor/PKGBUILD
blob: 680ef00a148d4310ba93cbd6a189b0edbf9ae7d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# $Id: PKGBUILD 71511 2012-05-27 21:52:24Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: simo <simo@archlinux.org>

pkgname=tor
pkgver=0.2.2.36
pkgrel=1
pkgdesc='Anonymizing overlay network.'
arch=('i686' 'x86_64' 'mips64el')
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')
md5sums=('620b2110086aba01236b57f1d5aba416'
         '0401cf01ad0bcc9aba4f9c1bb5e8e810'
         '56c75d4e8a66f34167d31e38c43793dd'
         'f8e6868a389877346e7eebaacd1078bb'
         '5c7c6834064b3530c442def6079ac3aa')

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"
}