forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dialog.mk
52 lines (43 loc) · 1.47 KB
/
dialog.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
50
51
52
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += dialog
DIALOG_VERSION := 1.3
DIALOG_DATE := 20210117
DEB_DIALOG_V ?= $(DIALOG_VERSION)-$(DIALOG_DATE)
dialog-setup: setup
wget -q -nc -P $(BUILD_SOURCE) https://invisible-mirror.net/archives/dialog/dialog-$(DIALOG_VERSION)-$(DIALOG_DATE).tgz
$(call EXTRACT_TAR,dialog-$(DIALOG_VERSION)-$(DIALOG_DATE).tgz,dialog-$(DIALOG_VERSION)-$(DIALOG_DATE),dialog)
ifneq ($(wildcard $(BUILD_WORK)/dialog/.build_complete),)
dialog:
@echo "Using previously built dialog."
else
dialog: dialog-setup ncurses gettext
cd $(BUILD_WORK)/dialog && ./configure -C \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
--with-ncursesw \
--enable-nls
+$(MAKE) -C $(BUILD_WORK)/dialog
+$(MAKE) -C $(BUILD_WORK)/dialog install-full \
DESTDIR=$(BUILD_STAGE)/dialog
touch $(BUILD_WORK)/dialog/.build_complete
endif
dialog-package: dialog-stage
# dialog.mk Package Structure
rm -rf $(BUILD_DIST)/dialog
mkdir -p $(BUILD_DIST)/dialog
# dialog.mk Prep dialog
# To keep parity with debian, dialog is not
# being split, it also is only having a static
# lib. I can't install the headers without
# dialog-config so that gets deleted here.
cp -a $(BUILD_STAGE)/dialog $(BUILD_DIST)
rm $(BUILD_DIST)/dialog/usr/bin/dialog-config
# dialog.mk Sign
$(call SIGN,dialog,general.xml)
# dialog.mk Make .debs
$(call PACK,dialog,DEB_DIALOG_V)
# dialog.mk Build cleanup
rm -rf $(BUILD_DIST)/dialog
.PHONY: dialog dialog-package