forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.d.mk
37 lines (29 loc) · 1019 Bytes
/
profile.d.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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
STRAPPROJECTS += profile.d
PROFILED_VERSION := 0-5
DEB_PROFILED_V ?= $(PROFILED_VERSION)
ifneq ($(wildcard $(BUILD_STAGE)/profile.d/.build_complete),)
profile.d:
@echo "Using previously built profile.d."
else
profile.d:
mkdir -p $(BUILD_STAGE)/profile.d/etc/profile.d
cp $(BUILD_INFO)/{,z}profile $(BUILD_STAGE)/profile.d/etc
cp $(BUILD_INFO)/terminal.sh $(BUILD_STAGE)/profile.d/etc/profile.d
touch $(BUILD_STAGE)/profile.d/.build_complete
endif
profile.d-package: profile.d-stage
# profile.d.mk Package Structure
rm -rf $(BUILD_DIST)/profile.d
mkdir -p $(BUILD_DIST)/profile.d
# profile.d.mk Prep profile.d
cp -a $(BUILD_STAGE)/profile.d/etc $(BUILD_DIST)/profile.d
# profile.d.mk Permissions
$(FAKEROOT) chmod a+x $(BUILD_DIST)/profile.d/etc/profile.d/terminal.sh
# profile.d.mk Make .debs
$(call PACK,profile.d,DEB_PROFILED_V)
# profile.d.mk Build cleanup
rm -rf $(BUILD_DIST)/profile.d
.PHONY: profile.d profile.d-package