forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibssh2.mk
51 lines (42 loc) · 1.41 KB
/
libssh2.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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += libssh2
LIBSSH2_VERSION := 1.9.0
DEB_LIBSSH2_V ?= $(LIBSSH2_VERSION)
libssh2-setup: setup
wget -q -nc -P $(BUILD_SOURCE) https://libssh2.org/download/libssh2-$(LIBSSH2_VERSION).tar.gz{,.asc}
$(call PGP_VERIFY,libssh2-$(LIBSSH2_VERSION).tar.gz,asc)
$(call EXTRACT_TAR,libssh2-$(LIBSSH2_VERSION).tar.gz,libssh2-$(LIBSSH2_VERSION),libssh2)
ifneq ($(wildcard $(BUILD_WORK)/libssh2/.build_complete),)
libssh2:
@echo "Using previously built libssh2."
else
libssh2: libssh2-setup openssl
find $(BUILD_BASE) -name "*.la" -type f -delete
cd $(BUILD_WORK)/libssh2 && ./configure -C \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
--disable-debug \
--disable-dependency-tracking \
--with-libz
+$(MAKE) -C $(BUILD_WORK)/libssh2
+$(MAKE) -C $(BUILD_WORK)/libssh2 install \
DESTDIR="$(BUILD_STAGE)/libssh2"
+$(MAKE) -C $(BUILD_WORK)/libssh2 install \
DESTDIR="$(BUILD_BASE)"
touch $(BUILD_WORK)/libssh2/.build_complete
endif
libssh2-package: libssh2-stage
# libssh2.mk Package Structure
rm -rf $(BUILD_DIST)/libssh2
mkdir -p $(BUILD_DIST)/libssh2
# libssh2.mk Prep libssh2
cp -a $(BUILD_STAGE)/libssh2/usr $(BUILD_DIST)/libssh2
# libssh2.mk Sign
$(call SIGN,libssh2,general.xml)
# libssh2.mk Make .debs
$(call PACK,libssh2,DEB_LIBSSH2_V)
# libssh2.mk Build cleanup
rm -rf $(BUILD_DIST)/libssh2
.PHONY: libssh2 libssh2-package