forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nano.mk
52 lines (43 loc) · 1.27 KB
/
nano.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 += nano
DOWNLOAD += https://ftp.gnu.org/gnu/nano/nano-$(NANO_VERSION).tar.xz{,.sig}
NANO_VERSION := 4.9.3
DEB_NANO_V ?= $(NANO_VERSION)
nano-setup: setup
$(call PGP_VERIFY,nano-$(NANO_VERSION).tar.xz)
$(call EXTRACT_TAR,nano-$(NANO_VERSION).tar.xz,nano-$(NANO_VERSION),nano)
ifneq ($(wildcard $(BUILD_WORK)/nano/.build_complete),)
nano:
@echo "Using previously built nano."
else
nano: nano-setup ncurses gettext
cd $(BUILD_WORK)/nano && ./configure -C \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
--disable-debug \
--disable-dependency-tracking \
--enable-color \
--enable-extra \
--enable-multibuffer \
--enable-nanorc \
NCURSESW_LIBS=$(BUILD_BASE)/usr/lib/libncursesw.dylib
+$(MAKE) -C $(BUILD_WORK)/nano
+$(MAKE) -C $(BUILD_WORK)/nano install \
DESTDIR=$(BUILD_STAGE)/nano
touch $(BUILD_WORK)/nano/.build_complete
endif
nano-package: nano-stage
# nano.mk Package Structure
rm -rf $(BUILD_DIST)/nano
mkdir -p $(BUILD_DIST)/nano
# nano.mk Prep nano
cp -a $(BUILD_STAGE)/nano/usr $(BUILD_DIST)/nano
# nano.mk Sign
$(call SIGN,nano,general.xml)
# nano.mk Make .debs
$(call PACK,nano,DEB_NANO_V)
# nano.mk Build cleanup
rm -rf $(BUILD_DIST)/nano
.PHONY: nano nano-package