diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2004-08-23 09:33:24 +0000 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2004-08-23 09:33:24 +0000 |
commit | 8ef4328eb9f3a78491e5f598e8ac5814a8e6df53 (patch) | |
tree | 4d458857ad15b5c7a6a1deb258351b7a90f9c900 /rules/iptables.make | |
parent | 5dbcabd0276cd606bdbde320efc48a0d3fad0b47 (diff) | |
download | ptxdist-8ef4328eb9f3a78491e5f598e8ac5814a8e6df53.tar.gz ptxdist-8ef4328eb9f3a78491e5f598e8ac5814a8e6df53.tar.xz |
added
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunk@1588 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/iptables.make')
-rw-r--r-- | rules/iptables.make | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/rules/iptables.make b/rules/iptables.make new file mode 100644 index 000000000..69c951a8f --- /dev/null +++ b/rules/iptables.make @@ -0,0 +1,145 @@ +# -*-makefile-*- +# $Id: iptables.make,v 1.1 2004/08/23 09:33:24 rsc Exp $ +# +# Copyright (C) 2004 by Robert Schwebel +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +ifdef PTXCONF_IPTABLES +PACKAGES += iptables +endif + +# +# Paths and names +# +IPTABLES_VERSION = 1.2.11 +IPTABLES = iptables-$(IPTABLES_VERSION) +IPTABLES_SUFFIX = tar.bz2 +IPTABLES_URL = http://www.netfilter.org/files/$(IPTABLES).$(IPTABLES_SUFFIX) +IPTABLES_SOURCE = $(SRCDIR)/$(IPTABLES).$(IPTABLES_SUFFIX) +IPTABLES_DIR = $(BUILDDIR)/$(IPTABLES) + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +iptables_get: $(STATEDIR)/iptables.get + +iptables_get_deps = $(IPTABLES_SOURCE) + +$(STATEDIR)/iptables.get: $(iptables_get_deps) + @$(call targetinfo, $@) + @$(call get_patches, $(IPTABLES)) + touch $@ + +$(IPTABLES_SOURCE): + @$(call targetinfo, $@) + @$(call get, $(IPTABLES_URL)) + +# ---------------------------------------------------------------------------- +# Extract +# ---------------------------------------------------------------------------- + +iptables_extract: $(STATEDIR)/iptables.extract + +iptables_extract_deps = $(STATEDIR)/iptables.get + +$(STATEDIR)/iptables.extract: $(iptables_extract_deps) + @$(call targetinfo, $@) + @$(call clean, $(IPTABLES_DIR)) + @$(call extract, $(IPTABLES_SOURCE)) + @$(call patchin, $(IPTABLES)) + touch $@ + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +iptables_prepare: $(STATEDIR)/iptables.prepare + +# +# dependencies +# +iptables_prepare_deps = \ + $(STATEDIR)/iptables.extract \ + $(STATEDIR)/virtual-xchain.install + +IPTABLES_PATH = PATH=$(CROSS_PATH) +IPTABLES_ENV = $(CROSS_ENV) +#IPTABLES_ENV += PKG_CONFIG_PATH=$(CROSS_LIB_DIR)/lib/pkgconfig +#IPTABLES_ENV += + + +$(STATEDIR)/iptables.prepare: $(iptables_prepare_deps) + @$(call targetinfo, $@) + @$(call clean, $(IPTABLES_DIR)/config.cache) + touch $@ + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +iptables_compile: $(STATEDIR)/iptables.compile + +iptables_compile_deps = $(STATEDIR)/iptables.prepare + +$(STATEDIR)/iptables.compile: $(iptables_compile_deps) + @$(call targetinfo, $@) + cd $(IPTABLES_DIR) && $(IPTABLES_ENV) $(IPTABLES_PATH) make KERNEL_DIR=$(KERNEL_DIR) + touch $@ + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +iptables_install: $(STATEDIR)/iptables.install + +$(STATEDIR)/iptables.install: $(STATEDIR)/iptables.compile + @$(call targetinfo, $@) + cd $(IPTABLES_DIR) && $(IPTABLES_ENV) $(IPTABLES_PATH) make install + touch $@ + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +iptables_targetinstall: $(STATEDIR)/iptables.targetinstall + +iptables_targetinstall_deps = $(STATEDIR)/iptables.compile + +$(STATEDIR)/iptables.targetinstall: $(iptables_targetinstall_deps) + @$(call targetinfo, $@) +ifdef $(IPTABLES_INSTALL_IP6TABLES) + install -D $(IPTABLES_DIR)/ip6tables $(ROOTDIR)/sbin/ip6tables + $(CROSS_STRIP) -R .note -R .comment $(ROOTDIR)/sbin/ip6tables +endif +ifdef $(IPTABLES_INSTALL_IPTABLES) + install -D $(IPTABLES_DIR)/iptables $(ROOTDIR)/sbin/iptables + $(CROSS_STRIP) -R .note -R .comment $(ROOTDIR)/sbin/iptables +endif +ifdef $(IPTABLES_INSTALL_IPTABLES_RESTORE) + install -D $(IPTABLES_DIR)/iptables-restore $(ROOTDIR)/sbin/iptables-restore + $(CROSS_STRIP) -R .note -R .comment $(ROOTDIR)/sbin/iptables-restore +endif +ifdef $(IPTABLES_INSTALL_IPTABLES_SAVE) + install -D $(IPTABLES_DIR)/iptables $(ROOTDIR)/sbin/iptables-save + $(CROSS_STRIP) -R .note -R .comment $(ROOTDIR)/sbin/iptables +endif + touch $@ + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +iptables_clean: + rm -rf $(STATEDIR)/iptables.* + rm -rf $(IPTABLES_DIR) + +# vim: syntax=make |