# Description: Tor is a anonymous network and proxy. # URL: http://tor.eff.org/ # Maintainer: Danny Rawlins, romster at shortcircuit dot net dot au # Packager: Danny Rawlins, romster at shortcircuit dot net dot au # Depends on: libevent name=tor version=0.1.1.26 release=1 source=(http://tor.eff.org/dist/$name-$version.tar.gz \ $name.rc) build() { cd $name-$version ./configure \ --prefix=/usr \ --sysconfdir=/etc 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,tor/notices.log} \ $PKG/etc/tor \ $PKG/usr/var/lib/tor find $PKG/usr/bin/ -type f -exec chown _tor:daemon {} \; find $PKG/etc/tor/ -type f -exec chown _tor:daemon {} \; chmod 640 $PKG/var/log/tor/notices.log install -m755 $SRC/tor.rc $PKG/etc/rc.d/tor # edit the config file sed -i \ -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:' $PKG/etc/tor/torrc.sample mv $PKG/etc/tor/torrc.sample $PKG/etc/tor/torrc }