forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libressl.mk
49 lines (40 loc) · 1.39 KB
/
libressl.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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
#SUBPROJECTS += libressl
LIBRESSL_VERSION := 3.0.2
DEB_LIBRESSL_V ?= $(LIBRESSL_VERSION)
libressl-setup: setup
wget -q -nc -P $(BUILD_SOURCE) https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-$(LIBRESSL_VERSION).tar.gz{,.asc}
$(call PGP_VERIFY,libressl-$(LIBRESSL_VERSION).tar.gz,asc)
$(call EXTRACT_TAR,libressl-$(LIBRESSL_VERSION).tar.gz,libressl-$(LIBRESSL_VERSION),libressl)
ifneq ($(wildcard $(BUILD_WORK)/libressl/.build_complete),)
libressl:
@echo "Using previously built libressl."
else
libressl: libressl-setup
cd $(BUILD_WORK)/libressl && ./configure -C \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
--with-openssldir=/etc/ssl \
--sysconfdir=/etc
+$(MAKE) -C $(BUILD_WORK)/libressl
+$(MAKE) -C $(BUILD_WORK)/libressl install \
DESTDIR=$(BUILD_STAGE)/libressl
+$(MAKE) -C $(BUILD_WORK)/libressl install \
DESTDIR=$(BUILD_BASE)
touch $(BUILD_WORK)/libressl/.build_complete
endif
libressl-package: libressl-stage
# libressl.mk Package Structure
rm -rf $(BUILD_DIST)/libressl
mkdir -p $(BUILD_DIST)/libressl
# libressl.mk Prep libressl
cp -a $(BUILD_STAGE)/libressl/{etc,usr} $(BUILD_DIST)/libressl
# libressl.mk Sign
$(call SIGN,libressl,general.xml)
# libressl.mk Make .debs
$(call PACK,libressl,DEB_LIBRESSL_V)
# libressl.mk Build cleanup
rm -rf $(BUILD_DIST)/libressl
.PHONY: libressl libressl-package