1 |
# Copyright 1999-2009 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/htun/htun-0.9.5.ebuild,v 1.8 2009/01/14 03:47:53 vapier Exp $ |
4 |
|
5 |
inherit eutils |
6 |
|
7 |
DESCRIPTION="Project to tunnel IP traffic over HTTP" |
8 |
HOMEPAGE="http://htun.runslinux.net/" |
9 |
SRC_URI="http://htun.runslinux.net/dist/${P}.tar.gz" |
10 |
|
11 |
LICENSE="GPL-2" |
12 |
SLOT="0" |
13 |
KEYWORDS="~x86" |
14 |
IUSE="" |
15 |
|
16 |
DEPEND="dev-util/yacc" |
17 |
RDEPEND="" |
18 |
|
19 |
src_unpack() { |
20 |
unpack ${A} |
21 |
cd "${S}" |
22 |
epatch "${FILESDIR}"/${P}-glibc.patch #248100 |
23 |
sed -i \ |
24 |
-e '/^CFLAGS/s:=\(.*\)-O :+=\1 $(CPPFLAGS) :' \ |
25 |
-e '/LDFLAGS/s:=:+=:' \ |
26 |
src/Makefile || die |
27 |
} |
28 |
|
29 |
src_compile() { |
30 |
cd src |
31 |
emake all || die |
32 |
} |
33 |
|
34 |
src_install() { |
35 |
dosbin src/htund || die |
36 |
insinto /etc |
37 |
doins doc/htund.conf |
38 |
dodoc doc/* README |
39 |
} |
40 |
|
41 |
pkg_postinst() { |
42 |
einfo "NOTE: HTun requires the Universal TUN/TAP module" |
43 |
einfo "available in the Linux kernel. Make sure you have" |
44 |
einfo "compiled the tun.o driver as a module!" |
45 |
einfo |
46 |
einfo "It can be found in the kernel configuration under" |
47 |
einfo "Network Device Support --> Universal TUN/TAP" |
48 |
einfo |
49 |
einfo "To configure HTun, run the following commands as root:" |
50 |
einfo " # mknod /dev/net/tun c 10 200" |
51 |
einfo " # echo \"alias char-major-10-200 tun\" >> /etc/modules.conf" |
52 |
einfo " # depmod -e" |
53 |
} |