1 ################################################################################
5 ################################################################################
7 ANDROID_TOOLS_SITE
= https
://launchpad.net
/ubuntu
/+archive
/primary
/+files
8 ANDROID_TOOLS_VERSION
= 4.2.2+git20130218
9 ANDROID_TOOLS_SOURCE
= android-tools_
$(ANDROID_TOOLS_VERSION
).orig.
tar.xz
10 ANDROID_TOOLS_EXTRA_DOWNLOADS
= android-tools_
$(ANDROID_TOOLS_VERSION
)-3ubuntu
41.debian.
tar.gz
11 HOST_ANDROID_TOOLS_EXTRA_DOWNLOADS
= $(ANDROID_TOOLS_EXTRA_DOWNLOADS
)
12 ANDROID_TOOLS_LICENSE
= Apache-2.0
13 ANDROID_TOOLS_LICENSE_FILES
= debian
/copyright
15 # Extract the Debian tarball inside the sources
16 define ANDROID_TOOLS_DEBIAN_EXTRACT
17 $(call suitable-extractor
,$(notdir $(ANDROID_TOOLS_EXTRA_DOWNLOADS
))) \
18 $(DL_DIR
)/$(notdir $(ANDROID_TOOLS_EXTRA_DOWNLOADS
)) | \
19 $(TAR
) -C
$(@D
) $(TAR_OPTIONS
) -
22 HOST_ANDROID_TOOLS_POST_EXTRACT_HOOKS
+= ANDROID_TOOLS_DEBIAN_EXTRACT
23 ANDROID_TOOLS_POST_EXTRACT_HOOKS
+= ANDROID_TOOLS_DEBIAN_EXTRACT
25 # Apply the Debian patches before applying the Buildroot patches
26 define ANDROID_TOOLS_DEBIAN_PATCH
27 $(APPLY_PATCHES
) $(@D
) $(@D
)/debian
/patches \
*
30 HOST_ANDROID_TOOLS_PRE_PATCH_HOOKS
+= ANDROID_TOOLS_DEBIAN_PATCH
31 ANDROID_TOOLS_PRE_PATCH_HOOKS
+= ANDROID_TOOLS_DEBIAN_PATCH
33 ifeq ($(BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT
),y
)
34 HOST_ANDROID_TOOLS_TARGETS
+= fastboot
35 HOST_ANDROID_TOOLS_DEPENDENCIES
+= host-zlib host-libselinux
38 ifeq ($(BR2_PACKAGE_HOST_ANDROID_TOOLS_ADB
),y
)
39 HOST_ANDROID_TOOLS_TARGETS
+= adb
40 HOST_ANDROID_TOOLS_DEPENDENCIES
+= host-zlib host-openssl
43 ifeq ($(BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT
),y
)
44 ANDROID_TOOLS_TARGETS
+= fastboot
45 ANDROID_TOOLS_DEPENDENCIES
+= zlib libselinux
48 ifeq ($(BR2_PACKAGE_ANDROID_TOOLS_ADB
),y
)
49 ANDROID_TOOLS_TARGETS
+= adb
50 ANDROID_TOOLS_DEPENDENCIES
+= zlib openssl
53 ifeq ($(BR2_PACKAGE_ANDROID_TOOLS_ADBD
),y
)
54 ANDROID_TOOLS_TARGETS
+= adbd
55 ANDROID_TOOLS_DEPENDENCIES
+= zlib openssl
58 # Build each tool in its own directory not to share object files
60 define HOST_ANDROID_TOOLS_BUILD_CMDS
61 $(foreach t
,$(HOST_ANDROID_TOOLS_TARGETS
),\
62 mkdir
-p
$(@D
)/build-
$(t
) && \
63 $(HOST_MAKE_ENV
) $(HOST_CONFIGURE_OPTS
) $(MAKE
) SRCDIR
=$(@D
) \
64 -C
$(@D
)/build-
$(t
) -f
$(@D
)/debian
/makefiles
/$(t
).mk
$(sep
))
67 define ANDROID_TOOLS_BUILD_CMDS
68 $(foreach t
,$(ANDROID_TOOLS_TARGETS
),\
69 mkdir
-p
$(@D
)/build-
$(t
) && \
70 $(TARGET_MAKE_ENV
) $(TARGET_CONFIGURE_OPTS
) $(MAKE
) SRCDIR
=$(@D
) \
71 -C
$(@D
)/build-
$(t
) -f
$(@D
)/debian
/makefiles
/$(t
).mk
$(sep
))
74 define HOST_ANDROID_TOOLS_INSTALL_CMDS
75 $(foreach t
,$(HOST_ANDROID_TOOLS_TARGETS
),\
76 $(INSTALL
) -D
-m
0755 $(@D
)/build-
$(t
)/$(t
) $(HOST_DIR
)/usr
/bin
/$(t
)$(sep
))
79 define ANDROID_TOOLS_INSTALL_TARGET_CMDS
80 $(foreach t
,$(ANDROID_TOOLS_TARGETS
),\
81 $(INSTALL
) -D
-m
0755 $(@D
)/build-
$(t
)/$(t
) $(TARGET_DIR
)/usr
/bin
/$(t
)$(sep
))
84 $(eval
$(host-generic-package
))
85 $(eval
$(generic-package
))