summaryrefslogtreecommitdiffstats
path: root/rules/nickel.make
blob: db44501bc350865649cb67230e108a5e9bd2ed5d (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
# -*-makefile-*-
# $Id: template-make 8785 2008-08-26 07:48:06Z wsa $
#
# Copyright (C) 2008 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
#
PACKAGES-$(PTXCONF_NICKEL) += nickel

#
# Paths and names
#
NICKEL_VERSION	:= 1.1.0
NICKEL		:= nickel-$(NICKEL_VERSION)
NICKEL_SUFFIX	:= tar.gz
NICKEL_URL	:= http://downloads.sourceforge.net/chaoslizard/$(NICKEL).$(NICKEL_SUFFIX)
NICKEL_SOURCE	:= $(SRCDIR)/$(NICKEL).$(NICKEL_SUFFIX)
NICKEL_DIR	:= $(BUILDDIR)/$(NICKEL)

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

$(NICKEL_SOURCE):
	@$(call targetinfo)
	@$(call get, NICKEL)

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

$(STATEDIR)/nickel.extract:
	@$(call targetinfo)
	@$(call clean, $(NICKEL_DIR))
	@$(call extract, NICKEL)
	@$(call patchin, NICKEL)
	@$(call touch)

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

NICKEL_PATH	:= PATH=$(CROSS_PATH)
NICKEL_ENV 	:= $(CROSS_ENV)

##
## autoconf
##
#NICKEL_AUTOCONF := $(CROSS_AUTOCONF_USR)
#
$(STATEDIR)/nickel.prepare:
#	@$(call targetinfo)
#	@$(call clean, $(NICKEL_DIR)/config.cache)
#	cd $(NICKEL_DIR) && \
#		$(NICKEL_PATH) $(NICKEL_ENV) \
#		./configure $(NICKEL_AUTOCONF)
	@$(call touch)

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

$(STATEDIR)/nickel.compile:
	@$(call targetinfo)
	cd $(NICKEL_DIR)/src && $(NICKEL_PATH) $(MAKE) \
		CC=$(CROSS_CC) LD=$(CROSS_LD) $(PARALLELMFLAGS)
	@$(call touch)

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

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

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

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

	@$(call install_init, nickel)
	@$(call install_fixup, nickel,PACKAGE,nickel)
	@$(call install_fixup, nickel,PRIORITY,optional)
	@$(call install_fixup, nickel,VERSION,$(NICKEL_VERSION))
	@$(call install_fixup, nickel,SECTION,base)
	@$(call install_fixup, nickel,AUTHOR,"Robert Schwebel <your@email.please>")
	@$(call install_fixup, nickel,DEPENDS,)
	@$(call install_fixup, nickel,DESCRIPTION,missing)

	@$(call install_copy, nickel, 0, 0, 0644, \
		$(NICKEL_DIR)/src/libnickel.so.1.1.0, \
		/usr/lib/libnickel.so.1.1.0)
	@$(call install_link, nickel,  \
		libnickel.so.1.1.0, \
		/usr/lib/libnickel.so.1)
	@$(call install_link, nickel,  \
		libnickel.so.1.1.0, \
		/usr/lib/libnickel.so)

	@$(call install_finish, nickel)

	@$(call touch)

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

nickel_clean:
	rm -rf $(STATEDIR)/nickel.*
	rm -rf $(PKGDIR)/nickel_*
	rm -rf $(NICKEL_DIR)

# vim: syntax=make