summaryrefslogtreecommitdiff
path: root/community/tor/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/tor/PKGBUILD')
-rw-r--r--community/tor/PKGBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/community/tor/PKGBUILD b/community/tor/PKGBUILD
new file mode 100644
index 000000000..f21989d87
--- /dev/null
+++ b/community/tor/PKGBUILD
@@ -0,0 +1,47 @@
+# $Id: PKGBUILD 92386 2013-06-04 12:52:29Z lfleischer $
+# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
+# Contributor: simo <simo@archlinux.org>
+# Contributor: Sid Karunaratne
+
+pkgname=tor
+pkgver=0.2.3.25
+pkgrel=3
+pkgdesc='Anonymizing overlay network.'
+arch=('i686' 'x86_64')
+url='http://www.torproject.org/'
+license=('BSD')
+depends=('openssl' 'libevent' 'torsocks' 'bash')
+makedepends=('ca-certificates')
+backup=('etc/tor/torrc'
+ 'etc/tor/torrc-dist'
+ 'etc/tor/tor-tsocks.conf')
+install='tor.install'
+source=("http://www.torproject.org/dist/${pkgname}-${pkgver}.tar.gz"{,.asc}
+ 'torrc'
+ 'tor.service')
+md5sums=('a1c364189a9a66ed9daa8e6436489daf'
+ 'SKIP'
+ 'c1dd4004c63edaeaa829e01be5413cfc'
+ 'a396657e6f6df21d319ad586500c04b1')
+
+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 -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ install -Dm0644 "${srcdir}/tor.service" "${pkgdir}/usr/lib/systemd/system/tor.service"
+}