contrib/tor/Pkgfile

61 lines
1.7 KiB
Plaintext
Raw Normal View History

# Description: Tor is a anonymous network and proxy.
2009-01-23 21:20:49 +01:00
# URL: http://www.torproject.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
version=0.2.4.24
2008-07-09 08:23:53 +02:00
release=1
2011-06-30 12:14:43 +02:00
source=(https://www.torproject.org/dist/tor-$version.tar.gz
2008-07-17 18:48:43 +02:00
tor.rc tor-config.patch)
build() {
2008-07-17 18:48:43 +02:00
cd $name-$version
patch -p 1 -i $SRC/tor-config.patch
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'
./configure \
--prefix=/usr \
2008-07-17 18:48:43 +02:00
--mandir=/usr/man \
--sysconfdir=/etc
2007-05-25 23:05:59 +02:00
make
make DESTDIR=$PKG install
2008-07-17 18:48:43 +02:00
# data
install -d $PKG/usr/var/lib/tor
chown tor:tor $PKG/usr/var/lib/tor
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 {} \;
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
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
2011-09-17 03:21:03 +02:00
# docs
rm -r $PKG/usr/share/doc
}