forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libevent.mk
46 lines (37 loc) · 1.39 KB
/
libevent.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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += libevent
LIBEVENT_VERSION := 2.1.11
DEB_LIBEVENT_V ?= $(LIBEVENT_VERSION)-1
libevent-setup: setup
wget -q -nc -P $(BUILD_SOURCE) https://github.com/libevent/libevent/releases/download/release-$(LIBEVENT_VERSION)-stable/libevent-$(LIBEVENT_VERSION)-stable.tar.gz{,.asc}
$(call PGP_VERIFY,libevent-$(LIBEVENT_VERSION)-stable.tar.gz,asc)
$(call EXTRACT_TAR,libevent-$(LIBEVENT_VERSION)-stable.tar.gz,libevent-$(LIBEVENT_VERSION)-stable,libevent)
ifneq ($(wildcard $(BUILD_WORK)/libevent/.build_complete),)
libevent:
@echo "Using previously built libevent."
else
libevent: libevent-setup openssl
cd $(BUILD_WORK)/libevent && ./configure \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr
+$(MAKE) -C $(BUILD_WORK)/libevent install \
DESTDIR=$(BUILD_STAGE)/libevent
+$(MAKE) -C $(BUILD_WORK)/libevent install \
DESTDIR=$(BUILD_BASE)
touch $(BUILD_WORK)/libevent/.build_complete
endif
libevent-package: libevent-stage
# libevent.mk Package Structure
rm -rf $(BUILD_DIST)/libevent
mkdir -p $(BUILD_DIST)/libevent
# libevent.mk Prep libevent
cp -a $(BUILD_STAGE)/libevent/usr $(BUILD_DIST)/libevent
# libevent.mk Sign
$(call SIGN,libevent,general.xml)
# libevent.mk Make .debs
$(call PACK,libevent,DEB_LIBEVENT_V)
# libevent.mk Build cleanup
rm -rf $(BUILD_DIST)/libevent
.PHONY: libevent libevent-package