forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plutil.mk
41 lines (32 loc) · 1.04 KB
/
plutil.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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += plutil
DOWNLOAD += https://github.com/Diatrus/plutil/releases/download/v$(PLUTIL_VERSION)/plutil-$(PLUTIL_VERSION).tar.xz
PLUTIL_VERSION := 0.2.2
DEB_PLUTIL_V ?= $(PLUTIL_VERSION)
plutil-setup: setup
$(call EXTRACT_TAR,plutil-$(PLUTIL_VERSION).tar.xz,plutil-$(PLUTIL_VERSION),plutil)
ifneq ($(wildcard $(BUILD_WORK)/plutil/.build_complete),)
plutil:
@echo "Using previously built plutil."
else
plutil: plutil-setup
+$(MAKE) -C $(BUILD_WORK)/plutil install \
CC="$(CC)" \
DESTDIR="$(BUILD_STAGE)/plutil/usr"
touch $(BUILD_WORK)/plutil/.build_complete
endif
plutil-package: plutil-stage
# plutil.mk Package Structure
rm -rf $(BUILD_DIST)/plutil
mkdir -p $(BUILD_DIST)/plutil
# plutil.mk Prep plutil
cp -a $(BUILD_STAGE)/plutil/usr $(BUILD_DIST)/plutil
# plutil.mk Sign
$(call SIGN,plutil,general.xml)
# plutil.mk Make .debs
$(call PACK,plutil,DEB_PLUTIL_V)
# plutil.mk Build cleanup
rm -rf $(BUILD_DIST)/plutil
.PHONY: plutil plutil-package