diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-09-13 23:26:55 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-09-13 23:26:55 +0000 |
commit | fb89d3feb7b1b5c289b5df7a278a7ced709ae789 (patch) | |
tree | ce7bacf748770ec7d2b8c9ae54d249b33bb59fd1 /tor | |
parent | 8e51f1fa8bd455459a7eb808305df98060811649 (diff) | |
download | slackbuilds-fb89d3feb7b1b5c289b5df7a278a7ced709ae789.tar.gz slackbuilds-fb89d3feb7b1b5c289b5df7a278a7ced709ae789.tar.bz2 |
tor: signature checking, initscript and slack-required
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@188 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'tor')
-rwxr-xr-x | tor/rc.tor.new | 20 | ||||
-rw-r--r-- | tor/slack-required | 1 | ||||
-rwxr-xr-x | tor/tor.SlackBuild | 22 |
3 files changed, 42 insertions, 1 deletions
diff --git a/tor/rc.tor.new b/tor/rc.tor.new new file mode 100755 index 00000000..f90b6d3e --- /dev/null +++ b/tor/rc.tor.new @@ -0,0 +1,20 @@ +#!/bin/sh +# +# init script for tor +# + +PID="/var/run" +PRIVOXY_PID="$PID/privoxy.pid" +TOR_PID="$PID/tor.pid" +USER="privoxy" + +if [ -f $TOR_PID ]; then + if ps `cat $TOR_PID` | grep -q tor; then + kill `cat $TOR_PID` + fi + rm $TOR_PID +fi + +sudo -u $USER /usr/bin/tor &> /dev/null & +echo "$!" > $TOR_PID + diff --git a/tor/slack-required b/tor/slack-required new file mode 100644 index 00000000..dd6fade5 --- /dev/null +++ b/tor/slack-required @@ -0,0 +1 @@ +libevent diff --git a/tor/tor.SlackBuild b/tor/tor.SlackBuild index e17078b8..4017448d 100755 --- a/tor/tor.SlackBuild +++ b/tor/tor.SlackBuild @@ -4,7 +4,17 @@ # by rhatto at riseup.net # -# TODO: signature checking +if [ -s "slack-required" ]; then + echo Recomended and required packages for building tor are: + cat slack-required | sed -e 's/^/\t/' + if [ "$INTERACT" != "no" ]; then + echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. + read crap + else + echo Sleeping 3 seconds... + sleep 3 + fi +fi CWD="`pwd`" @@ -47,8 +57,14 @@ fi if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then wget "$URL" -O "$SRC_DIR/$SRC" + wget "$URL.asc" -O "$SRC_DIR/$SRC.asc" fi +gpg --keyserver subkeys.pgp.net --recv-keys 0x28988BF5 +gpg --keyserver subkeys.pgp.net --recv-keys 0x165733EA +gpg --verify $SRC_DIR/$SRC.asc $SRC_DIR/$SRC || echo WARNING: Could not check signature or WRONG signature found. +sleep 3 + TMP="$TMP/$PACKAGE" rm -rf $TMP mkdir -p $TMP @@ -102,6 +118,10 @@ for file in AUTHORS ChangeLog INSTALL LICENSE README; do cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ done +# install script +echo '( chroot . /sbin/ldconfig )' > install/doinst.sh +echo '( if [ ! -f "etc/rc.d/rc.tor" ]; then mv etc/rc.d/rc.tor.new etc/rc.d/rc.tor ; fi )' >> install/doinst.sh + makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz if [ "$CLEANUP" == "yes" ]; then |