forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
debianutils.mk
47 lines (38 loc) · 1.51 KB
/
debianutils.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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
STRAPPROJECTS += debianutils
DEBIANUTILS_VERSION := 4.9.1
DEB_DEBIANUTILS_V ?= $(DEBIANUTILS_VERSION)
debianutils-setup: setup
wget -q -nc -P $(BUILD_SOURCE) http://deb.debian.org/debian/pool/main/d/debianutils/debianutils_$(DEBIANUTILS_VERSION).tar.xz
$(call EXTRACT_TAR,debianutils_$(DEBIANUTILS_VERSION).tar.xz,debianutils-$(DEBIANUTILS_VERSION),debianutils)
ifneq ($(wildcard $(BUILD_WORK)/debianutils/.build_complete),)
debianutils:
@echo "Using previously built debianutils."
else
debianutils: debianutils-setup
cd $(BUILD_WORK)/debianutils && ./configure -C \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
--disable-dependency-tracking
+$(MAKE) -C $(BUILD_WORK)/debianutils install \
DESTDIR=$(BUILD_STAGE)/debianutils
rm -rf $(BUILD_STAGE)/debianutils/usr/{sbin,share}
rm -f $(BUILD_STAGE)/debianutils/usr/bin/{ischroot,which,tempfile,savelog}
touch $(BUILD_WORK)/debianutils/.build_complete
endif
debianutils-package: debianutils-stage
# debianutils.mk Package Structure
rm -rf $(BUILD_DIST)/debianutils
mkdir -p $(BUILD_DIST)/debianutils/bin
# debianutils.mk Prep debianutils
cp -a $(BUILD_STAGE)/debianutils/usr $(BUILD_DIST)/debianutils
ln -s /usr/bin/run-parts $(BUILD_DIST)/debianutils/bin
# debianutils.mk Sign
$(call SIGN,debianutils,general.xml)
# debianutils.mk Make .debs
$(call PACK,debianutils,DEB_DEBIANUTILS_V)
# debianutils.mk Build cleanup
rm -rf $(BUILD_DIST)/debianutils
.PHONY: debianutils debianutils-package