summaryrefslogtreecommitdiffstats
path: root/rules/proftpd.make
blob: 7ae52984c1f4a320a0a696dfc9da3fbd3ac56963 (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
# -*-makefile-*-
# $Id: proftpd.make,v 1.5 2003/10/23 15:01:19 mkl Exp $
#
# Copyright (C) 2002 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
#
ifeq (y, $(PTXCONF_PROFTPD))
PACKAGES += proftpd
endif

#
# Paths and names 
#
PROFTPD_VERSION 	= 1.2.8
PROFTPD			= proftpd-$(PROFTPD_VERSION)
PROFTPD_URL		= ftp://ftp.proftpd.org/distrib/source/$(PROFTPD).tar.gz
PROFTPD_SOURCE		= $(SRCDIR)/$(PROFTPD).tar.gz
PROFTPD_DIR		= $(BUILDDIR)/$(PROFTPD)
PROFTPD_EXTRACT 	= gzip -dc

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

proftpd_get: $(STATEDIR)/proftpd.get

$(STATEDIR)/proftpd.get: $(PROFTPD_SOURCE)
	@$(call targetinfo, proftpd.get)
	touch $@

$(PROFTPD_SOURCE):
	@$(call targetinfo, $(PROFTPD_SOURCE))
	wget -P $(SRCDIR) $(PASSIVEFTP) $(PROFTPD_URL)

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

proftpd_extract: $(STATEDIR)/proftpd.extract

$(STATEDIR)/proftpd.extract: $(STATEDIR)/proftpd.get
	@$(call targetinfo, proftpd.extract)
	$(PROFTPD_EXTRACT) $(PROFTPD_SOURCE) | $(TAR) -C $(BUILDDIR) -xf -
	touch $@

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

proftpd_prepare: $(STATEDIR)/proftpd.prepare

PROFTPD_AUTOCONF = --prefix=/
PROFTPD_ENVIRONMENT =

ifdef PTXCONF_PROFTPD_PAM
PROFTPD_AUTOCONF += --enable-pam
else
PROFTPD_AUTOCONF += --disable-pam
endif
ifdef PTXCONF_PROFTPD_SENDFILE
PROFTPD_AUTOCONF += --enable-sendfile
else
PROFTPD_AUTOCONF += --disable-sendfile
endif
ifdef PTXCONF_PROFTPD_SHADOW
PROFTPD_AUTOCONF += --enable-shadow
else
PROFTPD_AUTOCONF += --disable-shadow
endif
ifdef PTXCONF_PROFTPD_AUTOSHADOW
PROFTPD_AUTOCONF += --enable-autoshadow
else
PROFTPD_AUTOCONF += --disable-autoshadow
endif

$(STATEDIR)/proftpd.prepare: $(STATEDIR)/proftpd.extract
	@$(call targetinfo, proftpd.prepare)
	cd $(PROFTPD_DIR) && 						\
	$(PROFTPD_ENVIRONMENT) ./configure $(PROFTPD_AUTOCONF) 
	touch $@

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

proftpd_compile: $(STATEDIR)/proftpd.compile

$(STATEDIR)/proftpd.compile: $(STATEDIR)/proftpd.prepare 
	@$(call targetinfo, proftpd.compile)
	make -C $(PROFTPD_DIR) $(MAKEPARMS)
	touch $@

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

proftpd_install: $(STATEDIR)/proftpd.install

$(STATEDIR)/proftpd.install: $(STATEDIR)/proftpd.compile
	@$(call targetinfo, proftpd.install)
	# don't make install - would install files on development host...
	touch $@

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

proftpd_targetinstall: $(STATEDIR)/proftpd.targetinstall

$(STATEDIR)/proftpd.targetinstall: $(STATEDIR)/proftpd.install
	@$(call targetinfo, proftpd.targetinstall)
	install $(PROFTPD_DIR)/proftpd $(ROOTDIR)/sbin/proftpd
	$(CROSSSTRIP) -S $(ROOTDIR)/sbin/proftpd
	touch $@

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

proftpd_clean: 
	rm -rf $(STATEDIR)/proftpd.* $(PROFTPD_DIR)

# vim: syntax=make