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-03-26 03:32:12 +01:00
|
|
|
version=0.2.0.23-rc
|
2008-03-19 01:24:49 +01:00
|
|
|
release=1
|
2007-05-25 23:05:59 +02:00
|
|
|
source=(http://tor.eff.org/dist/tor-$version.tar.gz \
|
|
|
|
tor.rc)
|
2006-11-21 12:03:23 +01:00
|
|
|
|
|
|
|
build() {
|
2007-05-25 23:05:59 +02:00
|
|
|
cd tor-$version
|
2006-11-21 12:03:23 +01:00
|
|
|
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
2008-03-04 14:45:24 +01:00
|
|
|
--sysconfdir=/usr/etc \
|
2007-05-25 23:05:59 +02:00
|
|
|
--mandir=/usr/man
|
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
|
|
|
|
|
|
|
install -d \
|
|
|
|
$PKG/etc/rc.d \
|
|
|
|
$PKG/usr/var/lib/tor \
|
|
|
|
$PKG/var/log/tor
|
|
|
|
|
|
|
|
touch $PKG/var/log/tor/notices.log
|
|
|
|
chown -R root:root $PKG
|
|
|
|
|
|
|
|
chown _tor:daemon \
|
2008-03-04 14:45:24 +01:00
|
|
|
$PKG/var/log/tor \
|
|
|
|
$PKG/usr/etc/tor \
|
2006-11-21 12:03:23 +01:00
|
|
|
$PKG/usr/var/lib/tor
|
|
|
|
|
2008-03-04 14:45:24 +01:00
|
|
|
find $PKG/usr/bin -type f -exec chown _tor:daemon {} \;
|
|
|
|
find $PKG/usr/etc -type f -exec chown _tor:daemon {} \;
|
|
|
|
find $PKG/var/log/tor -type f -exec chown _tor:daemon {} \;
|
|
|
|
find $PKG/usr/bin -type f -exec chmod 0744 {} \;
|
|
|
|
find $PKG/usr/etc/tor -type f -exec chmod 0600 {} \;
|
2006-11-21 12:03:23 +01:00
|
|
|
|
2008-03-04 14:45:24 +01:00
|
|
|
chmod 0640 $PKG/var/log/tor/notices.log
|
|
|
|
install -m 0755 $SRC/tor.rc $PKG/etc/rc.d/tor
|
|
|
|
mv $PKG/usr/etc/tor/torrc.sample $PKG/usr/etc/tor/torrc
|
2006-11-21 12:03:23 +01:00
|
|
|
|
|
|
|
# edit the config file
|
2008-03-04 14:45:24 +01:00
|
|
|
sed -i $PKG/usr/etc/tor/torrc \
|
2006-11-21 12:03:23 +01:00
|
|
|
-e's/#RunAsDaemon 1/RunAsDaemon 1/' \
|
|
|
|
-e 's:#Log notice file /usr/var/log/tor/notices.log:Log notice file /var/log/tor/notices.log:' \
|
2008-03-04 14:45:24 +01:00
|
|
|
-e 's:#DataDirectory /usr/var/lib/tor:DataDirectory /usr/var/lib/tor:'
|
2006-11-21 12:03:23 +01:00
|
|
|
}
|
|
|
|
|