fix copy'n paste error
[buildroot.git] / package / gnupg / gnupg.mk
blobfcc9c32e57dde06cdc3e6fe85e83db22b31d057b
1 #############################################################
3 # gnupg
5 #############################################################
6 GNUPG_VERSION:=1.4.6
7 GNUPG_SOURCE:=gnupg_$(GNUPG_VERSION).orig.tar.gz
8 GNUPG_PATCH:=gnupg_$(GNUPG_VERSION)-2.1.diff.gz
9 GNUPG_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/g/gnupg
10 GNUPG_DIR:=$(BUILD_DIR)/gnupg-$(GNUPG_VERSION)
11 GNUPG_CAT:=$(ZCAT)
12 GNUPG_BINARY:=g10/gpg
13 GNUPG_TARGET_BINARY:=usr/bin/gpg
15 $(DL_DIR)/$(GNUPG_SOURCE):
16 $(WGET) -P $(DL_DIR) $(GNUPG_SITE)/$(GNUPG_SOURCE)
18 $(DL_DIR)/$(GNUPG_PATCH):
19 $(WGET) -P $(DL_DIR) $(GNUPG_SITE)/$(GNUPG_PATCH)
21 $(GNUPG_DIR)/.unpacked: $(DL_DIR)/$(GNUPG_SOURCE) $(DL_DIR)/$(GNUPG_PATCH)
22 $(GNUPG_CAT) $(DL_DIR)/$(GNUPG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
23 toolchain/patch-kernel.sh $(GNUPG_DIR) package/gnupg/ gnupg\*.patch
24 ifneq ($(GNUPG_PATCH),)
25 (cd $(GNUPG_DIR) && $(GNUPG_CAT) $(DL_DIR)/$(GNUPG_PATCH) | patch -p1)
26 if [ -d $(GNUPG_DIR)/debian/patches ]; then \
27 toolchain/patch-kernel.sh $(GNUPG_DIR) $(GNUPG_DIR)/debian/patches \*.dpatch; \
29 endif
30 $(CONFIG_UPDATE) $(@D)
31 $(SED) 's/-O2//g' $(@D)/configure
32 touch $@
34 $(GNUPG_DIR)/.configured: $(GNUPG_DIR)/.unpacked
35 (cd $(GNUPG_DIR); rm -rf config.cache; \
36 ac_cv_sys_symbol_underscore=no \
37 $(AUTO_CONFIGURE_TARGET) \
38 --prefix=/usr \
39 $(DISABLE_LARGEFILE) \
40 $(DISABLE_NLS) \
41 --disable-regex \
42 --disable-dns-srv \
43 --disable-dns-pka \
44 --disable-dns-cert \
45 --enable-minimal \
47 touch $@
49 $(GNUPG_DIR)/$(GNUPG_BINARY): $(GNUPG_DIR)/.configured
50 $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(GNUPG_DIR)
52 $(TARGET_DIR)/$(GNUPG_TARGET_BINARY): $(GNUPG_DIR)/$(GNUPG_BINARY)
53 $(INSTALL) -D -m0755 $(GNUPG_DIR)/$(GNUPG_BINARY) $@
54 $(INSTALL) -D -m0755 $(GNUPG_DIR)/$(GNUPG_BINARY)v $(@D)/
55 $(STRIPCMD) $(STRIP_STRIP_ALL) $@ $@v
57 gnupg: $(TARGET_DIR)/$(GNUPG_TARGET_BINARY)
59 gnupg-source: $(DL_DIR)/$(GNUPG_SOURCE) $(DL_DIR)/$(GNUPG_PATCH)
61 gnupg-clean:
62 -$(MAKE) -C $(GNUPG_DIR) clean
63 rm -f $(TARGET_DIR)/$(GNUPG_TARGET_BINARY)*
65 gnupg-dirclean:
66 rm -rf $(GNUPG_DIR)
67 #############################################################
69 # Toplevel Makefile options
71 #############################################################
72 ifeq ($(BR2_PACKAGE_GNUPG),y)
73 TARGETS+=gnupg
74 endif