forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
basic-cmds.mk
43 lines (34 loc) · 1.32 KB
/
basic-cmds.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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += basic-cmds
BASIC-CMDS_VERSION := 55
DEB_BASIC-CMDS_V ?= $(BASIC-CMDS_VERSION)
basic-cmds-setup: setup
wget -q -nc -P $(BUILD_SOURCE) https://opensource.apple.com/tarballs/basic_cmds/basic_cmds-$(BASIC-CMDS_VERSION).tar.gz
$(call EXTRACT_TAR,basic_cmds-$(BASIC-CMDS_VERSION).tar.gz,basic_cmds-$(BASIC-CMDS_VERSION),basic-cmds)
mkdir -p $(BUILD_STAGE)/basic-cmds/usr/bin
ifneq ($(wildcard $(BUILD_WORK)/basic-cmds/.build_complete),)
basic-cmds:
@echo "Using previously built basic-cmds."
else
basic-cmds: basic-cmds-setup ncurses
mkdir -p $(BUILD_STAGE)/basic-cmds/usr/bin
cd $(BUILD_WORK)/basic-cmds; \
for bin in mesg write uudecode uuencode; do \
$(CC) $(ARCH) -isysroot $(TARGET_SYSROOT) $(PLATFORM_VERSION_MIN) -o $(BUILD_STAGE)/basic-cmds/usr/bin/$$bin $$bin/*.c; \
done
touch $(BUILD_WORK)/basic-cmds/.build_complete
endif
basic-cmds-package: basic-cmds-stage
# basic-cmds.mk Package Structure
rm -rf $(BUILD_DIST)/basic-cmds
# basic-cmds.mk Prep basic-cmds
cp -a $(BUILD_STAGE)/basic-cmds $(BUILD_DIST)
# basic-cmds.mk Sign
$(call SIGN,basic-cmds,general.xml)
# basic-cmds.mk Make .debs
$(call PACK,basic-cmds,DEB_BASIC-CMDS_V)
# basic-cmds.mk Build cleanup
rm -rf $(BUILD_DIST)/basic-cmds
.PHONY: basic-cmds basic-cmds-package