forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gawk.mk
45 lines (36 loc) · 1.08 KB
/
gawk.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
SUBPROJECTS += gawk
GAWK_VERSION := 5.1.0
DEB_GAWK_V ?= $(GAWK_VERSION)
gawk-setup: setup
wget -q -nc -P $(BUILD_SOURCE) https://ftpmirror.gnu.org/gawk/gawk-$(GAWK_VERSION).tar.xz{,.sig}
$(call PGP_VERIFY,gawk-$(GAWK_VERSION).tar.xz)
$(call EXTRACT_TAR,gawk-$(GAWK_VERSION).tar.xz,gawk-$(GAWK_VERSION),gawk)
ifneq ($(wildcard $(BUILD_WORK)/gawk/.build_complete),)
gawk:
@echo "Using previously built gawk."
else
gawk: gawk-setup gettext
cd $(BUILD_WORK)/gawk && ./configure \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
--sysconfdir=/etc
+$(MAKE) -C $(BUILD_WORK)/gawk install \
DESTDIR=$(BUILD_STAGE)/gawk
rm -f $(BUILD_STAGE)/gawk/usr/bin/gawk-*
touch $(BUILD_WORK)/gawk/.build_complete
endif
gawk-package: gawk-stage
# gawk.mk Package Structure
rm -rf $(BUILD_DIST)/gawk
# gawk.mk Prep gawk
cp -a $(BUILD_STAGE)/gawk $(BUILD_DIST)
# gawk.mk Sign
$(call SIGN,gawk,general.xml)
# gawk.mk Make .debs
$(call PACK,gawk,DEB_GAWK_V)
# gawk.mk Build cleanup
rm -rf $(BUILD_DIST)/gawk
.PHONY: gawk gawk-package