contrib/tor/Pkgfile

54 lines
1.4 KiB
Plaintext
Raw Normal View History

# 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
name=tor
2008-06-14 03:20:06 +02:00
version=0.2.0.28-rc
2008-07-07 21:13:18 +02:00
release=2
2007-05-25 23:05:59 +02:00
source=(http://tor.eff.org/dist/tor-$version.tar.gz \
tor.rc)
build() {
2007-05-25 23:05:59 +02:00
cd tor-$version
./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
2007-05-25 23:05:59 +02:00
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
2008-07-07 21:13:18 +02:00
chown root:tor \
2008-03-04 14:45:24 +01:00
$PKG/var/log/tor \
$PKG/usr/etc/tor \
$PKG/usr/var/lib/tor
2008-07-07 21:13:18 +02:00
find $PKG/usr/bin -type f -exec chown tor:tor {} \;
find $PKG/usr/etc -type f -exec chown root:tor {} \;
find $PKG/var/log/tor -type f -exec chown root:tor {} \;
find $PKG/usr/bin -type f -exec chmod 0544 {} \;
find $PKG/usr/etc/tor -type f -exec chmod 0660 {} \;
2008-07-07 21:13:18 +02:00
chmod 0660 $PKG/var/log/tor/notices.log
2008-03-04 14:45:24 +01:00
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
2008-03-04 14:45:24 +01:00
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:' \
2008-03-04 14:45:24 +01:00
-e 's:#DataDirectory /usr/var/lib/tor:DataDirectory /usr/var/lib/tor:'
}