summaryrefslogtreecommitdiffstats
path: root/rules/nano.make
blob: c9c0e414bcf60328c9569b9b249addc0921cd124 (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
# -*-makefile-*-
# $Id$
#
# 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
#
PACKAGES-$(PTXCONF_NANO) += nano

#
# Paths and names
#
NANO_VERSION		= 1.2.4
NANO			= nano-$(NANO_VERSION)
NANO_SUFFIX		= tar.gz
NANO_URL		= http://www.nano-editor.org/dist/v1.2/$(NANO).$(NANO_SUFFIX)
NANO_SOURCE		= $(SRCDIR)/$(NANO).$(NANO_SUFFIX)
NANO_DIR		= $(BUILDDIR)/$(NANO)

-include $(call package_depfile)

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

nano_get: $(STATEDIR)/nano.get

$(STATEDIR)/nano.get: $(nano_get_deps_default)
	@$(call targetinfo, $@)
	@$(call get_patches, $(NANO))
	@$(call touch, $@)

$(NANO_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, $(NANO_URL))

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

nano_extract: $(STATEDIR)/nano.extract

$(STATEDIR)/nano.extract: $(nano_extract_deps_default)
	@$(call targetinfo, $@)
	@$(call clean, $(NANO_DIR))
	@$(call extract, $(NANO_SOURCE))
	@$(call patchin, $(NANO))
	@$(call touch, $@)

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

nano_prepare: $(STATEDIR)/nano.prepare

NANO_PATH	=  PATH=$(CROSS_PATH)
NANO_ENV 	=  $(CROSS_ENV)

#
# autoconf
#
NANO_AUTOCONF =  $(CROSS_AUTOCONF_USR)

$(STATEDIR)/nano.prepare: $(nano_prepare_deps_default)
	@$(call targetinfo, $@)
	@$(call clean, $(NANO_DIR)/config.cache)
	cd $(NANO_DIR) && \
		$(NANO_PATH) $(NANO_ENV) \
		./configure $(NANO_AUTOCONF)
	@$(call touch, $@)

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

nano_compile: $(STATEDIR)/nano.compile

$(STATEDIR)/nano.compile: $(nano_compile_deps_default)
	@$(call targetinfo, $@)
	cd $(NANO_DIR) && $(NANO_ENV) $(NANO_PATH) make
	@$(call touch, $@)

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

nano_install: $(STATEDIR)/nano.install

$(STATEDIR)/nano.install: $(nano_install_deps_default)
	@$(call targetinfo, $@)
	# FIXME: put this into targetinstall? 
	@$(call install, NANO)
	@$(call touch, $@)

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

nano_targetinstall: $(STATEDIR)/nano.targetinstall

$(STATEDIR)/nano.targetinstall: $(nano_targetinstall_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

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

nano_clean:
	rm -rf $(STATEDIR)/nano.*
	rm -rf $(NANO_DIR)

# vim: syntax=make