forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
curl.mk
52 lines (43 loc) · 1.33 KB
/
curl.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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += curl
CURL_VERSION := 7.71.1
DEB_CURL_V ?= $(CURL_VERSION)
curl-setup: setup
wget -q -nc -P $(BUILD_SOURCE) https://curl.haxx.se/download/curl-$(CURL_VERSION).tar.xz{,.asc}
$(call PGP_VERIFY,curl-$(CURL_VERSION).tar.xz,asc)
$(call EXTRACT_TAR,curl-$(CURL_VERSION).tar.xz,curl-$(CURL_VERSION),curl)
ifneq ($(wildcard $(BUILD_WORK)/curl/.build_complete),)
curl:
@echo "Using previously built curl."
else
curl: curl-setup gettext openssl libssh2 nghttp2 libidn2
cd $(BUILD_WORK)/curl && ./configure -C \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
--disable-debug \
--disable-dependency-tracking \
--with-libssh2 \
--with-nghttp2 \
--with-ca-bundle=/etc/ssl/certs/cacert.pem
+$(MAKE) -C $(BUILD_WORK)/curl
+$(MAKE) -C $(BUILD_WORK)/curl install \
DESTDIR="$(BUILD_STAGE)/curl"
+$(MAKE) -C $(BUILD_WORK)/curl install \
DESTDIR="$(BUILD_BASE)"
touch $(BUILD_WORK)/curl/.build_complete
endif
curl-package: curl-stage
# curl.mk Package Structure
rm -rf $(BUILD_DIST)/curl
mkdir -p $(BUILD_DIST)/curl
# curl.mk Prep curl
cp -a $(BUILD_STAGE)/curl/usr $(BUILD_DIST)/curl
# curl.mk Sign
$(call SIGN,curl,general.xml)
# curl.mk Make .debs
$(call PACK,curl,DEB_CURL_V)
# curl.mk Build cleanup
rm -rf $(BUILD_DIST)/curl
.PHONY: curl curl-package