summaryrefslogtreecommitdiffstats
path: root/rules/utelnetd.make
blob: 819f6ae9598dbdb98bf21e2bf7244efb6f94da0d (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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# -*-makefile-*-
# $Id$
#
# Copyright (C) 2002, 2003 by Pengutronix e.K., Hildesheim, Germany
# 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_UTELNETD) += utelnetd

#
# Paths and names
#
UTELNETD_VERSION		= 0.1.9
UTELNETD			= utelnetd-$(UTELNETD_VERSION)
UTELNETD_URL			= http://www.pengutronix.de/software/utelnetd/$(UTELNETD).tar.gz
UTELNETD_SOURCE			= $(SRCDIR)/$(UTELNETD).tar.gz
UTELNETD_DIR			= $(BUILDDIR)/$(UTELNETD)


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

utelnetd_get: $(STATEDIR)/utelnetd.get

$(STATEDIR)/utelnetd.get: $(utelnetd_get_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

$(UTELNETD_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, UTELNETD)

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

utelnetd_extract: $(STATEDIR)/utelnetd.extract

$(STATEDIR)/utelnetd.extract: $(utelnetd_extract_deps_default)
	@$(call targetinfo, $@)
	@$(call clean, $(UTELNETS_DIR))
	@$(call extract, UTELNETD)
	@$(call touch, $@)

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

utelnetd_prepare: $(STATEDIR)/utelnetd.prepare

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

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

utelnetd_compile: $(STATEDIR)/utelnetd.compile

UTELNETD_ENVIRONMENT += PATH=$(CROSS_PATH)
UTELNETD_MAKEVARS    += CROSS=$(COMPILER_PREFIX)

$(STATEDIR)/utelnetd.compile: $(utelnetd_compile_deps_default)
	@$(call targetinfo, $@)
	$(UTELNETD_ENVIRONMENT) make -C $(UTELNETD_DIR) $(UTELNETD_MAKEVARS)
	@$(call touch, $@)

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

utelnetd_install: $(STATEDIR)/utelnetd.install

$(STATEDIR)/utelnetd.install: $(utelnetd_install_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

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

utelnetd_targetinstall: $(STATEDIR)/utelnetd.targetinstall

$(STATEDIR)/utelnetd.targetinstall: $(utelnetd_targetinstall_deps_default)
	@$(call targetinfo, $@)

	@$(call install_init, utelnetd)
	@$(call install_fixup, utelnetd,PACKAGE,utelnetd)
	@$(call install_fixup, utelnetd,PRIORITY,optional)
	@$(call install_fixup, utelnetd,VERSION,$(UTELNETD_VERSION))
	@$(call install_fixup, utelnetd,SECTION,base)
	@$(call install_fixup, utelnetd,AUTHOR,"Robert Schwebel <r.schwebel\@pengutronix.de>")
	@$(call install_fixup, utelnetd,DEPENDS,)
	@$(call install_fixup, utelnetd,DESCRIPTION,missing)
#
# Install the startup script on request only
#
ifdef PTXCONF_ROOTFS_ETC_INITD_UTELNETD
ifdef PTXCONF_ROOTFS_ETC_INITD_UTELNETD_DEFAULT
# install the generic one
	@$(call install_copy, utelnetd, 0, 0, 0755, \
		$(PTXDIST_TOPDIR)/generic/etc/init.d/telnetd, \
		/etc/init.d/telnetd, n)
endif
ifdef PTXCONF_ROOTFS_ETC_INITD_UTELNETD_USER
# install users one
	@$(call install_copy, udev, 0, 0, 0755, \
		${PTXDIST_WORKSPACE}/projectroot/etc/init.d/utelnetd, \
		/etc/init.d/telnetd, n)
endif
endif

#
# FIXME: Is this packet the right location for the link?
#
ifneq ($(PTXCONF_ROOTFS_ETC_INITD_TELNETD_LINK),"")
	@$(call install_copy, utelnetd, 0, 0, 0755, /etc/rc.d)
	@$(call install_link, utelnetd, ../init.d/telnetd, \
		/etc/rc.d/$(PTXCONF_ROOTFS_ETC_INITD_TELNETD_LINK))
endif

	@$(call install_copy, utelnetd, 0, 0, 0755, $(UTELNETD_DIR)/utelnetd, \
		/sbin/utelnetd)

	@$(call install_finish, utelnetd)

	@$(call touch, $@)

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

utelnetd_clean:
	rm -rf $(STATEDIR)/utelnetd.* $(UTELNETD_DIR)

# vim: syntax=make