forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
file.mk
52 lines (43 loc) · 1.42 KB
/
file.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 += file
DOWNLOAD += ftp://ftp.astron.com/pub/file/file-$(FILE_VERSION).tar.gz{,.asc}
FILE_VERSION := 5.38
DEB_FILE_V ?= $(FILE_VERSION)
file-setup: setup
$(call PGP_VERIFY,file-$(FILE_VERSION).tar.gz,asc)
$(call EXTRACT_TAR,file-$(FILE_VERSION).tar.gz,file-$(FILE_VERSION),file)
ifneq ($(wildcard $(BUILD_WORK)/file/.build_complete),)
file:
@echo "Using previously built file."
else
file: file-setup xz
rm -rf $(BUILD_WORK)/../../native/file
mkdir -p $(BUILD_WORK)/../../native/file
cd $(BUILD_WORK)/../../native/file && env -i $(BUILD_WORK)/file/configure
+env -i $(MAKE) -C $(BUILD_WORK)/../../native/file
cd $(BUILD_WORK)/file && ./configure -C \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr
+$(MAKE) -C $(BUILD_WORK)/file \
CFLAGS="$(CFLAGS)" \
FILE_COMPILE="$(BUILD_WORK)/../../native/file/src/file" \
LIBS="$(BUILD_BASE)/usr/local/lib/liblzma.a -lbz2 -lz"
+$(MAKE) -C $(BUILD_WORK)/file install \
DESTDIR=$(BUILD_STAGE)/file
touch $(BUILD_WORK)/file/.build_complete
endif
file-package: file-stage
# file.mk Package Structure
rm -rf $(BUILD_DIST)/file
mkdir -p $(BUILD_DIST)/file
# file.mk Prep file
cp -a $(BUILD_STAGE)/file/usr $(BUILD_DIST)/file
# file.mk Sign
$(call SIGN,file,general.xml)
# file.mk Make .debs
$(call PACK,file,DEB_FILE_V)
# file.mk Build cleanup
rm -rf $(BUILD_DIST)/file
.PHONY: file file-package