summaryrefslogtreecommitdiffstats
path: root/rules/host-apache2.make
blob: c8ce5c82f0840dd838a44987dc345e7d286d4c03 (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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# -*-makefile-*-
# $Id$
#
# Copyright (C) 2005 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
#
HOST_PACKAGES-$(PTXCONF_HOST_APACHE2) += host-apache2

#
# Paths and names
#
HOST_APACHE2_VERSION	= 2.0.55
HOST_APACHE2		= httpd-$(HOST_APACHE2_VERSION)
HOST_APACHE2_SUFFIX	= tar.bz2
HOST_APACHE2_URL	= http://ftp.plusline.de/ftp.apache.org/httpd/$(HOST_APACHE2).$(HOST_APACHE2_SUFFIX)
HOST_APACHE2_SOURCE	= $(SRCDIR)/$(HOST_APACHE2).$(HOST_APACHE2_SUFFIX)
HOST_APACHE2_DIR	= $(HOST_BUILDDIR)/$(HOST_APACHE2)

-include $(call package_depfile)

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

host-apache2_get: $(STATEDIR)/host-apache2.get

host-apache2_get_deps = $(HOST_APACHE2_SOURCE)

$(STATEDIR)/host-apache2.get: $(host-apache2_get_deps)
	@$(call targetinfo, $@)
	@$(call touch, $@)

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

host-apache2_extract: $(STATEDIR)/host-apache2.extract

host-apache2_extract_deps = $(STATEDIR)/host-apache2.get

$(STATEDIR)/host-apache2.extract: $(host-apache2_extract_deps)
	@$(call targetinfo, $@)
	@$(call clean, $(HOST_APACHE2_DIR))
	@$(call extract, $(HOST_APACHE2_SOURCE), $(HOST_BUILDDIR))
	@$(call patchin, $(HOST_APACHE2), $(HOST_APACHE2_DIR))
	@$(call touch, $@)

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

host-apache2_prepare: $(STATEDIR)/host-apache2.prepare

#
# dependencies
#
host-apache2_prepare_deps = \
	$(STATEDIR)/host-apache2.extract

HOST_APACHE2_PATH	=  PATH=$(HOST_PATH)
HOST_APACHE2_ENV 	=  $(HOSTCC_ENV)

#
# autoconf
#
HOST_APACHE2_AUTOCONF =  $(HOST_AUTOCONF)

$(STATEDIR)/host-apache2.prepare: $(host-apache2_prepare_deps)
	@$(call targetinfo, $@)
	@$(call clean, $(HOST_APACHE2_DIR)/config.cache)
	cd $(HOST_APACHE2_DIR) && \
		$(HOST_APACHE2_PATH) $(HOST_APACHE2_ENV) \
		./configure $(HOST_APACHE2_AUTOCONF)
	@$(call touch, $@)

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

host-apache2_compile: $(STATEDIR)/host-apache2.compile

host-apache2_compile_deps = $(STATEDIR)/host-apache2.prepare

$(STATEDIR)/host-apache2.compile: $(host-apache2_compile_deps)
	@$(call targetinfo, $@)
	cd $(HOST_APACHE2_DIR)/srclib/apr-util/uri && $(HOST_APACHE2_ENV) $(HOST_APACHE2_PATH) make
	cd $(HOST_APACHE2_DIR)/srclib/pcre && $(HOST_APACHE2_ENV) $(HOST_APACHE2_PATH) make dftables
	cd $(HOST_APACHE2_DIR)/server && $(HOST_APACHE2_ENV) $(HOST_APACHE2_PATH) make gen_test_char
	@$(call touch, $@)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

host-apache2_install: $(STATEDIR)/host-apache2.install

host-apache2_install_deps = $(STATEDIR)/host-apache2.compile

$(STATEDIR)/host-apache2.install: $(host-apache2_install_deps)
	@$(call targetinfo, $@)
	# FIXME
	#@$(call install, HOST-APACHE2,,h)
#	cd $(HOST_APACHE2_DIR) && $(HOST_APACHE2_ENV) $(HOST_APACHE2_PATH) $(MAKE_INSTALL)
	@$(call touch, $@)

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

host-apache2_clean:
	rm -rf $(STATEDIR)/host-apache2.*
	rm -rf $(HOST_APACHE2_DIR)

# vim: syntax=make