forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
darwintools.mk
45 lines (36 loc) · 1.37 KB
/
darwintools.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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
STRAPPROJECTS += darwintools
DARWINTOOLS_VERSION := 1.2
DEB_DARWINTOOLS_V ?= $(DARWINTOOLS_VERSION)
darwintools-setup: setup
rm -rf $(BUILD_WORK)/darwintools
mkdir -p $(BUILD_WORK)/darwintools
cp -af darwintools/* $(BUILD_WORK)/darwintools
ifneq ($(wildcard $(BUILD_WORK)/darwintools/.build_complete),)
darwintools:
@echo "Using previously built darwintools."
else
darwintools: darwintools-setup
cd $(BUILD_WORK)/darwintools && make
mkdir -p $(BUILD_STAGE)/darwintools/usr/{bin,libexec}
cp $(BUILD_WORK)/darwintools/sw_vers $(BUILD_STAGE)/darwintools/usr/bin
cp $(BUILD_WORK)/darwintools/firmware $(BUILD_STAGE)/darwintools/usr/libexec
cd $(BUILD_STAGE)/darwintools/usr/libexec && ln -sf firmware firmware.sh
chmod 0755 $(BUILD_STAGE)/darwintools/usr/libexec/firmware
touch $(BUILD_WORK)/darwintools/.build_complete
endif
darwintools-package: darwintools-stage
# darwintools.mk Package Structure
rm -rf $(BUILD_DIST)/darwintools
mkdir -p $(BUILD_DIST)/darwintools
# darwintools.mk Prep darwintools
cp -a $(BUILD_STAGE)/darwintools/usr $(BUILD_DIST)/darwintools
# darwintools.mk Sign
$(call SIGN,darwintools,general.xml)
# darwintools.mk Make .debs
$(call PACK,darwintools,DEB_DARWINTOOLS_V)
# darwintools.mk Build cleanup
rm -rf $(BUILD_DIST)/darwintools
.PHONY: darwintools darwintools-package