all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: 31393@debbugs.gnu.org
Subject: [bug#31393] [PATCH 1/4] gnu: Add android-fastboot.
Date: Wed,  9 May 2018 22:41:37 +0200	[thread overview]
Message-ID: <20180509204140.10819-1-dannym@scratchpost.org> (raw)
In-Reply-To: <20180509203947.10746-1-dannym@scratchpost.org>

* gnu/packages/android.scm (android-fastboot): New variable.
---
 gnu/packages/android.scm | 64 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 2e5f1d593..eaae0229a 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -568,6 +568,70 @@ Android core.")
     (description "@code{android-libutils} provides utilities for Android NDK developers.")
     (license license:asl2.0)))
 
+(define-public android-fastboot
+  (package
+    (name "android-fastboot")
+    (version (android-platform-version))
+    (source #f)
+    (build-system android-ndk-build-system)
+    (arguments
+     `(#:make-flags (list "CXXFLAGS=-std=gnu++11")
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'unpack
+           (lambda* (#:key inputs #:allow-other-keys)
+             (mkdir-p "core")
+             (with-directory-excursion "core"
+               (invoke "tar" "axf" (assoc-ref inputs "core") "--strip-components=1")
+               (substitute* "fastboot/Android.mk"
+                (("libext4_utils_host") "libext4_utils_host libselinux libpcre")))
+             (copy-recursively (assoc-ref inputs "extras") "extras"
+                               #:keep-mtime? #t)
+             #t))
+         (add-after 'unpack 'enter-source
+           (lambda _
+             (chdir "core/fastboot")
+             #t))
+         (add-after 'enter-source 'make-googletest-available
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((googletest (assoc-ref inputs "googletest")))
+               (symlink (string-append googletest "/lib/libgtest.so") "libgtest_host.so")
+               #t)))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib (string-append out "/lib"))
+                    (bin (string-append out "/bin")))
+               (install-file "fastboot" bin)
+               #t))))
+       #:tests? #f))
+    (inputs
+     `(("adb" ,adb)
+       ("android-safe-iop" ,android-safe-iop)
+       ("android-ext4-utils" ,android-ext4-utils)
+       ("android-f2fs-utils" ,android-f2fs-utils)
+       ("googletest" ,googletest)
+       ("libbase" ,libbase)
+       ("libcutils" ,libcutils)
+       ("liblog" ,liblog)
+       ("android-libutils" ,android-libutils)
+       ("android-libsparse" ,android-libsparse)
+       ("android-libziparchive" ,android-libziparchive)
+       ("android-libselinux" ,android-libselinux)
+       ("pcre" ,pcre)
+       ("mkbootimg" ,mkbootimg)
+       ("openssl" ,openssl) ; FIXME remove
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("core" ,(android-platform-system-core version))
+       ("extras" ,(android-platform-system-extras version))
+       ("xz" ,xz)))
+    (home-page "https://developer.android.com/studio/command-line/")
+    (synopsis "Android image flasher")
+    (description
+     "This package provides @command{fastboot}, a tool to upload file system images to Android devices.")
+    (license license:asl2.0)))
+
 (define-public android-udev-rules
   (package
     (name "android-udev-rules")

  reply	other threads:[~2018-05-09 20:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 20:39 [bug#31393] [PATCH 0/4] Add android-fastboot and rename packages Danny Milosavljevic
2018-05-09 20:41 ` Danny Milosavljevic [this message]
2018-05-09 20:41   ` [bug#31393] [PATCH 2/4] gnu: Rename "liblog" to "android-liblog" Danny Milosavljevic
2018-05-09 20:41   ` [bug#31393] [PATCH 3/4] gnu: Rename "libbase" to "android-libbase" Danny Milosavljevic
2018-05-09 20:41   ` [bug#31393] [PATCH 4/4] gnu: Rename "libcutils" to "android-libcutils" Danny Milosavljevic
2018-05-09 20:53 ` [bug#31393] [PATCH 0/4] Add android-fastboot and rename packages Julien Lepiller
2018-05-10  0:52   ` bug#31393: " Danny Milosavljevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180509204140.10819-1-dannym@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=31393@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.