/[gentoo-x86]/net-misc/ksb26/ksb26-0.0.4.ebuild
Gentoo

Contents of /net-misc/ksb26/ksb26-0.0.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Mon Oct 11 08:57:42 2010 UTC (9 years, 1 month ago) by s4t4n
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Removed net-misc/ksb26, see bug #239775 for reference.

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/ksb26/ksb26-0.0.4.ebuild,v 1.4 2008/10/02 16:58:07 ranger Exp $
4
5 inherit linux-mod
6
7 DESCRIPTION="A kernel SOCKS bouncer"
8 HOMEPAGE="http://ksb.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/ksb/${P}.tar.gz"
10 LICENSE="GPL-2"
11 SLOT="0"
12 KEYWORDS="ppc x86"
13 IUSE=""
14 S=${WORKDIR}/${PN}
15
16 DEPEND=">=sys-apps/sed-4"
17
18 pkg_setup()
19 {
20 if ! kernel_is 2 6; then
21 die "${P} can only be built against a 2.6.x kernel!"
22 fi
23
24 linux-mod_pkg_setup
25
26 MODULE_NAMES="ksb26(misc:${S}/kernel:${S}/kernel)"
27 BUILD_TARGETS="all"
28 }
29
30 src_unpack()
31 {
32 unpack ${A}
33
34 cd "${S}"
35 cp "${FILESDIR}/${PN}-kernel-Makefile" kernel/Makefile
36 sed -i -e "s:@gcc:\${CC} \${CFLAGS}:" user/Makefile
37
38 #patch to fix compilation with recent kernels
39 epatch "${FILESDIR}/${P}_unreg_chrdev.patch" || die "epatch failed"
40 }
41
42 src_compile()
43 {
44 linux-mod_src_compile || die "Kernel module compilation failed!"
45
46 einfo "Preparing userspace tools"
47 cd "${S}/user"
48 emake || die "Userspace tools compilation failed!"
49 }
50
51 src_install()
52 {
53 linux-mod_src_install
54
55 cd "${S}"
56 dobin user/ksb26manager
57
58 dodir /etc/ksb26
59 insinto /etc/ksb26
60 doins thosts.example
61
62 doman ksb26.8.gz
63 dodoc AUTHOR README TODO
64 }
65
66 pkg_postinst()
67 {
68 linux-mod_pkg_postinst
69
70 if [ ! -e "${ROOT}/dev/ksb26" ]; then
71 mknod "${ROOT}/dev/ksb26" c 254 0
72 fi
73
74 einfo "Read man page (man ksb26) for informations about the use of ksb26"
75 einfo "Don't forget to set target hosts in /etc/ksb26/thosts"
76 }
77
78 pkg_postrm()
79 {
80 if [ -e "${ROOT}/dev/ksb26" ]; then
81 rm "${ROOT}/dev/ksb26"
82 fi
83 }

  ViewVC Help
Powered by ViewVC 1.1.20