diff options
author | 2002-04-28 19:43:07 +0000 | |
---|---|---|
committer | 2002-04-28 19:43:07 +0000 | |
commit | fe0ece0c938b6a94e60bceae8314a163204a46ba (patch) | |
tree | 567225894ac5274fbbff78b1b7b7916793c874e6 /net-misc | |
parent | Cleaned up a bit more. (diff) | |
download | historical-fe0ece0c938b6a94e60bceae8314a163204a46ba.tar.gz historical-fe0ece0c938b6a94e60bceae8314a163204a46ba.tar.bz2 historical-fe0ece0c938b6a94e60bceae8314a163204a46ba.zip |
adding vtun. closes 1697
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/vtun/ChangeLog | 11 | ||||
-rw-r--r-- | net-misc/vtun/files/digest-vtun-2.5 | 1 | ||||
-rw-r--r-- | net-misc/vtun/files/vtun-2.5-expect.patch | 11 | ||||
-rw-r--r-- | net-misc/vtun/files/vtun-2.5-makefile.patch | 50 | ||||
-rw-r--r-- | net-misc/vtun/files/vtun.rc | 32 | ||||
-rw-r--r-- | net-misc/vtun/files/vtund-start.conf | 33 | ||||
-rw-r--r-- | net-misc/vtun/vtun-2.5.ebuild | 63 |
7 files changed, 201 insertions, 0 deletions
diff --git a/net-misc/vtun/ChangeLog b/net-misc/vtun/ChangeLog new file mode 100644 index 000000000000..c1ac3c9a8a01 --- /dev/null +++ b/net-misc/vtun/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for <CATEGORY>/<PACKAGE_NAME> +# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL +# /space/gentoo/cvsroot/gentoo-x86/skel.ChangeLog,v 1.2 2002/02/05 00:57:47 gbevin Exp + +*vtun-2.5 (28 April 2002) + + 28 April 2002; Bryce Allen <ballen@mum.edu> vtun-2.5.ebuild ChangeLog files/digest-vtun-2.5 files/vtun.rc files/vtund-start.conf : + + Initial revision. + Includes a few patches for the excellent PLD folks, specifically + to fix a bison issue, and to add DESTDIR to the 'make install' command. diff --git a/net-misc/vtun/files/digest-vtun-2.5 b/net-misc/vtun/files/digest-vtun-2.5 new file mode 100644 index 000000000000..abf8dfbce137 --- /dev/null +++ b/net-misc/vtun/files/digest-vtun-2.5 @@ -0,0 +1 @@ +MD5 b29bffeb07e66567e247641919c45b23 vtun-2.5.tar.gz 92510 diff --git a/net-misc/vtun/files/vtun-2.5-expect.patch b/net-misc/vtun/files/vtun-2.5-expect.patch new file mode 100644 index 000000000000..ce853c464287 --- /dev/null +++ b/net-misc/vtun/files/vtun-2.5-expect.patch @@ -0,0 +1,11 @@ +--- vtun-2.5/cfg_file.y Sun Feb 17 22:03:05 2002 ++++ vtun-2.5-expect/cfg_file.y Sun Feb 17 22:03:17 2002 +@@ -68,7 +68,7 @@ + int num; + struct { int num1; int num2; } dnum; + } +-%expect 18 ++%expect 20 + + %token K_OPTIONS K_DEFAULT K_PORT K_PERSIST K_TIMEOUT + %token K_PASSWD K_PROG K_PPP K_SPEED K_IFCFG K_FWALL K_ROUTE K_DEVICE diff --git a/net-misc/vtun/files/vtun-2.5-makefile.patch b/net-misc/vtun/files/vtun-2.5-makefile.patch new file mode 100644 index 000000000000..e37a6441acd0 --- /dev/null +++ b/net-misc/vtun/files/vtun-2.5-makefile.patch @@ -0,0 +1,50 @@ +diff -ruN vtun-2.3.orig/Makefile.in vtun-2.3/Makefile.in +--- vtun-2.3.orig/Makefile.in Mon May 29 15:35:11 2000 ++++ vtun-2.3/Makefile.in Sat Sep 23 14:17:28 2000 +@@ -27,8 +27,9 @@ + LEX = @LEX@ + LEXFLAGS = -t + ++DESTDIR = ++ + INSTALL = @INSTALL@ +-INSTALL_OWNER = -o root -g 0 + + prefix = @prefix@ + exec_prefix = @exec_prefix@ +@@ -79,24 +80,20 @@ + rm -f `cat vtun.drivers` + + install_man: +- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(MAN_DIR)/man8 +- $(INSTALL) -m 644 $(INSTALL_OWNER) vtund.8 $(MAN_DIR)/man8 +- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(MAN_DIR)/man5 +- $(INSTALL) -m 644 $(INSTALL_OWNER) vtund.conf.5 $(MAN_DIR)/man5 +- rm -f $(MAN_DIR)/man8/vtun.8 +- ln -s vtund.8 $(MAN_DIR)/man8/vtun.8 ++ $(INSTALL) -d -m 755 $(DESTDIR)$(MAN_DIR)/man8 ++ $(INSTALL) -m 644 vtund.8 $(DESTDIR)$(MAN_DIR)/man8 ++ $(INSTALL) -d -m 755 $(DESTDIR)$(MAN_DIR)/man5 ++ $(INSTALL) -m 644 vtund.conf.5 $(DESTDIR)$(MAN_DIR)/man5 + + install_config: +- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(ETC_DIR) +- if [ ! -f $(ETC_DIR)/vtund.conf ]; then \ +- $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(ETC_DIR); \ +- fi ++ $(INSTALL) -d -m 755 $(DESTDIR)$(ETC_DIR) ++ $(INSTALL) -m 600 vtund.conf $(DESTDIR)$(ETC_DIR); + + install: vtund install_config install_man +- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(VAR_DIR)/run +- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(STAT_DIR) +- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(LOCK_DIR) +- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(SBIN_DIR) +- $(INSTALL) -m 755 $(INSTALL_OWNER) vtund $(SBIN_DIR) ++ $(INSTALL) -d -m 755 $(DESTDIR)$(VAR_DIR)/run ++ $(INSTALL) -d -m 755 $(DESTDIR)$(STAT_DIR) ++ $(INSTALL) -d -m 755 $(DESTDIR)$(LOCK_DIR) ++ $(INSTALL) -d -m 755 $(DESTDIR)$(SBIN_DIR) ++ $(INSTALL) -m 755 vtund $(DESTDIR)$(SBIN_DIR) + + # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/net-misc/vtun/files/vtun.rc b/net-misc/vtun/files/vtun.rc new file mode 100644 index 000000000000..77ef993ddd1d --- /dev/null +++ b/net-misc/vtun/files/vtun.rc @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later + +depend() { + need net +} + +start() { + IFS="" + for line in `grep -v '^[[:space:]]*#' /etc/vtund-start.conf | grep -v '^[[:space:]]*$'` + do + echo $line | + (IFS=" " + read host server args + if [ "$host" = "--server--" ]; then + ebegin "Starting vtund server" + start-stop-daemon --start --quiet --exec /usr/sbin/vtund -- $args -s -P $server + eend $? + else + ebegin "Starting vtund client $host to $server" + start-stop-daemon --start --quiet --exec /usr/sbin/vtund -- $args $host $server + eend $? + fi) + done +} + +stop() { + ebegin "Stopping all vtund servers and clients" + killall vtund + eend $? +} diff --git a/net-misc/vtun/files/vtund-start.conf b/net-misc/vtun/files/vtund-start.conf new file mode 100644 index 000000000000..01de38322f48 --- /dev/null +++ b/net-misc/vtun/files/vtund-start.conf @@ -0,0 +1,33 @@ +### this file defines whether vtund is run as a client or a server +### +### format is "[host] [server] <args>" or "--server-- [portnumber] <args>". +### +### [host] is the hostname to use as a client +### +### [server] is the server to connect to +### +### [args] is optional for both server and client and contains any additional +### command line args for that instance of vtund. not needed by most people. +### +### --server-- is the literal string '--server--'. nothing more, nothing less. +### +### [portnumber] is the port number to run the server on. +### +### +### you can have more than one client "host server" line if required, +### and in theory, it should be possible to run as both a client and a +### server simultaneously, but i haven't tested that. + + +### examples: + +### to run as a client using hostname 'viper'. +#viper vtun-server.somewhere.com.au + +### to run a persistent client connection using hostname 'viper' +### connecting to a server on port 6000 and using /etc/vtun.viper.conf +### as the config file. +#viper vtun-server.somewhere.com.au -f /etc/vtun.viper.conf -s -P 6000 + +### to run vtund as a server on port 5000, uncomment the following line: +#--server-- 5000 diff --git a/net-misc/vtun/vtun-2.5.ebuild b/net-misc/vtun/vtun-2.5.ebuild new file mode 100644 index 000000000000..c545b8d1f211 --- /dev/null +++ b/net-misc/vtun/vtun-2.5.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author: Bryce Allen <ballen@mum.edu> +# Maintainer: Jon Nelson <jnelson@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/net-misc/vtun/vtun-2.5.ebuild,v 1.1 2002/04/28 19:42:50 jnelson Exp $ + +S=${WORKDIR}/vtun +DESCRIPTION="Create virtual tunnels over TCP/IP networks with traffic shaping, encryption, and compression" +SRC_URI="http://prdownloads.sourceforge.net/vtun/${P}.tar.gz" +HOMEPAGE="http://vtun.sourceforge.net/" + +# NOTE: you also need the tun/tap driver compiled into your kernel +# to do tun/tap tunneling +DEPEND="virtual/glibc + >=sys-libs/zlib-1.1.3 + >=dev-libs/lzo-1.07 + sys-devel/bison + ssl? ( >=dev-libs/openssl-0.9.6c )" +RDEPEND="${DEPEND}" + +src_unpack() { + unpack ${A} && cd ${S} || die + patch -p1 < ${FILESDIR}/${PN}-${PV}-expect.patch || die + patch -p1 < ${FILESDIR}/${PN}-${PV}-makefile.patch || die +} + +src_compile() { + local use_opts + use_opts="" + if [ -z "`use ssl`" ] + then + use_opts="--disable-ssl" + fi + + econf ${use_opts} --with-ssl-headers=/usr/include/openssl || die + + make || die +} + +src_install () { + make DESTDIR=${D} prefix=/usr \ + mandir=/usr/share/man \ + infodir=/usr/share/info \ + datadir=/usr/share \ + sysconfdir=/etc \ + localstatedir=/var/lib \ + install || die + + dodoc ChangeLog Credits FAQ README README.Setup README.Shaper TODO + + exeinto etc/init.d; + newexe ${FILESDIR}/vtun.rc vtun + + insinto etc + doins ${FILESDIR}/vtund-start.conf +} + +pkg_postinst () { + echo ">>> You will need the Universal TUN/TAP driver compiled into" + echo ">>> your kernel or as a module to use the associated tunnel" + echo ">>> modes in vtun. 2.2 users will need to download and install" + echo ">>> the driver from http://vtun.sourceforge.net/tun" +} |