guix-commits
[Top][All Lists]
Advanced

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

09/09: PRELIMINARY: gnu: polkit: Work on making it functional in practic


From: Andy Wingo
Subject: 09/09: PRELIMINARY: gnu: polkit: Work on making it functional in practice.
Date: Mon, 24 Aug 2015 21:16:54 +0000

wingo pushed a commit to branch wip-pam-elogind
in repository guix.

commit 65ac587e1ac5c98a5e5464496b44e601af013361
Author: Mark H Weaver <address@hidden>
Date:   Mon Jul 27 00:08:39 2015 -0400

    PRELIMINARY: gnu: polkit: Work on making it functional in practice.
---
 gnu/packages/polkit.scm |   66 ++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 54 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm
index 6a89d6b..baf183f 100644
--- a/gnu/packages/polkit.scm
+++ b/gnu/packages/polkit.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Andreas Enge <address@hidden>
+;;; Copyright © 2015 Mark H Weaver <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -64,20 +65,61 @@
                    (("systemd") "elogind"))))))
     (build-system gnu-build-system)
     (inputs
-      `(("expat" ,expat)
-        ("glib:bin" ,glib "bin") ; for glib-mkenums
-        ("elogind" ,elogind)
-        ("intltool" ,intltool)
-        ("linux-pam" ,linux-pam)
-        ;; FIXME: Shouldn't need libcap, it should be correctly propagated
-        ;; from elogind.
-        ("libcap" ,libcap)
-        ("mozjs" ,mozjs)
-        ("nspr" ,nspr)))
+     `(("expat" ,expat)
+       ("linux-pam" ,linux-pam)
+       ;; FIXME: Shouldn't need libcap, it should be correctly propagated
+       ;; from elogind.
+       ("libcap" ,libcap)
+       ("elogind" ,elogind)
+       ("mozjs" ,mozjs)
+       ("nspr" ,nspr)))
     (propagated-inputs
-      `(("glib" ,glib))) ; required by polkit-gobject-1.pc
+     `(("glib" ,glib))) ; required by polkit-gobject-1.pc
     (native-inputs
-      `(("pkg-config", pkg-config)))
+     `(("pkg-config" ,pkg-config)
+       ("glib:bin" ,glib "bin") ; for glib-mkenums
+       ("intltool" ,intltool)
+       ("gobject-introspection" ,gobject-introspection)))
+    (arguments
+     `(#:configure-flags '("--sysconfdir=/etc"
+                           "--enable-man-pages")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after
+          'unpack 'patch-file-names
+          (lambda* (#:key outputs #:allow-other-keys)
+            (substitute* "src/polkitagent/polkitagentsession.c"
+              (("PACKAGE_PREFIX \"/lib/polkit-1/polkit-agent-helper-1\"")
+               "\"/run/setuid-programs/polkit-agent-helper-1\""))
+            (substitute* 
"src/polkitbackend/polkitbackendinteractiveauthority.c"
+              (("PACKAGE_DATA_DIR \"/polkit-1/actions\"")
+               "\"/run/current-system/profile/share/polkit-1/actions\""))
+            (substitute* "src/polkitbackend/polkitbackendjsauthority.c"
+              (("PACKAGE_DATA_DIR \"/polkit-1/rules.d\"")
+               "\"/run/current-system/profile/share/polkit-1/rules.d\""))
+            #t))
+         (add-after
+          'unpack 'fix-introspection-install-dir
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out")))
+              (substitute* (find-files "." "Makefile.in")
+                (("@INTROSPECTION_GIRDIR@")
+                 (string-append out "/share/gir-1.0/"))
+                (("@INTROSPECTION_TYPELIBDIR@")
+                 (string-append out "/lib/girepository-1.0/"))))))
+         (replace
+          'install
+          (lambda* (#:key outputs (make-flags '()) #:allow-other-keys)
+            ;; Override sysconfdir during "make install", to avoid attempting
+            ;; to install in /etc, and to instead install the skeletons in the
+            ;; output directory.
+            (let ((out (assoc-ref outputs "out")))
+             (zero? (apply system*
+                           "make" "install"
+                           (string-append "sysconfdir=" out "/etc")
+                           (string-append "polkit_actiondir="
+                                          out "/share/polkit-1/actions")
+                           make-flags))))))))
     (home-page "http://www.freedesktop.org/wiki/Software/polkit/";)
     (synopsis "Authorization API for privilege management")
     (description "Polkit is an application-level toolkit for defining and



reply via email to

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