guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

07/12: gnu: Add android-libselinux.


From: Danny Milosavljevic
Subject: 07/12: gnu: Add android-libselinux.
Date: Wed, 9 May 2018 16:34:57 -0400 (EDT)

dannym pushed a commit to branch master
in repository guix.

commit c87ca40f9bff8b852018b884e1fed963a6643b57
Author: Danny Milosavljevic <address@hidden>
Date:   Wed May 9 19:58:51 2018 +0200

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

diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index c3174ba..1acc7d4 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -35,7 +35,9 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages selinux)
   #:use-module (gnu packages ssh)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages tls)
@@ -398,6 +400,48 @@ that is safe to use for user space.  It also includes
 @code{system_properties.h} and @code{_system_properties.h}.")
     (license license:asl2.0)))
 
+(define-public android-libselinux
+  (package
+    (name "android-libselinux")
+    (version (android-platform-version))
+    (source
+     (android-platform-external version "libselinux"
+                                
"13m2q32gzdcs5d0zj1nwasjy1j8vsxsgbjg7m5sa9lfcjaj7nkm7"))
+    (build-system android-ndk-build-system)
+    (arguments
+     ;; See logd/Android.mk for the *_LOG_TAG values.
+     `(#:make-flags (list (string-append "CFLAGS=-Wno-error "
+                                         "-I core/include "
+                                         "-I core/libpackagelistparser/include 
"
+                                         "-DAUDITD_LOG_TAG=1003 "
+                                         "-DLOGD_LOG_TAG=1004 -D_GNU_SOURCE")
+                          "LDFLAGS=-L . -lpcre")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'unpack-core
+           (lambda* (#:key inputs #:allow-other-keys)
+             (mkdir-p "core")
+             (with-directory-excursion "core"
+               (invoke "tar" "axf" (assoc-ref inputs "core") 
"--strip-components=1"))
+             #t))
+         (add-after 'unpack-core 'patch-HOST
+           (lambda _
+             ;; gettid duplicates otherwise.
+             (substitute* "src/procattr.c"
+              (("#ifdef HOST") "#ifdef XXX"))
+             #t)))))
+    (inputs
+     `(("openssl" ,openssl)))
+    (native-inputs
+     `(("android-bionic-uapi" ,android-bionic-uapi)
+       ("core" ,(android-platform-system-core version))))
+    (propagated-inputs
+     `(("pcre" ,pcre)))
+    (home-page "https://developer.android.com/";)
+    (synopsis (package-synopsis libselinux))
+    (description (package-description libselinux))
+    (license (package-license libselinux))))
+
 (define-public android-udev-rules
   (package
     (name "android-udev-rules")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]