forked from ProcursusTeam/Procursus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libideviceactivation.mk
56 lines (47 loc) · 2.69 KB
/
libideviceactivation.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
53
54
55
56
ifneq ($(PROCURSUS),1)
$(error Use the main Makefile)
endif
SUBPROJECTS += libideviceactivation
LIBIDEVICEACTIVATION_VERSION := 1.1.1
DEB_LIBIDEVICEACTIVATION_V ?= $(LIBIDEVICEACTIVATION_VERSION)
libideviceactivation-setup: setup
wget -q -nc -P $(BUILD_SOURCE) https://github.com/libimobiledevice/libideviceactivation/releases/download/$(LIBIDEVICEACTIVATION_VERSION)/libideviceactivation-$(LIBIDEVICEACTIVATION_VERSION).tar.bz2
$(call EXTRACT_TAR,libideviceactivation-$(LIBIDEVICEACTIVATION_VERSION).tar.bz2,libideviceactivation-$(LIBIDEVICEACTIVATION_VERSION),libideviceactivation)
ifneq ($(wildcard $(BUILD_WORK)/libideviceactivation/.build_complete),)
libideviceactivation:
@echo "Using previously built libideviceactivation."
else
libideviceactivation: libideviceactivation-setup libplist libimobiledevice curl
cd $(BUILD_WORK)/libideviceactivation && ./configure -C \
--host=$(GNU_HOST_TRIPLE) \
--prefix=/usr \
libxml2_CFLAGS=-I$(TARGET_SYSROOT)/usr/include/libxml2 \
libxml2_LIBS=-lxml2
+$(MAKE) -C $(BUILD_WORK)/libideviceactivation
+$(MAKE) -C $(BUILD_WORK)/libideviceactivation install \
DESTDIR=$(BUILD_STAGE)/libideviceactivation
+$(MAKE) -C $(BUILD_WORK)/libideviceactivation install \
DESTDIR=$(BUILD_BASE)
touch $(BUILD_WORK)/libideviceactivation/.build_complete
endif
libideviceactivation-package: libideviceactivation-stage
# libideviceactivation.mk Package Structure
rm -rf $(BUILD_DIST)/libideviceactivation{2,-dev,-utils}
mkdir -p $(BUILD_DIST)/libideviceactivation2/usr/lib \
$(BUILD_DIST)/libideviceactivation-dev/usr/{lib,bin} \
$(BUILD_DIST)/libideviceactivation-utils/usr
# libideviceactivation.mk Prep libideviceactivation
cp -a $(BUILD_STAGE)/libideviceactivation/usr/lib/libideviceactivation-1.0.2.dylib $(BUILD_DIST)/libideviceactivation2/usr/lib
cp -a $(BUILD_STAGE)/libideviceactivation/usr/{bin,share} $(BUILD_DIST)/libideviceactivation-utils/usr
cp -a $(BUILD_STAGE)/libideviceactivation/usr/include $(BUILD_DIST)/libideviceactivation-dev/usr
cp -a $(BUILD_STAGE)/libideviceactivation/usr/lib/{pkgconfig,libideviceactivation-1.0.{a,dylib}} $(BUILD_DIST)/libideviceactivation-dev/usr/lib
# libideviceactivation.mk Sign
$(call SIGN,libideviceactivation2,general.xml)
$(call SIGN,libideviceactivation-utils,general.xml)
# libideviceactivation.mk Make .debs
$(call PACK,libideviceactivation2,DEB_LIBIDEVICEACTIVATION_V)
$(call PACK,libideviceactivation-dev,DEB_LIBIDEVICEACTIVATION_V)
$(call PACK,libideviceactivation-utils,DEB_LIBIDEVICEACTIVATION_V)
# libideviceactivation.mk Build cleanup
rm -rf $(BUILD_DIST)/libideviceactivation{2,-dev,-utils}
.PHONY: libideviceactivation libideviceactivation-package