summaryrefslogtreecommitdiffstats
path: root/rules/shorewall.make
blob: 01e53732ae1543d281bd7c7e21ea79237ecebd81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# -*-makefile-*-
# $Id$
#
# Copyright (C) 2003 by Dan Kegel, Ixia Communications (http://ixiacom.com)
#
# 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_SHOREWALL
PACKAGES += shorewall
endif

#
# Paths and names
#
SHOREWALL_VERSION	= 1.4.7-RC1
SHOREWALL		= shorewall-$(SHOREWALL_VERSION)
SHOREWALL_SUFFIX	= tgz
SHOREWALL_URL		= http://www.shorewall.net/pub/shorewall/Beta/$(SHOREWALL).$(SHOREWALL_SUFFIX)
SHOREWALL_SOURCE	= $(SRCDIR)/$(SHOREWALL).$(SHOREWALL_SUFFIX)
SHOREWALL_DIR		= $(BUILDDIR)/shorewall-1.4.7

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

shorewall_get: $(STATEDIR)/shorewall.get

shorewall_get_deps	=  $(SHOREWALL_SOURCE)

$(STATEDIR)/shorewall.get: $(shorewall_get_deps)
	@$(call targetinfo, $@)
	touch $@

$(SHOREWALL_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, $(SHOREWALL_URL))

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

shorewall_extract: $(STATEDIR)/shorewall.extract

shorewall_extract_deps	=  $(STATEDIR)/shorewall.get

$(STATEDIR)/shorewall.extract: $(shorewall_extract_deps)
	@$(call targetinfo, $@)
	@$(call clean, $(SHOREWALL_DIR))
	@$(call extract, $(SHOREWALL_SOURCE))
	touch $@

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

shorewall_prepare: $(STATEDIR)/shorewall.prepare

$(STATEDIR)/shorewall.prepare:
	@$(call targetinfo, $@)
	touch $@

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

shorewall_compile: $(STATEDIR)/shorewall.compile

$(STATEDIR)/shorewall.compile:
	@$(call targetinfo, $@)
	touch $@

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

shorewall_targetinstall: $(STATEDIR)/shorewall.targetinstall

shorewall_targetinstall_deps	=  $(STATEDIR)/shorewall.extract

#
# create /etc/shorewall directory before installing to keep it from
# using build system's chkconfig script to install itself!
#
$(STATEDIR)/shorewall.targetinstall: $(shorewall_targetinstall_deps)
	@$(call targetinfo, $@)
	mkdir -p $(ROOTDIR)/etc/shorewall
	PREFIX=$(ROOTDIR) sh $(SHOREWALL_DIR)/install.sh /etc/init.d
	touch $@

# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

shorewall_clean:
	rm -rf $(STATEDIR)/shorewall.*
	rm -rf $(SHOREWALL_DIR)

# vim: syntax=make