# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit kmod eutils MY_P=netfilter-layer7-v${PV} DESCRIPTION="Kernel modules for layer 7 iptables filtering" HOMEPAGE="http://l7-filter.sourceforge.net" SRC_URI="mirror://sourceforge/l7-filter/${MY_P}.tar.gz" RESTRICT="nomirror" LICENSE="GPL-2" SLOT="${KV}" KEYWORDS="~x86" IUSE="" S=${WORKDIR}/${MY_P} DEPEND="virtual/libc" RDEPEND="virtual/libc" src_unpack() { # Unpack and set some variables kmod_src_unpack cd ${S} PATCH=kernel-${KV_MAJOR}.${KV_MINOR}-layer7-${PV}.patch if [ ! -f ${PATCH} ]; then die "Kernel version ${KV_VERSION_FULL} no supported" fi # create needed directories mkdir -p ${S}/kernel/net/ipv4/netfilter/regexp/ mkdir -p ${S}/kernel/include/linux/netfilter_ipv4/ # start to copy needed files, if file not exists create an empty file cd ${KV_OUTPUT} FILES=$(patch -t --dry-run -p1 < ${S}/${PATCH} | cut -f 3 -d ' ') for F in ${FILES}; do if [ -f ${F} ]; then cp -P ${F} ${S}/kernel/${F} else touch ${S}/kernel/${F} fi done } src_compile() { #patch the copied kernel source cd ${S}/kernel epatch ${S}/${PATCH} } src_install() { mkdir -p ${D}usr/src/linux cp -a kernel/* ${D}usr/src/linux }