From e4dd3230739bca94896343d64c6756d346016296 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 23 Aug 2020 23:43:43 +0300 Subject: [PATCH] gnu: dovecot: Set moduledir to global directory. * 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 --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 01ba9dc057..d3d1bda1b6 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -1442,7 +1442,8 @@ facilities for checking incoming mail.") `(#:configure-flags '("--sysconfdir=/etc" "--localstatedir=/var" "--with-sqlite" ; not auto-detected - "--with-lucene") + "--with-lucene" + "--with-moduledir=/etc/dovecot/modules") #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-file-names @@ -1459,9 +1460,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") -- 2.28.0