forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibirecovery.mk
50 lines (41 loc) · 1.62 KB
/
libirecovery.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
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += libirecovery
LIBIRECOVERY_VERSION := 1.0.0
DEB_LIBIRECOVERY_V ?= $(LIBIRECOVERY_VERSION)
libirecovery-setup: setup
wget -q -nc -P $(BUILD_SOURCE) https://github.com/libimobiledevice/libirecovery/releases/download/$(LIBIRECOVERY_VERSION)/libirecovery-$(LIBIRECOVERY_VERSION).tar.bz2
$(call EXTRACT_TAR,libirecovery-$(LIBIRECOVERY_VERSION).tar.bz2,libirecovery-$(LIBIRECOVERY_VERSION),libirecovery)
ifneq ($(wildcard $(BUILD_WORK)/libirecovery/.build_complete),)
libirecovery:
@echo "Using previously built libirecovery."
else
libirecovery: libirecovery-setup readline
cd $(BUILD_WORK)/libirecovery && ./configure \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
--with-sysroot=$(TARGET_SYSROOT) \
--with-iokit \
ac_cv_header_IOKit_usb_IOUSBLib_h=yes
+$(MAKE) -C $(BUILD_WORK)/libirecovery \
CFLAGS="$(CFLAGS) -D__OPEN_SOURCE__"
+$(MAKE) -C $(BUILD_WORK)/libirecovery install \
DESTDIR=$(BUILD_STAGE)/libirecovery
+$(MAKE) -C $(BUILD_WORK)/libirecovery install \
DESTDIR=$(BUILD_BASE)
touch $(BUILD_WORK)/libirecovery/.build_complete
endif
libirecovery-package: libirecovery-stage
# libirecovery.mk Package Structure
rm -rf $(BUILD_DIST)/libirecovery
mkdir -p $(BUILD_DIST)/libirecovery
# libirecovery.mk Prep libirecovery
cp -a $(BUILD_STAGE)/libirecovery/usr $(BUILD_DIST)/libirecovery
# libirecovery.mk Sign
$(call SIGN,libirecovery,general.xml)
# libirecovery.mk Make .debs
$(call PACK,libirecovery,DEB_LIBIRECOVERY_V)
# libirecovery.mk Build cleanup
rm -rf $(BUILD_DIST)/libirecovery
.PHONY: libirecovery libirecovery-package