diff mbox series

[bug#42899,v5,1/6] gnu: dovecot: Set moduledir to global directory.

Message ID 20201020150655.12690-2-levenson@mmer.org
State New
Headers show
Series Dovecot improvements | expand

Checks

Context Check Description
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Alexey Abramov Oct. 20, 2020, 3:06 p.m. UTC
From: Efraim Flashner <efraim@flashner.co.il>

* gnu/packages/mail.scm (dovecot)[arguments]: Add configure-flag to set
moduledir. Adjust custom 'install phase to override moduledir so it
successfully installs.
---
 gnu/packages/mail.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 5056098806..ea53787ce0 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1579,7 +1579,8 @@  facilities for checking incoming mail.")
      `(#:configure-flags '("--sysconfdir=/etc"
                            "--localstatedir=/var"
                            "--with-sqlite"  ; not auto-detected
-                           "--with-lucene") ; not auto-detected
+                           "--with-lucene"  ; not auto-detected
+                           "--with-moduledir=/usr/lib/dovecot")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-file-names
@@ -1596,9 +1597,13 @@  facilities for checking incoming mail.")
                (("cat") (which "cat")))
              #t))
          (replace 'install
-           (lambda* (#:key make-flags #:allow-other-keys)
+           (lambda* (#:key outputs make-flags #:allow-other-keys)
+             ;; The .la files don't like having the moduledir moved.
+             (for-each delete-file (find-files "." "\\.la"))
              ;; Simple hack to avoid installing a trivial README in /etc.
              (apply invoke "make" "install" "sysconfdir=/tmp/bogus"
+                    (string-append "moduledir=" (assoc-ref outputs "out")
+                                   "/lib/dovecot")
                     make-flags))))))
     (home-page "https://www.dovecot.org")
     (synopsis "Secure POP3/IMAP server")