2006-11-21 12:03:23 +01:00
|
|
|
# Description: Tor is a anonymous network and proxy.
|
|
|
|
# URL: http://tor.eff.org/
|
2008-03-26 03:45:31 +01:00
|
|
|
# Maintainer: Danny Rawlins, monster dot romster at gmail dot com
|
|
|
|
# Packager: Danny Rawlins, monster dot romster at gmail dot com
|
2008-03-04 16:56:11 +01:00
|
|
|
# Depends on: libevent openssl zlib
|
2006-11-21 12:03:23 +01:00
|
|
|
|
|
|
|
name=tor
|
2008-09-11 11:31:16 +02:00
|
|
|
version=0.2.0.31
|
2008-07-09 08:23:53 +02:00
|
|
|
release=1
|
2008-07-17 18:48:43 +02:00
|
|
|
source=(http://tor.eff.org/dist/tor-$version.tar.gz
|
|
|
|
tor.rc tor-config.patch)
|
2006-11-21 12:03:23 +01:00
|
|
|
|
|
|
|
build() {
|
2008-07-17 18:48:43 +02:00
|
|
|
cd $name-$version
|
|
|
|
patch -p 1 -i $SRC/tor-config.patch
|
2006-11-21 12:03:23 +01:00
|
|
|
|
2008-07-18 09:28:07 +02:00
|
|
|
# fix for find: The relative path `~/bin' is included in the PATH
|
|
|
|
# environment variable, which is insecure in combination with the
|
|
|
|
# -execdir action of find. Please remove that entry from $PATH
|
|
|
|
export PATH='/sbin:/usr/sbin:/bin:/usr/bin'
|
|
|
|
|
2006-11-21 12:03:23 +01:00
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
2008-07-17 18:48:43 +02:00
|
|
|
--mandir=/usr/man \
|
|
|
|
--sysconfdir=/etc
|
2006-11-21 12:03:23 +01:00
|
|
|
|
2007-05-25 23:05:59 +02:00
|
|
|
make
|
|
|
|
make DESTDIR=$PKG install
|
2006-11-21 12:03:23 +01:00
|
|
|
|
2008-07-17 18:48:43 +02:00
|
|
|
# data
|
|
|
|
install -d $PKG/usr/var/lib/tor
|
|
|
|
chown tor:tor $PKG/usr/var/lib/tor
|
2008-07-18 11:49:00 +02:00
|
|
|
touch \
|
|
|
|
$PKG/usr/var/lib/tor/cached-certs \
|
|
|
|
$PKG/usr/var/lib/tor/cached-consensus \
|
|
|
|
$PKG/usr/var/lib/tor/cached-descriptors \
|
|
|
|
$PKG/usr/var/lib/tor/cached-descriptors.new \
|
|
|
|
$PKG/usr/var/lib/tor/cached-routers.new \
|
|
|
|
$PKG/usr/var/lib/tor/state
|
|
|
|
find $PKG/usr/var/lib/tor/ -type f -execdir chown tor:tor {} \; -execdir chmod 0600 {} \;
|
2006-11-21 12:03:23 +01:00
|
|
|
|
2008-07-17 18:48:43 +02:00
|
|
|
# configuration
|
|
|
|
mv $PKG/etc/tor/torrc.sample $PKG/etc/tor/torrc
|
|
|
|
find $PKG/etc/tor/ -type f -exec chown root:tor {} \; -execdir chmod 0640 {} \;
|
|
|
|
|
|
|
|
# programs
|
2008-07-18 13:31:03 +02:00
|
|
|
find $PKG/usr/bin -type f -execdir chown root:tor {} \; -execdir chmod 0750 {} \;
|
2008-07-17 18:48:43 +02:00
|
|
|
|
|
|
|
# logs
|
|
|
|
install -d $PKG/var/log/tor
|
|
|
|
chown tor:tor $PKG/var/log/tor
|
2006-11-21 12:03:23 +01:00
|
|
|
touch $PKG/var/log/tor/notices.log
|
2008-07-17 18:48:43 +02:00
|
|
|
find $PKG/var/log/tor/ -type f -exec chown tor:tor {} \; -execdir chmod 0640 {} \;
|
|
|
|
|
|
|
|
# service
|
2008-07-18 13:31:03 +02:00
|
|
|
install -m 0750 -D $SRC/tor.rc $PKG/etc/rc.d/tor
|
2006-11-21 12:03:23 +01:00
|
|
|
}
|
|
|
|
|