summaryrefslogtreecommitdiffstats
path: root/rules/totd.make
blob: c1f704dc0f39e632bcf015b850ab0842c0d52ffd (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
# -*-makefile-*-
#
# Copyright (C) 2009 by Bjoern Buerger <b.buerger@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_TOTD) += totd

#
# Paths and names
#
TOTD_VERSION	:= 1.5
TOTD_MD5	:= b7da63fc1ea1b2e2ce959732826bc146
TOTD		:= totd-$(TOTD_VERSION)
TOTD_SUFFIX	:= tar.gz
TOTD_URL	:= http://www.dillema.net/software/totd/$(TOTD).$(TOTD_SUFFIX)
TOTD_SOURCE	:= $(SRCDIR)/$(TOTD).$(TOTD_SUFFIX)
TOTD_DIR	:= $(BUILDDIR)/$(TOTD)
PTRTD_LICENSE  	:= multiple AND BSD Style

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

#
# autoconf
#
TOTD_MAKE_OPT := CC=$(CROSS_CC)

TOTD_AUTOCONF := \
	$(CROSS_AUTOCONF_USR) \
	--disable-malloc-debug \
	--enable-debug-tcp-only


ifdef PTXCONF_TOTD_IPV4
TOTD_AUTOCONF += --enable-ip4
else
TOTD_AUTOCONF += --disable-ip4
endif
ifdef PTXCONF_TOTD_IPV6
TOTD_AUTOCONF += --enable-ip6
else
TOTD_AUTOCONF += --disable-ip6
endif
ifdef PTXCONF_TOTD_STF
TOTD_AUTOCONF += --enable-stf
else
TOTD_AUTOCONF += --disable-stf
endif
ifdef PTXCONF_TOTD_SCOPED_REWRITE
TOTD_AUTOCONF += --enable-scoped-rewrite
else
TOTD_AUTOCONF += --disable-scoped-rewrite
endif
ifdef PTXCONF_TOTD_HTTPD_SERVER
TOTD_AUTOCONF += --enable-http-server
else
TOTD_AUTOCONF += --disable-http-server
endif

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

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

	@$(call install_init,  totd)
	@$(call install_fixup, totd,PRIORITY,optional)
	@$(call install_fixup, totd,SECTION,base)
	@$(call install_fixup, totd,AUTHOR,"Bjoern Buerger <b.buerger@pengutronix.de>")
	@$(call install_fixup, totd,DESCRIPTION,missing)

	@$(call install_copy, totd, 0, 0, 0755, -, /usr/sbin/totd)

	@$(call install_finish, totd)

	@$(call touch)

# vim: syntax=make