forked from ports/contrib
54 lines
1.4 KiB
Plaintext
54 lines
1.4 KiB
Plaintext
# Description: Tor is a anonymous network and proxy.
|
|
# URL: http://tor.eff.org/
|
|
# Maintainer: Danny Rawlins, monster dot romster at gmail dot com
|
|
# Packager: Danny Rawlins, monster dot romster at gmail dot com
|
|
# Depends on: libevent openssl zlib
|
|
|
|
name=tor
|
|
version=0.2.0.23-rc
|
|
release=1
|
|
source=(http://tor.eff.org/dist/tor-$version.tar.gz \
|
|
tor.rc)
|
|
|
|
build() {
|
|
cd tor-$version
|
|
|
|
./configure \
|
|
--prefix=/usr \
|
|
--sysconfdir=/usr/etc \
|
|
--mandir=/usr/man
|
|
|
|
make
|
|
make DESTDIR=$PKG install
|
|
|
|
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 \
|
|
$PKG/var/log/tor \
|
|
$PKG/usr/etc/tor \
|
|
$PKG/usr/var/lib/tor
|
|
|
|
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 {} \;
|
|
|
|
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
|
|
|
|
# edit the config file
|
|
sed -i $PKG/usr/etc/tor/torrc \
|
|
-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:' \
|
|
-e 's:#DataDirectory /usr/var/lib/tor:DataDirectory /usr/var/lib/tor:'
|
|
}
|
|
|