summaryrefslogtreecommitdiffstats
path: root/rules/penguzilla.make
blob: 1bebb1341e83da50ae0096b6512df11481d2f425 (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
145
146
147
148
149
150
151
152
153
154
155
156
# -*-makefile-*-
# $Id: penguzilla.make,v 1.14 2004/08/27 14:52:04 bsp Exp $
#
# Copyright (C) 2003 by Robert Schwebel <r.schwebel@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
#
ifdef PTXCONF_PENGUZILLA
PACKAGES += penguzilla
endif

#
# Paths and names
#
PENGUZILLA_VERSION	= 0.4.0
PENGUZILLA		= penguzilla-$(PENGUZILLA_VERSION)
PENGUZILLA_SUFFIX	= tar.gz
PENGUZILLA_URL		= http://metis.pengutronix.de/$(PENGUZILLA).$(PENGUZILLA_SUFFIX)
PENGUZILLA_SOURCE	= $(SRCDIR)/$(PENGUZILLA).$(PENGUZILLA_SUFFIX)
PENGUZILLA_DIR		= $(BUILDDIR)/$(PENGUZILLA)

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

penguzilla_get: $(STATEDIR)/penguzilla.get

penguzilla_get_deps	=  $(PENGUZILLA_SOURCE)

$(STATEDIR)/penguzilla.get: $(penguzilla_get_deps)
	@$(call targetinfo, $@)
	touch $@

$(PENGUZILLA_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, $(PENGUZILLA_URL))

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

penguzilla_extract: $(STATEDIR)/penguzilla.extract

penguzilla_extract_deps	=  $(STATEDIR)/penguzilla.get

$(STATEDIR)/penguzilla.extract: $(penguzilla_extract_deps)
	@$(call targetinfo, $@)
	@$(call clean, $(PENGUZILLA_DIR))
	@$(call extract, $(PENGUZILLA_SOURCE))
	touch $@

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

penguzilla_prepare: $(STATEDIR)/penguzilla.prepare

#
# dependencies
#
penguzilla_prepare_deps =  \
	$(STATEDIR)/penguzilla.extract \
	$(STATEDIR)/virtual-xchain.install \
	$(STATEDIR)/mfirebird.install \
	$(STATEDIR)/gail.install \
	$(STATEDIR)/libxml2.install

PENGUZILLA_PATH	=  PATH=$(PTXCONF_PREFIX)/$(PTXCONF_GNU_TARGET)/bin:$(CROSS_PATH)
PENGUZILLA_ENV 	=  $(CROSS_ENV)
PENGUZILLA_ENV	+= PKG_CONFIG_PATH=$(CROSS_LIB_DIR)/lib/pkgconfig/


#
# autoconf
#
PENGUZILLA_AUTOCONF	=  --prefix=/usr
PENGUZILLA_AUTOCONF	+= --build=$(GNU_HOST)
PENGUZILLA_AUTOCONF	+= --host=$(PTXCONF_GNU_TARGET)

PENGUZILLA_AUTOCONF	+= --with-mozilla=$(MFIREBIRD_DIR)
PENGUZILLA_AUTOCONF	+= --with-gtk-prefix=$(PTXCONF_PREFIX)/$(PTXCONF_GNU_TARGET)

$(STATEDIR)/penguzilla.prepare: $(penguzilla_prepare_deps)
	@$(call targetinfo, $@)
	@$(call clean, $(PENGUZILLA_BUILDDIR))
	cd $(PENGUZILLA_DIR) && \
		$(PENGUZILLA_PATH) $(PENGUZILLA_ENV) \
		./configure $(PENGUZILLA_AUTOCONF)
	touch $@

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

penguzilla_compile: $(STATEDIR)/penguzilla.compile

penguzilla_compile_deps =  $(STATEDIR)/penguzilla.prepare

$(STATEDIR)/penguzilla.compile: $(penguzilla_compile_deps)
	@$(call targetinfo, $@)
	$(PENGUZILLA_PATH) $(PENGUZILLA_ENV) make -C $(PENGUZILLA_DIR)
	touch $@

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

penguzilla_install: $(STATEDIR)/penguzilla.install

$(STATEDIR)/penguzilla.install: $(STATEDIR)/penguzilla.compile
	@$(call targetinfo, $@)
	touch $@

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

penguzilla_targetinstall: $(STATEDIR)/penguzilla.targetinstall

penguzilla_targetinstall_deps =	\
	$(STATEDIR)/penguzilla.compile	\
	$(STATEDIR)/gtk2-engines.targetinstall \
	$(STATEDIR)/gail.targetinstall \
	$(STATEDIR)/libxml2.targetinstall

$(STATEDIR)/penguzilla.targetinstall: $(penguzilla_targetinstall_deps)
	@$(call targetinfo, $@)

# 	# pixmap directory
	install -d $(ROOTDIR)/usr/share/penguzilla/pixmaps
	cp -a $(PENGUZILLA_DIR)/pixmaps/* $(ROOTDIR)/usr/share/penguzilla/pixmaps

	install -d $(ROOTDIR)/usr/bin
	install $(PENGUZILLA_DIR)/src/penguzilla $(ROOTDIR)/usr/bin

# 	# Style
	install $(PENGUZILLA_DIR)/penguzilla.rc $(ROOTDIR)/usr/share/penguzilla

	touch $@

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

penguzilla_clean:
	rm -rf $(STATEDIR)/penguzilla.*
	rm -rf $(PENGUZILLA_DIR)

# vim: syntax=make