forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libgpg-error.mk
57 lines (47 loc) · 1.92 KB
/
libgpg-error.mk
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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
STRAPPROJECTS += libgpg-error
LIBGPG-ERROR_VERSION := 1.37
DEB_LIBGPG-ERROR_V ?= $(LIBGPG-ERROR_VERSION)
ifneq (,$(findstring aarch64,$(GNU_HOST_TRIPLE)))
GPG_SCHEME := aarch64-apple-darwin
else ifneq (,$(findstring arm,$(GNU_HOST_TRIPLE)))
GPG_SCHEME := arm-apple-darwin
else
$(error Host triple $(GNU_HOST_TRIPLE) isn't supported)
endif
libgpg-error-setup: setup
wget -q -nc -P $(BUILD_SOURCE) https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-$(LIBGPG-ERROR_VERSION).tar.bz2{,.sig}
$(call PGP_VERIFY,libgpg-error-$(LIBGPG-ERROR_VERSION).tar.bz2)
$(call EXTRACT_TAR,libgpg-error-$(LIBGPG-ERROR_VERSION).tar.bz2,libgpg-error-$(LIBGPG-ERROR_VERSION),libgpg-error)
ifneq ($(wildcard $(BUILD_WORK)/libgpg-error/.build_complete),)
libgpg-error:
@echo "Using previously built libgpg-error."
else
libgpg-error: libgpg-error-setup
$(SED) -i '/{"armv7-unknown-linux-gnueabihf" },/a \ \ \ \ {"$(GNU_HOST_TRIPLE)", "$(GPG_SCHEME)" },' $(BUILD_WORK)/libgpg-error/src/mkheader.c
cd $(BUILD_WORK)/libgpg-error && ./configure -C \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
--disable-nls
+$(MAKE) -C $(BUILD_WORK)/libgpg-error
+$(MAKE) -C $(BUILD_WORK)/libgpg-error install \
DESTDIR=$(BUILD_STAGE)/libgpg-error
+$(MAKE) -C $(BUILD_WORK)/libgpg-error install \
DESTDIR=$(BUILD_BASE)
touch $(BUILD_WORK)/libgpg-error/.build_complete
endif
libgpg-error-package: libgpg-error-stage
# libgpg-error.mk Package Structure
rm -rf $(BUILD_DIST)/libgpg-error
mkdir -p $(BUILD_DIST)/libgpg-error
# libgpg-error.mk Prep libgpg-error
cp -a $(BUILD_STAGE)/libgpg-error/usr $(BUILD_DIST)/libgpg-error
# libgpg-error.mk Sign
$(call SIGN,libgpg-error,general.xml)
# libgpg-error.mk Make .debs
$(call PACK,libgpg-error,DEB_LIBGPG-ERROR_V)
# libgpg-error.mk Build cleanup
rm -rf $(BUILD_DIST)/libgpg-error
.PHONY: libgpg-error libgpg-error-package