summaryrefslogtreecommitdiffstats
path: root/rules/host-checkinstall.make
blob: c56d115837b38525d24aa9ce64dfb8ba009b26cc (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
123
124
125
126
# -*-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_IMAGE_DEB) += host-checkinstall

#
# Paths and names
#
HOST_CHECKINSTALL_VERSION	= 1.6.0
HOST_CHECKINSTALL		= checkinstall-$(HOST_CHECKINSTALL_VERSION)
HOST_CHECKINSTALL_SUFFIX	= tgz
HOST_CHECKINSTALL_URL		= http://checkinstall.izto.org/files/source/$(HOST_CHECKINSTALL).$(HOST_CHECKINSTALL_SUFFIX)
HOST_CHECKINSTALL_SOURCE	= $(SRCDIR)/$(HOST_CHECKINSTALL).$(HOST_CHECKINSTALL_SUFFIX)
HOST_CHECKINSTALL_DIR		= $(HOST_BUILDDIR)/$(HOST_CHECKINSTALL)

-include $(call package_depfile)

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

host-checkinstall_get: $(STATEDIR)/host-checkinstall.get

host-checkinstall_get_deps = $(HOST_CHECKINSTALL_SOURCE)

$(STATEDIR)/host-checkinstall.get: $(host-checkinstall_get_deps)
	@$(call targetinfo, $@)
	@$(call get_patches, $(HOST_CHECKINSTALL))
	@$(call touch, $@)

$(HOST_CHECKINSTALL_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, $(HOST_CHECKINSTALL_URL))

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

host-checkinstall_extract: $(STATEDIR)/host-checkinstall.extract

host-checkinstall_extract_deps = $(STATEDIR)/host-checkinstall.get

$(STATEDIR)/host-checkinstall.extract: $(host-checkinstall_extract_deps)
	@$(call targetinfo, $@)
	@$(call clean, $(HOST_CHECKINSTALL_DIR))
	@$(call extract, $(HOST_CHECKINSTALL_SOURCE), $(HOST_BUILDDIR))
	@$(call patchin, $(HOST_CHECKINSTALL), $(HOST_CHECKINSTALL_DIR))
	@$(call touch, $@)

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

host-checkinstall_prepare: $(STATEDIR)/host-checkinstall.prepare

#
# dependencies
#
host-checkinstall_prepare_deps = \
	$(STATEDIR)/host-checkinstall.extract

HOST_CHECKINSTALL_PATH	=  PATH=$(HOST_PATH)
HOST_CHECKINSTALL_ENV 	=  $(HOSTCC_ENV)

#
# autoconf
#
HOST_CHECKINSTALL_AUTOCONF =  $(HOST_AUTOCONF)

$(STATEDIR)/host-checkinstall.prepare: $(host-checkinstall_prepare_deps)
	@$(call targetinfo, $@)
#	@$(call clean, $(HOST_CHECKINSTALL_DIR)/config.cache)
#	cd $(HOST_CHECKINSTALL_DIR) && \
#		$(HOST_CHECKINSTALL_PATH) $(HOST_CHECKINSTALL_ENV) \
#		./configure $(HOST_CHECKINSTALL_AUTOCONF)
	@$(call touch, $@)

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

host-checkinstall_compile: $(STATEDIR)/host-checkinstall.compile

host-checkinstall_compile_deps = $(STATEDIR)/host-checkinstall.prepare

$(STATEDIR)/host-checkinstall.compile: $(host-checkinstall_compile_deps)
	@$(call targetinfo, $@)
	cd $(HOST_CHECKINSTALL_DIR)/installwatch-* && $(HOST_CHECKINSTALL_ENV) $(HOST_CHECKINSTALL_PATH) make
	@$(call touch, $@)

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

host-checkinstall_install: $(STATEDIR)/host-checkinstall.install

host-checkinstall_install_deps = $(STATEDIR)/host-checkinstall.compile

$(STATEDIR)/host-checkinstall.install: $(host-checkinstall_install_deps)
	@$(call targetinfo, $@)
	# manual installation, make sure the directories exist
	mkdir -p $(PTXCONF_PREFIX)/lib
	mkdir -p $(PTXCONF_PREFIX)/bin
	cd $(HOST_CHECKINSTALL_DIR)/installwatch-* && make install PREFIX=$(PTXCONF_PREFIX)
	@$(call touch, $@)

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

host-checkinstall_clean:
	rm -rf $(STATEDIR)/host-checkinstall.*
	rm -rf $(HOST_CHECKINSTALL_DIR)

# vim: syntax=make