From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGVua-0006mD-4p for guix-patches@gnu.org; Wed, 09 May 2018 16:42:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGVuV-0003uJ-6G for guix-patches@gnu.org; Wed, 09 May 2018 16:42:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:47696) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGVuV-0003uD-2g for guix-patches@gnu.org; Wed, 09 May 2018 16:42:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fGVuU-0007Jk-9X for guix-patches@gnu.org; Wed, 09 May 2018 16:42:02 -0400 Subject: [bug#31393] [PATCH 1/4] gnu: Add android-fastboot. Resent-Message-ID: From: Danny Milosavljevic Date: Wed, 9 May 2018 22:41:37 +0200 Message-Id: <20180509204140.10819-1-dannym@scratchpost.org> In-Reply-To: <20180509203947.10746-1-dannym@scratchpost.org> References: <20180509203947.10746-1-dannym@scratchpost.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 31393@debbugs.gnu.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")