From eedcee323ae3554a6276f1a84f5133806f1d5424 Mon Sep 17 00:00:00 2001 From: Torsten Kurbad Date: Thu, 29 Nov 2012 13:31:41 +0100 Subject: [PATCH] Added android developer utils --- dev-android/adb/adb-9999.ebuild | 31 ++++++++++++ dev-android/adb/files/Makefile | 46 ++++++++++++++++++ dev-android/fastboot/fastboot-9999.ebuild | 33 +++++++++++++ dev-android/fastboot/files/Makefile | 57 +++++++++++++++++++++++ 4 files changed, 167 insertions(+) create mode 100644 dev-android/adb/adb-9999.ebuild create mode 100644 dev-android/adb/files/Makefile create mode 100644 dev-android/fastboot/fastboot-9999.ebuild create mode 100644 dev-android/fastboot/files/Makefile diff --git a/dev-android/adb/adb-9999.ebuild b/dev-android/adb/adb-9999.ebuild new file mode 100644 index 0000000..6873f62 --- /dev/null +++ b/dev-android/adb/adb-9999.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit toolchain-funcs git-2 + +DESCRIPTION="android debug bridge" +HOMEPAGE="android.googlesource.com" + +EGIT_REPO_URI="http://android.googlesource.com/platform/system/core.git" +EGIT_BRANCH="tools_r21" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="sys-libs/zlib" +RDEPEND="${DEPEND}" + +src_compile(){ + cd adb + cp ${FILESDIR}/Makefile Makefile + emake +} + +src_install(){ + cd adb + einstall DESTDIR=${D} +} diff --git a/dev-android/adb/files/Makefile b/dev-android/adb/files/Makefile new file mode 100644 index 0000000..14a1360 --- /dev/null +++ b/dev-android/adb/files/Makefile @@ -0,0 +1,46 @@ +SRCS+= adb.c +SRCS+= adb_client.c +SRCS+= commandline.c +SRCS+= console.c +SRCS+= fdevent.c +SRCS+= file_sync_client.c +SRCS+= get_my_path_linux.c +SRCS+= services.c +SRCS+= sockets.c +SRCS+= transport.c +SRCS+= transport_local.c +SRCS+= transport_usb.c +SRCS+= usb_linux.c +SRCS+= usb_vendors.c + +VPATH+= ../libcutils +SRCS+= list.c +SRCS+= load_file.c +SRCS+= socket_inaddr_any_server.c +SRCS+= socket_local_client.c +SRCS+= socket_local_server.c +SRCS+= socket_loopback_client.c +SRCS+= socket_loopback_server.c +SRCS+= socket_network_client.c + +VPATH+= ../libzipfile +SRCS+= centraldir.c +SRCS+= zipfile.c + +CPPFLAGS+= -DADB_HOST=1 +CPPFLAGS+= -DHAVE_FORKEXEC=1 +CPPFLAGS+= -I. +CPPFLAGS+= -I../include + +LIBS+= -lpthread -lz + +OBJS= $(SRCS:.c=.o) + +all: adb + +adb: $(OBJS) + cc -o $@ $(LDFLAGS) $(OBJS) $(LIBS) + +install: + test -d '$(DESTDIR)/usr/bin' || mkdir -p '$(DESTDIR)/usr/bin' + cp adb '$(DESTDIR)/usr/bin' diff --git a/dev-android/fastboot/fastboot-9999.ebuild b/dev-android/fastboot/fastboot-9999.ebuild new file mode 100644 index 0000000..0636495 --- /dev/null +++ b/dev-android/fastboot/fastboot-9999.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit toolchain-funcs git-2 + +DESCRIPTION="fastboot is a util to control android bootloader" +HOMEPAGE="android.googlesource.com" + +EGIT_ANDROID="http://android.googlesource.com/platform" +EGIT_REPO_URI=""$EGIT_ANDROID"/system/core" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND="sys-libs/zlib" +RDEPEND="${DEPEND}" + +src_compile(){ + cd fastboot + git clone "$EGIT_ANDROID"/system/extras + git clone "$EGIT_ANDROID"/external/libselinux + cp ${FILESDIR}/Makefile Makefile + emake +} + +src_install(){ + cd fastboot + einstall DESTDIR=${D} +} diff --git a/dev-android/fastboot/files/Makefile b/dev-android/fastboot/files/Makefile new file mode 100644 index 0000000..6638f11 --- /dev/null +++ b/dev-android/fastboot/files/Makefile @@ -0,0 +1,57 @@ +SRCS+=bootimg.c +SRCS+=engine.c +SRCS+=fastboot.c +SRCS+=protocol.c +SRCS+=usb_linux.c +SRCS+=util_linux.c + +VPATH+= ../libsparse +SRCS+= backed_block.c +SRCS+= output_file.c +SRCS+= sparse.c +SRCS+= sparse_crc32.c +SRCS+= sparse_err.c +SRCS+= sparse_read.c + +VPATH+= ../libzipfile +SRCS+= centraldir.c +SRCS+= zipfile.c + +VPATH+= extras/ext4_utils +SRCS+= allocate.c +SRCS+= contents.c +SRCS+= ext4_utils.c +SRCS+= extent.c +SRCS+= indirect.c +SRCS+= make_ext4fs.c +SRCS+= sha1.c +SRCS+= uuid.c +SRCS+= wipe.c + +VPATH+= libselinux/src +SRCS+= callbacks.c +SRCS+= check_context.c +SRCS+= freecon.c +SRCS+= init.c +SRCS+= label.c +SRCS+= label_android_property.c +SRCS+= label_file.c + +CPPFLAGS+= -I../include +CPPFLAGS+= -I../libsparse/include +CPPFLAGS+= -I../mkbootimg +CPPFLAGS+= -Ilibselinux/include +CPPFLAGS+= -Iextras/ext4_utils + +LIBS+= -lz + +OBJS= $(SRCS:.c=.o) + +all: fastboot + +fastboot: $(OBJS) + cc -o $@ $(OBJS) $(LIBS) + +install: + test -d '$(DESTDIR)/usr/bin' || mkdir -p '$(DESTDIR)/usr/bin' + cp fastboot '$(DESTDIR)/usr/bin'