forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gzip.mk
49 lines (40 loc) · 1.23 KB
/
gzip.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
STRAPPROJECTS += gzip
DOWNLOAD += https://ftp.gnu.org/gnu/gzip/gzip-$(GZIP_VERSION).tar.xz{,.sig}
GZIP_VERSION := 1.10
DEB_GZIP_V ?= $(GZIP_VERSION)
gzip-setup: setup
$(call PGP_VERIFY,gzip-$(GZIP_VERSION).tar.xz)
$(call EXTRACT_TAR,gzip-$(GZIP_VERSION).tar.xz,gzip-$(GZIP_VERSION),gzip)
mkdir -p $(BUILD_STAGE)/gzip/bin
ifneq ($(wildcard $(BUILD_WORK)/gzip/.build_complete),)
gzip:
@echo "Using previously built gzip."
else
gzip: gzip-setup
cd $(BUILD_WORK)/gzip && ./configure -C \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
--disable-dependency-tracking
+$(MAKE) -C $(BUILD_WORK)/gzip install \
DESTDIR=$(BUILD_STAGE)/gzip
for bin in $(BUILD_STAGE)/gzip/usr/bin/*; do \
ln -s ../usr/bin/$$(basename $$bin) $(BUILD_STAGE)/gzip/bin/$$(basename $$bin); \
done
touch $(BUILD_WORK)/gzip/.build_complete
endif
gzip-package: gzip-stage
# gzip.mk Package Structure
rm -rf $(BUILD_DIST)/gzip
mkdir -p $(BUILD_DIST)/gzip
# gzip.mk Prep gzip
cp -a $(BUILD_STAGE)/gzip $(BUILD_DIST)
# gzip.mk Sign
$(call SIGN,gzip,general.xml)
# gzip.mk Make .debs
$(call PACK,gzip,DEB_GZIP_V)
# gzip.mk Build cleanup
rm -rf $(BUILD_DIST)/gzip
.PHONY: gzip gzip-package