PKGBUILD 1.63 KB
Newer Older
1
pkgname=tor
Jeff Huang's avatar
Jeff Huang committed
2
pkgver=0.4.3.6
abveritas's avatar
abveritas committed
3
pkgrel=1
4
pkgdesc="Anonymizing overlay network"
abveritas's avatar
abveritas committed
5
arch=('x86_64')
Jeff Huang's avatar
Jeff Huang committed
6
url="https://www.torproject.org/"
7
license=('BSD')
Jeff Huang's avatar
Jeff Huang committed
8
depends=('openssl' 'libevent' 'torsocks' 'bash' 'libseccomp')
Jeff Huang's avatar
Jeff Huang committed
9
makedepends=('ca-certificates' 'zstd' 'zlib')
Chaoting Liu's avatar
Chaoting Liu committed
10
conflicts=('vidalia') # to enforce removal of unsupported software, not really conflicts
11
categories=('network')
Burce's avatar
Burce committed
12
option=('!docs' '!emptydirs')
Jeff Huang's avatar
Jeff Huang committed
13 14 15 16 17 18 19
backup=('etc/tor/torrc'
        'etc/tor/torrc-dist')
source=("https://www.torproject.org/dist/${pkgname}-${pkgver}.tar.gz"{,.asc}
        'torrc'
        'tor.service'
        'tor.sysusers'
        'tor.tmpfiles')
Jeff Huang's avatar
Jeff Huang committed
20
md5sums=('78a733e2f528354c1706b143119579f6'
Chaoting Liu's avatar
Chaoting Liu committed
21
         'SKIP'
Jeff Huang's avatar
Jeff Huang committed
22 23 24 25 26 27
         'c1dd4004c63edaeaa829e01be5413cfc'
         '503cedd9679f9817b2c27916ba989a74'
         '5de6b0aff2a152a03d8eb7a473edc5ff'
         '30e307d882c818cb44bcb2d6b81789a3')
validpgpkeys=('2133BC600AB133E1D826D173FE43009C4607B1FB'  # Nick Mathewson
              'F65CE37F04BA5B360AE6EE17C218525819F78451') # Roger Dingledine
28

29
build() {
Jeff Huang's avatar
Jeff Huang committed
30
  cd "${srcdir}/${pkgname}-${pkgver}"
abveritas's avatar
abveritas committed
31

Jeff Huang's avatar
Jeff Huang committed
32
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
abveritas's avatar
abveritas committed
33
  make
34 35 36
}

package() {
Jeff Huang's avatar
Jeff Huang committed
37
  cd "${srcdir}/${pkgname}-${pkgver}"
Michael's avatar
Michael committed
38

Jeff Huang's avatar
Jeff Huang committed
39
  make DESTDIR="${pkgdir}" install
abveritas's avatar
abveritas committed
40

Jeff Huang's avatar
Jeff Huang committed
41 42 43 44 45
  mv "${pkgdir}/etc/tor/torrc.sample" "${pkgdir}/etc/tor/torrc-dist"
  install -Dm0644 "${srcdir}/torrc" "${pkgdir}/etc/tor/torrc"
  install -Dm0644 "${srcdir}/tor.service" "${pkgdir}/usr/lib/systemd/system/tor.service"
  install -Dm0644 "${srcdir}/tor.sysusers" "${pkgdir}/usr/lib/sysusers.d/tor.conf"
  install -Dm0644 "${srcdir}/tor.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/tor.conf"
Michael's avatar
Michael committed
46

Jeff Huang's avatar
Jeff Huang committed
47
  install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
48
}