forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autossh.mk
47 lines (39 loc) · 1.34 KB
/
autossh.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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += autossh
AUTOSSH_VERSION := 1.4g
DEB_AUTOSSH_V ?= $(AUTOSSH_VERSION)
autossh-setup: setup
wget -q -nc -P $(BUILD_SOURCE) https://www.harding.motd.ca/autossh/autossh-$(AUTOSSH_VERSION).tgz
$(call EXTRACT_TAR,autossh-$(AUTOSSH_VERSION).tgz,autossh-$(AUTOSSH_VERSION),autossh)
$(SED) -i '/AC_FUNC_MALLOC/d' $(BUILD_WORK)/autossh/configure.ac
$(SED) -i '/AC_FUNC_REALLOC/d' $(BUILD_WORK)/autossh/configure.ac
ifneq ($(wildcard $(BUILD_WORK)/autossh/.build_complete),)
autossh:
@echo "Using previously built autossh."
else
autossh: autossh-setup
cd $(BUILD_WORK)/autossh && autoreconf -fi
cd $(BUILD_WORK)/autossh && ./configure \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
CFLAGS="$(CFLAGS)"
+$(MAKE) -C $(BUILD_WORK)/autossh
+$(MAKE) -C $(BUILD_WORK)/autossh install \
DESTDIR=$(BUILD_STAGE)/autossh
touch $(BUILD_WORK)/autossh/.build_complete
endif
autossh-package: autossh-stage
# autossh.mk Package Structure
rm -rf $(BUILD_DIST)/autossh
mkdir -p $(BUILD_DIST)/autossh
# autossh.mk Prep autossh
cp -a $(BUILD_STAGE)/autossh/usr $(BUILD_DIST)/autossh
# autossh.mk Sign
$(call SIGN,autossh,general.xml)
# autossh.mk Make .debs
$(call PACK,autossh,DEB_AUTOSSH_V)
# autossh.mk Build cleanup
rm -rf $(BUILD_DIST)/autossh
.PHONY: autossh autossh-package