forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sed.mk
46 lines (37 loc) · 1.07 KB
/
sed.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
46
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
STRAPPROJECTS += sed
DOWNLOAD += https://ftp.gnu.org/gnu/sed/sed-$(SED_VERSION).tar.xz{,.sig}
SED_VERSION := 4.8
DEB_SED_V ?= $(SED_VERSION)
sed-setup: setup
$(call PGP_VERIFY,sed-$(SED_VERSION).tar.xz)
$(call EXTRACT_TAR,sed-$(SED_VERSION).tar.xz,sed-$(SED_VERSION),sed)
ifneq ($(wildcard $(BUILD_WORK)/sed/.build_complete),)
sed:
@echo "Using previously built sed."
else
sed: sed-setup gettext
cd $(BUILD_WORK)/sed && ./configure -C \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
--disable-dependency-tracking
+$(MAKE) -C $(BUILD_WORK)/sed
+$(MAKE) -C $(BUILD_WORK)/sed install \
DESTDIR=$(BUILD_STAGE)/sed
touch $(BUILD_WORK)/sed/.build_complete
endif
sed-package: sed-stage
# sed.mk Package Structure
rm -rf $(BUILD_DIST)/sed
mkdir -p $(BUILD_DIST)/sed
# sed.mk Prep sed
cp -a $(BUILD_STAGE)/sed/usr $(BUILD_DIST)/sed
# sed.mk Sign
$(call SIGN,sed,general.xml)
# sed.mk Make .debs
$(call PACK,sed,DEB_SED_V)
# sed.mk Build cleanup
rm -rf $(BUILD_DIST)/sed
.PHONY: sed sed-package