summaryrefslogtreecommitdiffstats
path: root/net-proxy/socks5/socks5-1.0-r11.ebuild
blob: 049e5c4f83e35f8ae460fcb2fdafc24a521667c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: 

inherit eutils

DESCRIPTION="SOCKS5 Implementation"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="amd64 x86"
RDEPEND="sys-libs/ncurses"

S=${WORKDIR}/socks5-v1.0r11

src_unpack() {
    tar xjf ${FILESDIR}/socks5-v1.0r11.tar.bz2
    EPATCH_OPTS="-p0 -d socks5-v1.0r11" epatch ${FILESDIR}/socks5-v1.0r11.patch1.txt.bz2
    EPATCH_OPTS="-p1 -d socks5-v1.0r11" epatch ${FILESDIR}/socks5-vararg.patch.bz2
    EPATCH_OPTS="-p1 -d socks5-v1.0r11" epatch ${FILESDIR}/socks5-v1.0r11-ifaaddr.patch.bz2
}

src_compile() {
    econf	--with-srvpidfile=/var/run/socks5.pid \
		--with-libconffile=/etc/libsocks5.conf \
		--with-srvconffile=/etc/socks5.conf \
		--with-syslog-facility \
		--with-threads || die
    emake || die
}

src_install() {
    into /usr

    echo "-----------------"
    echo ${D}
    cd ${P}-r11/work/socks5-v1.0r11
    make install prefix=${D}/usr || die
    cd ${D}/usr/bin/
    mv rarchie s5archie
    mv rfinger s5finger
    mv rftp s5ftp
    mv rping s5ping
    mv rtelnet s5telnet
    mv rtraceroute s5traceroute
    mv rwhois s5whois
    
    chmod 511 s5*
    strip s5*
    
    mkdir ../sbin
    strip socks5
    mv socks5 stopsocks ../sbin
    
    mkdir -p ${D}/etc/init.d/
    install -m 755 ${FILESDIR}/socks5.init ${D}/etc/init.d/socks5
    install -m 755 ${FILESDIR}/unsocks ${D}/usr/bin
    echo "socks5 - - - - -" > ${D}/etc/libsocks5.conf
}