summaryrefslogtreecommitdiffstats
path: root/rules/pop3spam.make
blob: 4a4a61e6f2c114d86b202214d39444e60fe23766 (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
# -*-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
#
ifdef PTXCONF_POP3SPAM
PACKAGES += pop3spam
endif

#
# Paths and names
#
POP3SPAM_VERSION	= 0.9
POP3SPAM		= pop3spam-$(POP3SPAM_VERSION)
POP3SPAM_SUFFIX		= tar.bz2
POP3SPAM_URL		= $(PTXCONF_SETUP_SFMIRROR)/pop3spam/$(POP3SPAM).$(POP3SPAM_SUFFIX)
POP3SPAM_SOURCE		= $(SRCDIR)/$(POP3SPAM).$(POP3SPAM_SUFFIX)
POP3SPAM_DIR		= $(BUILDDIR)/$(POP3SPAM)

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

pop3spam_get: $(STATEDIR)/pop3spam.get

pop3spam_get_deps = $(POP3SPAM_SOURCE)

$(STATEDIR)/pop3spam.get: $(pop3spam_get_deps)
	@$(call targetinfo, $@)
	@$(call get_patches, $(POP3SPAM))
	touch $@

$(POP3SPAM_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, $(POP3SPAM_URL))

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

pop3spam_extract: $(STATEDIR)/pop3spam.extract

pop3spam_extract_deps = $(STATEDIR)/pop3spam.get

$(STATEDIR)/pop3spam.extract: $(pop3spam_extract_deps)
	@$(call targetinfo, $@)
	@$(call clean, $(POP3SPAM_DIR))
	@$(call extract, $(POP3SPAM_SOURCE))
	@$(call patchin, $(POP3SPAM))
	touch $@

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

pop3spam_prepare: $(STATEDIR)/pop3spam.prepare

#
# dependencies
#
pop3spam_prepare_deps =  $(STATEDIR)/pop3spam.extract
pop3spam_prepare_deps += $(STATEDIR)/virtual-xchain.install
pop3spam_prepare_deps += $(STATEDIR)/pcre.install

POP3SPAM_PATH	=  PATH=$(CROSS_PATH)
POP3SPAM_ENV 	=  $(CROSS_ENV)
#POP3SPAM_ENV	+= PKG_CONFIG_PATH=$(CROSS_LIB_DIR)/lib/pkgconfig
#POP3SPAM_ENV	+=

#
# autoconf
#
POP3SPAM_AUTOCONF = \
	--build=$(GNU_HOST) \
	--host=$(PTXCONF_GNU_TARGET) \
	--prefix=$(CROSS_LIB_DIR)

$(STATEDIR)/pop3spam.prepare: $(pop3spam_prepare_deps)
	@$(call targetinfo, $@)
	@$(call clean, $(POP3SPAM_DIR)/config.cache)
	cd $(POP3SPAM_DIR) && \
		$(POP3SPAM_PATH) $(POP3SPAM_ENV) \
		./configure $(POP3SPAM_AUTOCONF)
	touch $@

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

pop3spam_compile: $(STATEDIR)/pop3spam.compile

pop3spam_compile_deps = $(STATEDIR)/pop3spam.prepare

$(STATEDIR)/pop3spam.compile: $(pop3spam_compile_deps)
	@$(call targetinfo, $@)
	cd $(POP3SPAM_DIR) && $(POP3SPAM_ENV) $(POP3SPAM_PATH) make
	touch $@

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

pop3spam_install: $(STATEDIR)/pop3spam.install

$(STATEDIR)/pop3spam.install: $(STATEDIR)/pop3spam.compile
	@$(call targetinfo, $@)
	cd $(POP3SPAM_DIR) && $(POP3SPAM_ENV) $(POP3SPAM_PATH) make install
	touch $@

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

pop3spam_targetinstall: $(STATEDIR)/pop3spam.targetinstall

pop3spam_targetinstall_deps =  $(STATEDIR)/pop3spam.compile
pop3spam_targetinstall_deps += $(STATEDIR)/pcre.targetinstall

$(STATEDIR)/pop3spam.targetinstall: $(pop3spam_targetinstall_deps)
	@$(call targetinfo, $@)
	$(call copy_root, 0, 0, 0555, $(POP3SPAM_DIR)/src/pop3spam, /usr/bin/pop3spam)
	touch $@

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

pop3spam_clean:
	rm -rf $(STATEDIR)/pop3spam.*
	rm -rf $(POP3SPAM_DIR)

# vim: syntax=make