forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnettle.mk
48 lines (39 loc) · 1.27 KB
/
nettle.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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += nettle
NETTLE_VERSION := 3.5.1
DEB_NETTLE_V ?= $(NETTLE_VERSION)
nettle-setup: setup
wget -q -nc -P $(BUILD_SOURCE) https://ftpmirror.gnu.org/nettle/nettle-$(NETTLE_VERSION).tar.gz{,.sig}
$(call PGP_VERIFY,nettle-$(NETTLE_VERSION).tar.gz)
$(call EXTRACT_TAR,nettle-$(NETTLE_VERSION).tar.gz,nettle-$(NETTLE_VERSION),nettle)
ifneq ($(wildcard $(BUILD_WORK)/nettle/.build_complete),)
nettle:
@echo "Using previously built nettle."
else
nettle: nettle-setup libgmp10
cd $(BUILD_WORK)/nettle && ./configure -C \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
--disable-assembler
+$(MAKE) -C $(BUILD_WORK)/nettle
+$(MAKE) -C $(BUILD_WORK)/nettle install \
DESTDIR=$(BUILD_STAGE)/nettle
+$(MAKE) -C $(BUILD_WORK)/nettle install \
DESTDIR=$(BUILD_BASE)
touch $(BUILD_WORK)/nettle/.build_complete
endif
nettle-package: nettle-stage
# nettle.mk Package Structure
rm -rf $(BUILD_DIST)/nettle
mkdir -p $(BUILD_DIST)/nettle
# nettle.mk Prep nettle
cp -a $(BUILD_STAGE)/nettle/usr $(BUILD_DIST)/nettle
# nettle.mk Sign
$(call SIGN,nettle,general.xml)
# nettle.mk Make .debs
$(call PACK,nettle,DEB_NETTLE_V)
# nettle.mk Build cleanup
rm -rf $(BUILD_DIST)/nettle
.PHONY: nettle nettle-package