forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bender.mk
42 lines (33 loc) · 1.2 KB
/
bender.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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += bender
BENDER_VERSION := 1.1.1
DEB_BENDER_V ?= $(BENDER_VERSION)
bender-setup: setup
-[ ! -f "$(BUILD_SOURCE)/bender-$(BENDER_VERSION).tar.gz" ] && wget -q -nc -O$(BUILD_SOURCE)/bender-$(BENDER_VERSION).tar.gz https://github.com/aspenluxxxy/bender/archive/v$(BENDER_VERSION).tar.gz
$(call EXTRACT_TAR,bender-$(BENDER_VERSION).tar.gz,bender-$(BENDER_VERSION),bender)
ifneq ($(wildcard $(BUILD_WORK)/bender/.build_complete),)
bender:
@echo "Using previously built bender."
else
bender: bender-setup
cd $(BUILD_WORK)/bender && SDKROOT="$(TARGET_SYSROOT)" cargo \
build \
--release \
--target=$(RUST_TARGET)
$(GINSTALL) -Dm755 $(BUILD_WORK)/bender/target/$(RUST_TARGET)/release/bender $(BUILD_STAGE)/bender/usr/bin/bender
touch $(BUILD_WORK)/bender/.build_complete
endif
bender-package: bender-stage
# bender.mk Package Structure
rm -rf $(BUILD_DIST)/bender
# bender.mk Prep bender
cp -a $(BUILD_STAGE)/bender $(BUILD_DIST)
# bender.mk Sign
$(call SIGN,bender,general.xml)
# bender.mk Make .debs
$(call PACK,bender,DEB_BENDER_V)
# bender.mk Build cleanup
rm -rf $(BUILD_DIST)/bender
.PHONY: bender bender-package