forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
figlet.mk
48 lines (39 loc) · 1.23 KB
/
figlet.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
SUBPROJECTS += figlet
FIGLET_VERSION := 2.2.5
DEB_FIGLET_V ?= $(FIGLET_VERSION)
figlet-setup: setup
wget -q -nc -P $(BUILD_SOURCE) ftp://ftp.figlet.org/pub/figlet/program/unix/figlet-$(FIGLET_VERSION).tar.gz
$(call EXTRACT_TAR,figlet-$(FIGLET_VERSION).tar.gz,figlet-$(FIGLET_VERSION),figlet)
$(SED) -i '/#include <stdio.h>/a #include <getopt.h>' $(BUILD_WORK)/figlet/figlet.c
ifneq ($(wildcard $(BUILD_WORK)/figlet/.build_complete),)
figlet:
@echo "Using previously built figlet."
else
figlet: figlet-setup
+$(MAKE) -C $(BUILD_WORK)/figlet \
prefix="/usr" \
CC="$(CC)" \
CFLAGS="$(CFLAGS)" \
LD="$(CC)" \
LDFLAGS="$(LDFLAGS)"
+$(MAKE) -C $(BUILD_WORK)/figlet install \
prefix="/usr" \
DESTDIR="$(BUILD_STAGE)/figlet"
touch $(BUILD_WORK)/figlet/.build_complete
endif
figlet-package: figlet-stage
# figlet.mk Package Structure
rm -rf $(BUILD_DIST)/figlet
mkdir -p $(BUILD_DIST)/figlet
# figlet.mk Prep figlet
cp -a $(BUILD_STAGE)/figlet/usr $(BUILD_DIST)/figlet
# figlet.mk Sign
$(call SIGN,figlet,general.xml)
# figlet.mk Make .debs
$(call PACK,figlet,DEB_FIGLET_V)
# figlet.mk Build cleanup
rm -rf $(BUILD_DIST)/figlet
.PHONY: figlet figlet-package