diff options
Diffstat (limited to 'contrib/peer2anonet')
| -rwxr-xr-x | contrib/peer2anonet/peer2anonet | 42 | 
1 files changed, 39 insertions, 3 deletions
| diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet index fb8564f..1893439 100755 --- a/contrib/peer2anonet/peer2anonet +++ b/contrib/peer2anonet/peer2anonet @@ -10,7 +10,9 @@ USAGE(){      echo -e '\n    --update                regenerate peer configurations'      echo -e '\n    --configure-peer        generate a new peer configuration and update'      echo -e '\n    --rm-peer               remove a peer configuration and update' -    echo -e '\n    --install-daemontools   installs daemontools\n' +    echo -e '\n    --install-daemontools   installs daemontools' +    echo -e '\n    --install-ucspi-tcp     installs ucspi-tcp' +    echo -e '\n    --install-djbdns        installs djbdns\n'      exit 0      } @@ -282,6 +284,36 @@ INSTALL_DAEMONTOOLS(){      package/install      } +INSTALL_UCSPI_TCP(){ +    [[ $(echo X`which gcc`) == X ]] && echo '   error: cannot find gcc' +    [[ $(echo X`which gcc`) == X ]] && exit 1 +    [[ $(echo X`which make`) == X ]] && echo '   error: cannot find make' +    [[ $(echo X`which make`) == X ]] && exit 1 +    cd /usr/local/src +    wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz +    gunzip ucspi-tcp-0.88.tar +    tar -xf ucspi-tcp-0.88.tar +    cd ucspi-tcp-0.88 +    sed -i 's/gcc/gcc -include errno.h/g' src/conf-cc +    make +    make setup check +    } + +INSTALL_DJBDNS(){ +    [[ $(echo X`which gcc`) == X ]] && echo '   error: cannot find gcc' +    [[ $(echo X`which gcc`) == X ]] && exit 1 +    [[ $(echo X`which make`) == X ]] && echo '   error: cannot find make' +    [[ $(echo X`which make`) == X ]] && exit 1 +    cd /usr/local/src +    wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz +    gunzip djbdns-1.05.tar +    tar -xf djbdns-1.05.tar +    cd djbdns-1.05 +    echo gcc -O2 -include /usr/include/errno.h > conf-cc +    make +    make setup check +    } +  if [ "$1" == '--configure' ]; then      CONFIGURE @@ -293,8 +325,12 @@ elif [ "$1" == '--configure-peer' ]; then  elif [ "$1" == '--rm-peer' ]; then      RM_PEER      UPDATE -elif [ "$1" == '--rm-peer' ]; then -    INSTALL_DAEMONTOOLS +elif [ "$1" == '--install-daemontools' ]; then +    INSTALL_CORE +elif [ "$1" == '--install-ucspi-tcp' ]; then +    INSTALL_UCSPI_TCP +elif [ "$1" == '--install-djbdns' ]; then +    INSTALL_DJBDNS  else      USAGE  fi | 
