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

Contents of /net-misc/l7-filter/l7-filter-0.9.1-r1.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, 4 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-0.9.1-r1.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 mirror://sourceforge/l7-filter/kernel-2.6-layer7-${PV}+working_with_2.6.9.patch
12 mirror://gentoo/kernel-2.6-layer7-0.9.1+working_with_2.6.10.patch"
13
14 # 2.6.10 patch from
15 # http://sourceforge.net/tracker/download.php?group_id=80085&atid=558670&file_id=113753&aid=1092484
16
17 LICENSE="GPL-2"
18 KEYWORDS="x86 ppc"
19 IUSE=""
20 SLOT="${KV}"
21 S=${WORKDIR}/${MY_P}
22 RDEPEND="net-misc/l7-protocols"
23
24 src_unpack() {
25
26 ewarn "This may not work with all kernels."
27 ewarn "This only patches the current kernel source code. (${KV_DIR})"
28 ewarn "Its up to you to recompile the kernel with the l7 options"
29
30 unpack ${MY_P}.tar.gz
31
32 cd ${S}
33
34 mkdir kernel
35 mkdir kernel/Documentation
36
37
38 local PATCH
39 if kernel_is 2 4
40 then
41 PATCH=${S}/kernel-${KV_MAJOR}.${KV_MINOR}-layer7-${PV}.patch
42 elif kernel_is 2 6 9
43 then
44 PATCH=${DISTDIR}/kernel-2.6-layer7-${PV}+working_with_2.6.9.patch
45 elif kernel_is ge 2 6 10
46 then
47 PATCH=${DISTDIR}/kernel-2.6-layer7-0.9.1+working_with_2.6.10.patch
48 else
49 PATCH=${S}/kernel-${KV_MAJOR}.${KV_MINOR}-layer7-${PV}.patch
50 fi
51
52 if [ ! -f ${PATCH} ];
53 then
54 die "Kernel version ${KV_FULL} no supported"
55 fi
56
57 # create needed directories
58 mkdir -p ${S}/kernel/net/ipv4/netfilter/regexp/
59 mkdir -p ${S}/kernel/include/linux/netfilter_ipv4/
60
61 cd ${KV_DIR}
62
63
64 # start to copy needed files, if file not exists create an empty file
65 FILES=$(patch -t --dry-run -p1 < ${PATCH} | grep "^patching file" | cut -f 3 -d ' ')
66 for F in ${FILES};
67 do
68 if [ -f ${F} ];
69 then
70 cp -P ${F} ${S}/kernel/${F}
71 else
72 touch ${S}/kernel/${F}
73 fi
74 done
75
76 #patch the copied kernel source
77 cd ${S}/kernel
78 epatch ${PATCH} || die "Failed to apply patch"
79 }
80
81 src_compile() {
82 einfo "no compiling - just patching source"
83 }
84
85 src_install() {
86 dodir ${KV_DIR}
87 cp -a kernel/* ${D}/${KV_DIR}
88 chown -R root:root ${D}
89 }
90
91
92 pkg_postinst() {
93 ewarn "This may not work with all kernels."
94 ewarn "This only patches the current kernel source code (${KV_DIR})"
95 }

  ViewVC Help
Powered by ViewVC 1.1.20