summaryrefslogtreecommitdiffstats
path: root/rules/tomcat.make
blob: 286b9a6b2a0f12cc28b6bf180a79f2227352b7ce (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
# -*-makefile-*-
#
# Copyright (C) 2009 by Michael Olbrich <m.olbrich@pengutronix.de>
#
# 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_TOMCAT) += tomcat

#
# Paths and names
#
TOMCAT_VERSION	:= 5.0.30
TOMCAT_MD5	:= e140483d062de8dd703cfd6ecac58c71
TOMCAT		:= jakarta-tomcat-$(TOMCAT_VERSION)
TOMCAT_SUFFIX	:= tar.gz
TOMCAT_URL	:= http://archive.apache.org/dist/tomcat/tomcat-5/v5.0.30/bin/$(TOMCAT).$(TOMCAT_SUFFIX)
TOMCAT_SOURCE	:= $(SRCDIR)/$(TOMCAT).$(TOMCAT_SUFFIX)
TOMCAT_DIR	:= $(BUILDDIR)/$(TOMCAT)
TOMCAT_LICENSE	:= Apache-2.0

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

TOMCAT_PREFIX	:= /usr/tomcat

$(STATEDIR)/tomcat.prepare:
	@$(call targetinfo)
	@$(call touch)

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

$(STATEDIR)/tomcat.compile:
	@$(call targetinfo)
	@$(call touch)

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

$(STATEDIR)/tomcat.install:
	@$(call targetinfo)
	@$(call touch)

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

$(STATEDIR)/tomcat.targetinstall:
	@$(call targetinfo)

	@$(call install_init,  tomcat)
	@$(call install_fixup, tomcat,PRIORITY,optional)
	@$(call install_fixup, tomcat,SECTION,base)
	@$(call install_fixup, tomcat,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>")
	@$(call install_fixup, tomcat,DESCRIPTION,missing)

	@$(call install_copy, tomcat, 0, 0, 0755, $(TOMCAT_PREFIX)/bin)
	@$(call install_copy, tomcat, 0, 0, 0755, $(TOMCAT_PREFIX)/conf)
	@$(call install_copy, tomcat, 0, 0, 0755, $(TOMCAT_PREFIX)/common/lib)
	@$(call install_copy, tomcat, 0, 0, 0755, $(TOMCAT_PREFIX)/server/lib)
	@$(call install_copy, tomcat, 0, 0, 0755, $(TOMCAT_PREFIX)/webapps)
	@$(call install_copy, tomcat, 0, 0, 0755, /tmp/tomcat/work)
	@$(call install_copy, tomcat, 0, 0, 0755, /tmp/tomcat/temp)
	@$(call install_copy, tomcat, 0, 0, 0755, /tmp/tomcat/logs)
	@$(call install_link, tomcat, ../../tmp/tomcat/work, $(TOMCAT_PREFIX)/work)
	@$(call install_link, tomcat, ../../tmp/tomcat/temp, $(TOMCAT_PREFIX)/temp)
	@$(call install_link, tomcat, ../../tmp/tomcat/logs, $(TOMCAT_PREFIX)/logs)

	@cd $(TOMCAT_DIR) && for file in bin/*.jar common/lib/*.jar	\
				server/lib/*.jar; do			\
		$(call install_copy, tomcat, 0, 0, 0644,		\
			$(TOMCAT_DIR)/$$file,				\
			$(TOMCAT_PREFIX)/$$file,n);			\
	done
	@$(call install_copy, tomcat, 0, 0, 0644, \
		$(TOMCAT_DIR)/conf/web.xml, \
		$(TOMCAT_PREFIX)/conf/web.xml)
	@$(call install_copy, tomcat, 0, 0, 0644, \
		$(TOMCAT_DIR)/conf/server-minimal.xml, \
		$(TOMCAT_PREFIX)/conf/server.xml)

	@$(call install_alternative, tomcat, 0, 0, 0755, /etc/init.d/tomcat)

	@$(call install_finish, tomcat)

	@$(call touch)

# vim: syntax=make