/[gentoo-x86]/net-misc/l7-filter/l7-filter-1.2.ebuild
Gentoo

Contents of /net-misc/l7-filter/l7-filter-1.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Mon Sep 5 22:16:50 2005 UTC (14 years, 3 months ago) by dragonheart
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
added more fuzz to epatch to allow hardened-2.4.31 to work - bug #104886 + old version cleanout
(Portage version: 2.0.51.22-r2)

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/l7-filter/l7-filter-1.2.ebuild,v 1.3 2005/06/08 14:34:31 dragonheart Exp $
4
5 inherit linux-info eutils
6
7 MY_P=netfilter-layer7-v${PV}
8 DESCRIPTION="Kernel modules for layer 7 iptables filtering"
9 HOMEPAGE="http://l7-filter.sourceforge.net"
10 SRC_URI="mirror://sourceforge/l7-filter/${MY_P}.tar.gz"
11
12 LICENSE="GPL-2"
13 KEYWORDS="~ppc x86"
14 IUSE=""
15 SLOT="${KV}"
16 S=${WORKDIR}/${MY_P}
17 RDEPEND="net-misc/l7-protocols"
18
19 src_unpack() {
20
21 pkg_postinst
22
23 unpack ${A}
24
25 cd ${S}
26
27 mkdir kernel
28 mkdir kernel/Documentation
29
30
31 local PATCH
32 if kernel_is 2 4
33 then
34 PATCH=for_older_kernels/kernel-${KV_MAJOR}.${KV_MINOR}-layer7-0.9.1.patch
35 elif kernel_is ge 2 6 9
36 then
37 if kernel_is ge 2 6 11
38 then
39 PATCH=kernel-2.6.11-layer7-${PV}.patch
40 else
41 PATCH=for_older_kernels/kernel-2.6.9-2.6.10-layer7-${PV}.patch
42 fi
43 else
44 # 2.6.0-2.6.8.1
45 PATCH=for_older_kernels/kernel-2.6.0-2.6.8.1-layer7-0.9.1.patch
46 fi
47
48 if [ ! -f ${PATCH} ];
49 then
50 die "Kernel version ${KV_FULL} not supported"
51 fi
52
53 # create needed directories
54 mkdir -p ${S}/kernel/net/ipv4/netfilter/regexp/
55 mkdir -p ${S}/kernel/include/linux/netfilter_ipv4/
56
57 cd ${KV_DIR}
58
59
60 # start to copy needed files, if file not exists create an empty file
61 FILES=$(patch -t --dry-run -p1 < ${S}/${PATCH} | grep "^patching file" | cut -f 3 -d ' ')
62 for F in ${FILES};
63 do
64 if [ -f ${F} ];
65 then
66 cp -P ${F} ${S}/kernel/${F}
67 else
68 touch ${S}/kernel/${F}
69 fi
70 done
71
72 #patch the copied kernel source
73 cd ${S}/kernel
74 epatch ${S}/${PATCH}
75 }
76
77 src_compile() {
78 einfo "no compiling - just patching source"
79 }
80
81 src_install() {
82 insinto ${KV_DIR}
83 doins -r kernel/*
84 dodoc CHANGELOG README
85 }
86
87
88 pkg_postinst() {
89 ewarn "This may not work with all kernels."
90 ewarn "This only patches the current kernel source code. (${KV_DIR})"
91 ewarn "Its up to you to recompile the kernel with the l7 options"
92 ewarn
93 ewarn 'You will also need to emerge iptables with the "extensions" USE flag'
94 }
95

  ViewVC Help
Powered by ViewVC 1.1.20