summaryrefslogtreecommitdiffstats
path: root/rules/gnupg.make
blob: a8711363b79a6512947c797207f01fc3d7236873 (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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# -*-makefile-*-
# $Id: gnupg.make,v 1.4 2005/04/26 12:16:24 michl Exp $
#
# Copyright (C) 2005 by Jiri Nesladek
#          
# 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_GNUPG) += gnupg

#
# Paths and names
#
GNUPG_VERSION	= 1.4.1
GNUPG		= gnupg-$(GNUPG_VERSION)
GNUPG_SUFFIX	= tar.bz2
GNUPG_URL	= ftp://ftp.gnupg.org/gcrypt/gnupg/$(GNUPG).$(GNUPG_SUFFIX)
GNUPG_SOURCE	= $(SRCDIR)/$(GNUPG).$(GNUPG_SUFFIX)
GNUPG_DIR	= $(BUILDDIR)/$(GNUPG)

-include $(call package_depfile)

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

gnupg_get: $(STATEDIR)/gnupg.get

gnupg_get_deps = $(GNUPG_SOURCE)

$(STATEDIR)/gnupg.get: $(gnupg_get_deps)
	@$(call targetinfo, $@)
	@$(call get_patches, $(GNUPG))
	@$(call touch, $@)

$(GNUPG_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, $(GNUPG_URL))

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

gnupg_extract: $(STATEDIR)/gnupg.extract

gnupg_extract_deps = $(STATEDIR)/gnupg.get

$(STATEDIR)/gnupg.extract: $(gnupg_extract_deps)
	@$(call targetinfo, $@)
	@$(call clean, $(GNUPG_DIR))
	@$(call extract, $(GNUPG_SOURCE))
	@$(call patchin, $(GNUPG))
	@$(call touch, $@)

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

gnupg_prepare: $(STATEDIR)/gnupg.prepare

#
# dependencies
#
gnupg_prepare_deps = \
	$(STATEDIR)/gnupg.extract \
	$(STATEDIR)/virtual-xchain.install

GNUPG_PATH	= PATH=$(CROSS_PATH)
GNUPG_ENV 	= $(CROSS_ENV)

#
# autoconf
#
GNUPG_AUTOCONF = $(CROSS_AUTOCONF_USR) \
	--disable-card-support \
	--disable-gnupg-iconv \
	--disable-exec \
	--disable-idea \
	--enable-cast5 \
	--enable-blowfish \
	--enable-aes \
	--enable-twofish \
	--enable-sha256 \
	--enable-sha512 \
	--disable-exec \
	--disable-photo-viewers \
	--disable-keyserver-helpers \
	--disable-ldap \
	--disable-hkp \
	--disable-http \
	--disable-finger \
	--disable-ftp \
	--disable-keyserver-path \
	--disable-largefile \
	--disable-dns-srv \
	--disable-nls \
	--disable-rpath \
	--disable-regex

$(STATEDIR)/gnupg.prepare: $(gnupg_prepare_deps)
	@$(call targetinfo, $@)
	@$(call clean, $(GNUPG_DIR)/config.cache)
	cd $(GNUPG_DIR) && \
		$(GNUPG_PATH) $(GNUPG_ENV) \
		./configure $(GNUPG_AUTOCONF)
	@$(call touch, $@)

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

gnupg_compile: $(STATEDIR)/gnupg.compile

gnupg_compile_deps = $(STATEDIR)/gnupg.prepare

$(STATEDIR)/gnupg.compile: $(gnupg_compile_deps)
	@$(call targetinfo, $@)
	cd $(GNUPG_DIR) && $(GNUPG_ENV) $(GNUPG_PATH) make
	@$(call touch, $@)

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

gnupg_install: $(STATEDIR)/gnupg.install

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

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

gnupg_targetinstall: $(STATEDIR)/gnupg.targetinstall

gnupg_targetinstall_deps = $(STATEDIR)/gnupg.install

$(STATEDIR)/gnupg.targetinstall: $(gnupg_targetinstall_deps)
	@$(call targetinfo, $@)

	@$(call install_init,default)
	@$(call install_fixup,PACKAGE,gnupg)
	@$(call install_fixup,PRIORITY,optional)
	@$(call install_fixup,VERSION,$(GNUPG_VERSION))
	@$(call install_fixup,SECTION,base)
	@$(call install_fixup,AUTHOR,"Jiri Nesladek <nesladek\@2n.cz>")
	@$(call install_fixup,DEPENDS,)
	@$(call install_fixup,DESCRIPTION,missing)

	@$(call install_copy, 0, 0, 0755, $(GNUPG_DIR)/g10/gpg, /usr/bin/gpg)

	@$(call install_finish)

	@$(call touch, $@)

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

gnupg_clean:
	rm -rf $(STATEDIR)/gnupg.*
	rm -rf $(IMAGEDIR)/gnupg_*
	rm -rf $(GNUPG_DIR)

# vim: syntax=make