forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
groff.mk
49 lines (40 loc) · 1.25 KB
/
groff.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
49
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += groff
GROFF_VERSION := 1.22.4
DEB_GROFF_V ?= $(GROFF_VERSION)
groff-setup: setup
wget -q -nc -P $(BUILD_SOURCE) https://ftpmirror.gnu.org/groff/groff-$(GROFF_VERSION).tar.gz{,.sig}
$(call PGP_VERIFY,groff-$(GROFF_VERSION).tar.gz)
$(call EXTRACT_TAR,groff-$(GROFF_VERSION).tar.gz,groff-$(GROFF_VERSION),groff)
ifneq ($(wildcard $(BUILD_WORK)/groff/.build_complete),)
groff:
@echo "Using previously built groff."
else
groff: groff-setup
cd $(BUILD_WORK)/groff && ./configure -C \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
--with-x=no
+$(MAKE) -C $(BUILD_WORK)/groff \
AR="$(AR)" \
GROFFBIN="$$(which groff)" \
GROFF_BIN_PATH="$$(which groff | rev | cut -f2- -d'/' | rev)"
+$(MAKE) -C $(BUILD_WORK)/groff install \
DESTDIR=$(BUILD_STAGE)/groff
touch $(BUILD_WORK)/groff/.build_complete
endif
groff-package: groff-stage
# groff.mk Package Structure
rm -rf $(BUILD_DIST)/groff
mkdir -p $(BUILD_DIST)/groff
# groff.mk Prep groff
cp -a $(BUILD_STAGE)/groff/usr $(BUILD_DIST)/groff
# groff.mk Sign
$(call SIGN,groff,general.xml)
# groff.mk Make .debs
$(call PACK,groff,DEB_GROFF_V)
# groff.mk Build cleanup
rm -rf $(BUILD_DIST)/groff
.PHONY: groff groff-package