summaryrefslogtreecommitdiff
path: root/tor/Pkgfile
blob: c8adb5186d39815764cdc6245107fed4f731f3a0 (plain)
    1 # Description: Tor is a anonymous network and proxy.
    2 # URL: http://tor.eff.org/
    3 # Maintainer: Danny Rawlins, romster at shortcircuit dot net dot au
    4 # Packager: Danny Rawlins, romster at shortcircuit dot net dot au
    5 # Depends on: libevent
    6 
    7 name=tor
    8 version=0.1.2.19
    9 release=1
   10 source=(http://tor.eff.org/dist/tor-$version.tar.gz \
   11 	tor.rc)
   12 
   13 build() {
   14 	cd tor-$version
   15 
   16 	./configure \
   17 		--prefix=/usr \
   18 		--sysconfdir=/etc \
   19 		--mandir=/usr/man
   20 
   21 	make
   22 	make DESTDIR=$PKG install
   23 	
   24 	install -d \
   25 		$PKG/etc/rc.d \
   26 		$PKG/usr/var/lib/tor \
   27 		$PKG/var/log/tor
   28 
   29 	touch $PKG/var/log/tor/notices.log
   30 	chown -R root:root $PKG
   31 
   32 	chown _tor:daemon \
   33 		$PKG/var/log/{tor,tor/notices.log} \
   34 		$PKG/etc/tor \
   35 		$PKG/usr/var/lib/tor
   36 
   37 	find $PKG/usr/bin/ -type f -exec chown _tor:daemon {} \;
   38 	find $PKG/etc/tor/ -type f -exec chown _tor:daemon {} \;
   39 
   40 	chmod 640 $PKG/var/log/tor/notices.log
   41 	install -m755 $SRC/tor.rc $PKG/etc/rc.d/tor
   42 	
   43 	# edit the config file
   44 	sed -i \
   45 		-e's/#RunAsDaemon 1/RunAsDaemon 1/' \
   46 		-e 's:#Log notice file /usr/var/log/tor/notices.log:Log notice file /var/log/tor/notices.log:' \
   47 		-e 's:#DataDirectory /usr/var/lib/tor:DataDirectory /usr/var/lib/tor:' $PKG/etc/tor/torrc.sample
   48 
   49 	mv $PKG/etc/tor/torrc.sample $PKG/etc/tor/torrc
   50 }

Generated by cgit