1 #############################################################
5 #############################################################
7 ifeq ($(strip $(USE_NETFILTER_SNAPSHOT
)),)
8 USE_NETFILTER_SNAPSHOT
=20040508
10 NETFILTER_SOURCE
:=patch-o-matic-
$(USE_NETFILTER_SNAPSHOT
).
tar.bz2
11 NETFILTER_DIR
:=$(BUILD_DIR
)/patch-o-matic-
$(USE_NETFILTER_SNAPSHOT
)
12 NETFILTER_SITE
:=ftp
://ftp.netfilter.org
/pub
/patch-o-matic
/snapshot
15 # ipv6_mld breaks net/ipv6/mcast.c
16 NETFILTER_EXCLUDE
:=--exclude submitted
/89_ipv6_mld_netfilter.patch
20 extra
/CLASSIFY.patch \
21 extra
/CONNMARK.patch \
23 extra
/condition.patch \
24 extra
/h323-conntrack-nat.patch \
25 extra
/mms-conntrack-nat.patch \
26 extra
/pptp-conntrack-nat.patch \
29 LINUX_DIR
:=$(BUILD_DIR
)/WRT54GS
/release
/src
/linux
/linux
31 $(DL_DIR
)/$(NETFILTER_SOURCE
):
32 $(WGET
) -P
$(DL_DIR
) $(NETFILTER_SITE
)/$(NETFILTER_SOURCE
)
34 netfilter-source
: $(DL_DIR
)/$(NETFILTER_SOURCE
)
36 $(NETFILTER_DIR
)/.unpacked
: $(DL_DIR
)/$(NETFILTER_SOURCE
)
37 $(NETFILTER_CAT
) $(DL_DIR
)/$(NETFILTER_SOURCE
) |
tar -C
$(BUILD_DIR
) -xvf
-
38 #ignore whitespace in patches
39 $(SED
) "s,\-p1,\-l \-p1," $(NETFILTER_DIR
)/runme
40 touch
$(NETFILTER_DIR
)/.unpacked
42 $(LINUX_DIR
)/.nf-patched
: $(LINUX_DIR
)/.patched
$(NETFILTER_DIR
)/.unpacked
43 -(cd
$(NETFILTER_DIR
); KERNEL_DIR
=$(LINUX_DIR
) .
/runme
--batch
$(NETFILTER_EXCLUDE
) $(NETFILTER_PATCHES
))
44 touch
$(LINUX_DIR
)/.nf-patched
46 netfilter
: $(LINUX_DIR
)/.nf-patched
51 rm -rf
$(NETFILTER_DIR
)