summaryrefslogtreecommitdiffstats
path: root/rules/jvisu.make
blob: dfea51ba75e421a1d745d0897c6d278d2aa764e0 (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
# $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
#
PACKAGES-$(PTXCONF_JVISU) += jvisu

#
# Paths and names
#
JVISU_VERSION	:= 1.0.0
JVISU		:= JVisu-$(JVISU_VERSION)
JVISU_SUFFIX	:= tgz
JVISU_URL	:= http://www.pengutronix.de/software/jvisu/download/archive/$(JVISU).$(JVISU_SUFFIX)
JVISU_SOURCE	:= $(SRCDIR)/$(JVISU).$(JVISU_SUFFIX)
JVISU_DIR	:= $(BUILDDIR)/$(JVISU)


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

jvisu_get: $(STATEDIR)/jvisu.get

$(STATEDIR)/jvisu.get: $(jvisu_get_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

$(JVISU_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, JVISU)

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

jvisu_extract: $(STATEDIR)/jvisu.extract

$(STATEDIR)/jvisu.extract: $(jvisu_extract_deps_default)
	@$(call targetinfo, $@)
	@$(call clean, $(JVISU_DIR))
	@$(call extract, JVISU)
	@$(call patchin, JVISU)

	# FIXME: we cannot currently overwrite the JAVAPATH on the command line,
	# so we tweak it here in a way that it works at least with Debian
	sed -i -e "s,^JAVAPATH=.*$$,JAVAPATH=$(PTXCONF_SETUP_JAVA_SDK),g" $(JVISU_DIR)/build.properties

	@$(call touch, $@)

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

jvisu_prepare: $(STATEDIR)/jvisu.prepare

JVISU_PATH	=  PATH=$(PTXCONF_SETUP_JAVA_SDK)/bin:$(CROSS_PATH)
JVISU_ENV 	=  $(CROSS_ENV)
JVISU_ENV	+= JAVA_HOME=$(PTXCONF_SETUP_JAVA_SDK)

$(STATEDIR)/jvisu.prepare: $(jvisu_prepare_deps_default)
	@$(call targetinfo, $@)
	@$(call clean, $(JVISU_DIR)/config.cache)
	@$(call touch, $@)

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

jvisu_compile: $(STATEDIR)/jvisu.compile

$(STATEDIR)/jvisu.compile: $(jvisu_compile_deps_default)
	@$(call targetinfo, $@)

	# FIXME: we need ant to do this; should we make it a host tool? 
	cd $(JVISU_DIR) && $(JVISU_ENV) $(JVISU_PATH) ./build.sh jar

	@$(call touch, $@)

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

jvisu_install: $(STATEDIR)/jvisu.install

$(STATEDIR)/jvisu.install: $(jvisu_install_deps_default)
	@$(call targetinfo, $@)
	@$(call touch, $@)

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

jvisu_targetinstall: $(STATEDIR)/jvisu.targetinstall

$(STATEDIR)/jvisu.targetinstall: $(jvisu_targetinstall_deps_default)
	@$(call targetinfo, $@)

	@$(call install_init, jvisu)
	@$(call install_fixup, jvisu,PACKAGE,jvisu)
	@$(call install_fixup, jvisu,PRIORITY,optional)
	@$(call install_fixup, jvisu,VERSION,$(JVISU_VERSION))
	@$(call install_fixup, jvisu,SECTION,base)
	@$(call install_fixup, jvisu,AUTHOR,"Robert Schwebel <r.schwebel\@pengutronix.de>")
	@$(call install_fixup, jvisu,DEPENDS,)
	@$(call install_fixup, jvisu,DESCRIPTION,missing)

ifdef PTXCONF_JVISU_APPLET
	# User: www; Group: www
	@$(call install_copy, jvisu, 12, 102, 0644, $(JVISU_DIR)/jar/jvisu.jar, $(PTXCONF_JVISU_APPLET_PATH)/jvisu.jar, n)
endif

	@$(call install_finish, jvisu)

	@$(call touch, $@)

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

jvisu_clean:
	rm -rf $(STATEDIR)/jvisu.*
	rm -rf $(IMAGEDIR)/jvisu_*
	rm -rf $(JVISU_DIR)

# vim: syntax=make