desktop/tor/PKGBUILD
2013-01-14 18:23:38 +00:00

54 lines
1.5 KiB
Bash

#
# Apps Packages for Chakra, part of chakra-project.org
#
# maintainer abveritas@chakra-project.org
# contributor Giuseppe Calà <jiveaxe@gmail.com>
pkgname=tor
pkgver=0.2.3.25
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
source=("http://www.torproject.org/dist/${pkgname}-${pkgver}.tar.gz"
'torrc'
'tor.conf.d'
'tor.service')
md5sums=('a1c364189a9a66ed9daa8e6436489daf'
'c97998c760c4351f12ad41d514071a9b'
'f656f3e93f0c2ed46464d9b784876dbc'
'cf23b97a1da09670214da6229a3ecb09')
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"
}