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